From 83cf046cff7322c959d6ffe15fab9016b921a8b3 Mon Sep 17 00:00:00 2001 From: Ben Waters Date: Tue, 20 Mar 2018 03:41:14 -0400 Subject: [PATCH 001/143] REPORT-714 : added a handler for CohortIndicators that filters out any other generic indicators (#164) --- .../handler/CohortIndicatorHandler.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortIndicatorHandler.java diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortIndicatorHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortIndicatorHandler.java new file mode 100644 index 0000000000..84133e0578 --- /dev/null +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortIndicatorHandler.java @@ -0,0 +1,44 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.web.widget.handler; + +import java.util.List; + +import org.openmrs.annotation.Handler; +import org.openmrs.api.context.Context; +import org.openmrs.module.htmlwidgets.web.WidgetConfig; +import org.openmrs.module.htmlwidgets.web.html.CodedWidget; +import org.openmrs.module.htmlwidgets.web.html.Option; +import org.openmrs.module.reporting.indicator.CohortIndicator; +import org.openmrs.module.reporting.indicator.Indicator; +import org.openmrs.module.reporting.indicator.service.IndicatorService; + +@Handler(supports = { CohortIndicator.class }, order = 25) +public class CohortIndicatorHandler extends IndicatorHandler { + + /** + * @see IndicatorHandler#populateOptions(WidgetConfig, CodedWidget) + */ + @Override + public void populateOptions(WidgetConfig config, CodedWidget widget) { + List listOfAllIndicators = null; + String tag = config.getAttributeValue("tag", null); + if (tag != null) { + listOfAllIndicators = Context.getService(IndicatorService.class).getDefinitionsByTag(tag); + } else { + listOfAllIndicators = Context.getService(IndicatorService.class).getAllDefinitions(false); + } + for (Indicator indicator : listOfAllIndicators) { + if (indicator instanceof CohortIndicator) { + widget.addOption(new Option(indicator.getUuid(), indicator.getName(), null, indicator), config); + } + } + } +} From 4135a30c51ba2d15e21dcd8934a08a9d17c83fc2 Mon Sep 17 00:00:00 2001 From: Ben Waters Date: Sat, 24 Mar 2018 18:26:11 -0400 Subject: [PATCH 002/143] REPORT-842 : Switch License to MPL v2.0 (#166) --- LICENSE | 401 ++++++++++++++++++ .../DataExportDataSetDefinition.java | 16 +- .../evaluator/DataExportDataSetEvaluator.java | 16 +- .../DataExportDataSetDefinitionPersister.java | 4 +- .../service/db/MappedDefinitionType.java | 16 +- .../report/service/db/PropertiesType.java | 16 +- .../report/service/db/RenderingModeType.java | 16 +- .../service/db/ReportDefinitionType.java | 16 +- .../DataExportDataSetPersisterTest.java | 4 +- .../service/db/MappedDefinitionType.java | 16 +- .../report/service/db/PropertiesType.java | 16 +- .../report/service/db/RenderingModeType.java | 16 +- .../service/db/ReportDefinitionType.java | 16 +- .../PatientDataCalculationBehaviorTest.java | 16 +- .../module/reporting/cohort/CohortsTest.java | 19 +- .../AgeCohortDefinitionEvaluatorTest.java | 16 +- ...PatientsCohortDefinitionEvaluatorTest.java | 16 +- .../AnEvaluatableCohortDefinition.java | 9 + ...AndDeathCohortDefinitionEvaluatorTest.java | 9 + ...CodedObsCohortDefinitionEvaluatorTest.java | 9 + ...positionCohortDefinitionEvaluatorTest.java | 9 + ...arameterCohortDefinitionEvaluatorTest.java | 9 + .../DateObsCohortDefinitionEvaluatorTest.java | 9 + ...nLibraryCohortDefinitionEvaluatorTest.java | 19 +- ...ncounterCohortDefinitionEvaluatorTest.java | 9 + ...CodedObsCohortDefinitionEvaluatorTest.java | 9 + ...luatableCohortDefinitionEvaluatorTest.java | 9 + .../GenderCohortDefinitionEvaluatorTest.java | 16 +- ...nProgramCohortDefinitionEvaluatorTest.java | 16 +- .../InStateCohortDefinitionEvaluatorTest.java | 9 + .../InverseCohortDefinitionEvaluatorTest.java | 9 + ...rametersCohortDefinitionEvaluatorTest.java | 9 + ...mericObsCohortDefinitionEvaluatorTest.java | 9 + ...arameterCohortDefinitionEvaluatorTest.java | 9 + ...entifierCohortDefinitionEvaluatorTest.java | 9 + ...entStateCohortDefinitionEvaluatorTest.java | 16 +- ...ttributeCohortDefinitionEvaluatorTest.java | 9 + ...rAbsenceCohortDefinitionEvaluatorTest.java | 9 + ...rollmentCohortDefinitionEvaluatorTest.java | 16 +- ...ScriptedCohortDefinitionEvaluatorTest.java | 16 +- .../SqlCohortDefinitionEvaluatorTest.java | 9 + .../TextObsCohortDefinitionEvaluatorTest.java | 9 + .../VisitCohortDefinitionEvaluatorTest.java | 19 +- .../BuiltInCohortDefinitionLibraryTest.java | 19 +- .../BaseCohortDefinitionServiceTest.java | 9 + .../query/service/CohortQueryServiceTest.java | 9 + .../module/reporting/common/AgeTest.java | 19 +- .../reporting/common/DateRangeTest.java | 9 + .../module/reporting/common/DateUtilTest.java | 16 +- .../common/DelimitedKeyComparatorTest.java | 9 + .../reporting/common/ExcelBuilderTest.java | 16 +- .../reporting/common/ExcelUtilTest.java | 16 +- .../module/reporting/common/FractionTest.java | 16 +- .../reporting/common/ObjectUtilTest.java | 16 +- .../reporting/common/ReflectionUtilTest.java | 9 + .../reporting/common/ReportingMatchers.java | 19 +- .../module/reporting/common/TestUtil.java | 9 + .../data/JoinDataDefinitionTest.java | 19 +- .../data/converter/AgeConverterTest.java | 16 +- .../data/converter/AgeRangeConverterTest.java | 16 +- .../AttributeValueConverterTest.java | 9 + .../converter/BirthdateConverterTest.java | 9 + .../BirthdateToAgeConverterTest.java | 9 + .../data/converter/BooleanConverterTest.java | 9 + .../data/converter/DateConverterTest.java | 9 + .../data/converter/ListConverterTest.java | 9 + .../data/converter/MapConverterTest.java | 9 + .../converter/NullValueConverterTest.java | 9 + .../ObsFromObsGroupConverterTest.java | 9 + .../ObsValueTextAsCodedConverterTest.java | 9 + .../converter/PersonAddressConverterTest.java | 9 + .../converter/PersonNameConverterTest.java | 9 + .../PrivilegedDataConverterTest.java | 9 + .../data/converter/PropertyConverterTest.java | 9 + .../data/converter/StringConverterTest.java | 9 + .../AgeAtEncounterDataEvaluatorTest.java | 19 +- .../AuditInfoEncounterDataEvaluatorTest.java | 19 +- .../ConvertedEncounterDataEvaluatorTest.java | 16 +- .../EncounterIdDataEvaluatorTest.java | 16 +- .../EncounterLocationDataEvaluatorTest.java | 9 + .../EncounterProviderDataEvaluatorTest.java | 9 + .../EncounterVisitDataEvaluatorTest.java | 9 + ...EncountersForPatientDataEvaluatorTest.java | 9 + .../ObsForEncounterEvaluatorTest.java | 9 + .../PatientToEncounterDataEvaluatorTest.java | 9 + .../PersonToEncounterDataEvaluatorTest.java | 9 + ...multaneousEncountersDataEvaluatorTest.java | 19 +- .../SqlEncounterDataEvaluatorTest.java | 19 +- .../BuiltInEncounterDataLibraryTest.java | 19 +- .../service/EncounterDataServiceImplTest.java | 16 +- .../ConvertedObsDataEvaluatorTest.java | 9 + .../EncounterToObsDataEvaluatorTest.java | 9 + .../GroupMemberObsDataEvaluatorTest.java | 9 + .../obs/evaluator/ObsIdDataEvaluatorTest.java | 9 + .../PatientToObsDataEvaluatorTest.java | 9 + .../evaluator/PersonToObsEvaluatorTest.java | 9 + .../ConvertedPatientDataEvaluatorTest.java | 16 +- .../CurrentPatientStateDataEvaluatorTest.java | 16 +- ...nitionLibraryPatientDataEvaluatorTest.java | 19 +- ...DrugOrdersForPatientDataEvaluatorTest.java | 16 +- ...EncountersForPatientDataEvaluatorTest.java | 16 +- .../evaluator/LogicDataEvaluatorTest.java | 16 +- .../PatientCalculationDataEvaluatorTest.java | 16 +- .../evaluator/PatientIdDataEvaluatorTest.java | 9 + .../PatientIdentifierDataEvaluatorTest.java | 16 +- .../PatientObjectDataEvaluatorTest.java | 9 + .../PersonToPatientDataEvaluatorTest.java | 9 + .../PreferredIdentifierDataEvaluatorTest.java | 9 + ...nrollmentsForPatientDataEvaluatorTest.java | 16 +- ...gramStatesForPatientDataEvaluatorTest.java | 16 +- ...edCompositionPatientDataEvaluatorTest.java | 16 +- .../SqlPatientDataEvaluatorTest.java | 16 +- .../evaluator/TestPatientCalculation.java | 16 +- .../BuiltInPatientDataLibraryTest.java | 19 +- .../service/PatientDataServiceImplTest.java | 16 +- .../AgeAtDateOfOtherDataEvaluatorTest.java | 16 +- .../evaluator/AgeDataEvaluatorTest.java | 16 +- .../evaluator/BirthdateDataEvaluatorTest.java | 16 +- .../ConvertedPersonDataEvaluatorTest.java | 16 +- .../evaluator/GenderDataEvaluatorTest.java | 16 +- .../ObsActiveListPersonDataEvaluatorTest.java | 16 +- .../ObsForPersonDataEvaluatorTest.java | 16 +- .../PersonAttributeDataEvaluatorTest.java | 16 +- .../evaluator/PersonIdDataEvaluatorTest.java | 16 +- .../PreferredAddressDataEvaluatorTest.java | 16 +- .../PreferredNameDataEvaluatorTest.java | 16 +- ...lationshipsForPersonDataEvaluatorTest.java | 16 +- .../VitalStatusDataEvaluatorTest.java | 16 +- .../service/PersonDataServiceImplTest.java | 16 +- .../ObsForVisitDataEvaluatorTest.java | 16 +- .../OrderForVisitDataEvaluatorTest.java | 16 +- .../PatientToVisitDataEvaluatorTest.java | 9 + .../PersonToVisitDataEvaluatorTest.java | 9 + .../evaluator/SqlVisitDataEvaluatorTest.java | 9 + .../evaluator/VisitIdDataEvaluatorTest.java | 9 + .../library/BuiltInVisitDataLibraryTest.java | 9 + .../AnEvaluatableDataSetDefinition.java | 9 + .../CohortCrossTabDataSetEvaluatorTest.java | 16 +- .../CohortIndicatorDataSetEvaluatorTest.java | 9 + ...VaryingParametersDataSetEvaluatorTest.java | 19 +- .../EncounterAndObsDataSetEvaluatorTest.java | 16 +- .../EncounterDataSetEvaluatorTest.java | 16 +- .../EvaluatableDataSetEvaluatorTest.java | 9 + .../evaluator/LogicDataSetEvaluatorTest.java | 9 + .../MultiParameterDataSetEvaluatorTest.java | 16 +- ...tiPeriodIndicatorDataSetEvaluatorTest.java | 16 +- .../evaluator/MySqlDataSetEvaluatorTest.java | 9 + .../evaluator/ObsDataSetEvaluatorTest.java | 9 + .../PatientDataSetEvaluatorTest.java | 16 +- .../evaluator/PersonDataSetEvaluatorTest.java | 9 + ...peatPerTimePeriodDataSetEvaluatorTest.java | 19 +- .../SimplePatientDataSetEvaluatorTest.java | 9 + .../evaluator/SqlDataSetEvaluatorTest.java | 9 + .../evaluator/VisitDataSetEvaluatorTest.java | 17 +- .../SqlCohortDefinitionConverterTest.java | 16 +- .../AllDefinitionLibrariesComponentTest.java | 9 + .../library/BaseDefinitionLibraryTest.java | 9 + ...ConfiguredCohortDefinitionLibraryTest.java | 9 + ...DataSetDefinitionLibraryComponentTest.java | 9 + ...onfiguredDataSetDefinitionLibraryTest.java | 9 + ...redEncounterDataDefinitionLibraryTest.java | 9 + ...guredPatientDataDefinitionLibraryTest.java | 9 + ...figuredVisitDataDefinitionLibraryTest.java | 9 + .../service/DefinitionServiceTest.java | 9 + .../CachingCohortDefinitionTest.java | 16 +- .../evaluation/EvaluationContextTest.java | 16 +- .../evaluation/EvaluationProfilerTest.java | 17 +- .../parameter/ParameterUtilTest.java | 16 +- .../querybuilder/HqlQueryBuilderTest.java | 16 +- .../querybuilder/SqlQueryBuilderTest.java | 16 +- .../service/EvaluationServiceTest.java | 9 + .../CohortIndicatorDataSetEvaluatorTest.java | 9 + .../indicator/PeriodIndicatorReportTest.java | 9 + .../QueryCountIndicatorEvaluatorTest.java | 16 +- .../reporting/indicator/SqlIndicatorTest.java | 16 +- .../aggregation/AggregationTest.java | 9 + .../indicator/util/IndicatorUtilTest.java | 16 +- .../module/reporting/logic/GenderRule.java | 16 +- .../reporting/logic/MockLogicContext.java | 16 +- .../reporting/logic/MockLogicCriteria.java | 16 +- .../reporting/logic/MockLogicService.java | 16 +- .../AuditEncounterQueryEvaluatorTest.java | 19 +- .../BasicEncounterQueryEvaluatorTest.java | 19 +- ...ompositionEncounterQueryEvaluatorTest.java | 9 + ...lParameterEncounterQueryEvaluatorTest.java | 9 + ...ParametersEncounterQueryEvaluatorTest.java | 9 + ...MappedParametersObsQueryEvaluatorTest.java | 9 + ...EncounterForPatientQueryEvaluatorTest.java | 16 +- .../ObsForEncounterQueryEvaluatorTest.java | 19 +- .../SqlEncounterQueryEvaluatorTest.java | 16 +- .../EncounterQueryServiceImplTest.java | 16 +- .../evaluator/AllObsQueryEvaluatorTest.java | 9 + .../evaluator/BasicObsQueryEvaluatorTest.java | 9 + .../evaluator/SqlObsQueryEvaluatorTest.java | 16 +- .../obs/service/ObsQueryServiceImplTest.java | 16 +- .../AllPersonQueryEvaluatorTest.java | 16 +- .../PatientPersonQueryEvaluatorTest.java | 9 + .../SqlPersonQueryEvaluatorTest.java | 16 +- .../service/PersonQueryServiceImplTest.java | 16 +- .../ActiveVisitQueryEvaluatorTest.java | 9 + .../BasicVisitQueryEvaluatorTest.java | 19 +- .../reporting/report/ReportRequestTest.java | 9 + .../ReportDefinitionServiceImplTest.java | 16 +- .../CohortDetailReportRendererTest.java | 16 +- .../renderer/CsvReportRendererTest.java | 16 +- .../DelimitedTextReportRendererTest.java | 19 +- .../renderer/ExcelTemplateRendererTest.java | 16 +- .../renderer/ReportDesignRendererTest.java | 9 + .../renderer/TextTemplateRendererTest.java | 16 +- .../renderer/XlsReportRendererTest.java | 16 +- .../service/MysqlReportServiceTest.java | 9 + .../report/service/ReportServiceTest.java | 9 + .../report/service/TestReportProcessor.java | 9 + .../report/service/db/PropertiesTypeTest.java | 19 +- .../report/util/SqlScriptParserTest.java | 16 +- .../reporting/report/util/SqlUtilsTest.java | 16 +- .../serializer/ReportingSerializerTest.java | 9 + .../template/HandlebarsHelpersTest.java | 9 + .../test/AuthenticatedUserTestHelper.java | 19 +- .../reporting/test/CustomMessageSource.java | 16 +- .../BaseObsCohortDefinitionValidatorTest.java | 9 + ...positionCohortDefinitionValidatorTest.java | 9 + ...nProgramCohortDefinitionValidatorTest.java | 9 + .../InStateCohortDefinitionValidatorTest.java | 9 + .../InverseCohortDefinitionValidatorTest.java | 9 + .../LogicCohortDefinitionValidatorTest.java | 9 + ...entStateCohortDefinitionValidatorTest.java | 9 + ...rollmentCohortDefinitionValidatorTest.java | 9 + .../SqlCohortDefinitionValidatorTest.java | 9 + .../StaticCohortDefinitionValidatorTest.java | 9 + .../module/reporting/ExceptionUtil.java | 16 +- .../IllegalDatabaseAccessException.java | 16 +- .../module/reporting/ReportingConstants.java | 16 +- .../module/reporting/ReportingException.java | 16 +- .../reporting/ReportingModuleActivator.java | 16 +- .../calculation/DataCalculation.java | 16 +- .../calculation/PatientDataCalculation.java | 16 +- .../PatientDataCalculationProvider.java | 16 +- .../PatientDataCalculationSuggestion.java | 16 +- .../calculation/ReportingCalculationUtil.java | 16 +- .../module/reporting/cohort/CohortUtil.java | 9 + .../module/reporting/cohort/Cohorts.java | 19 +- .../reporting/cohort/EvaluatedCohort.java | 16 +- .../module/reporting/cohort/PatientIdSet.java | 16 +- .../definition/AgeCohortDefinition.java | 16 +- .../AllPatientsCohortDefinition.java | 16 +- .../definition/BaseCohortDefinition.java | 16 +- .../definition/BaseObsCohortDefinition.java | 16 +- .../BirthAndDeathCohortDefinition.java | 16 +- .../definition/CodedObsCohortDefinition.java | 16 +- .../cohort/definition/CohortDefinition.java | 16 +- .../CompositionCohortDefinition.java | 16 +- .../ConditionalParameterCohortDefinition.java | 16 +- .../definition/DateObsCohortDefinition.java | 16 +- .../DefinitionLibraryCohortDefinition.java | 19 +- .../definition/EncounterCohortDefinition.java | 16 +- ...EncounterWithCodedObsCohortDefinition.java | 16 +- .../EvaluatableCohortDefinition.java | 9 + .../definition/GenderCohortDefinition.java | 16 +- .../definition/InProgramCohortDefinition.java | 16 +- .../definition/InStateCohortDefinition.java | 16 +- .../definition/InverseCohortDefinition.java | 16 +- .../definition/LogicCohortDefinition.java | 16 +- .../MappedParametersCohortDefinition.java | 16 +- .../NumericObsCohortDefinition.java | 16 +- .../ObsInEncounterCohortDefinition.java | 16 +- .../OptionalParameterCohortDefinition.java | 16 +- .../PatientIdentifierCohortDefinition.java | 16 +- .../PatientStateCohortDefinition.java | 16 +- .../PersonAttributeCohortDefinition.java | 16 +- .../PresenceOrAbsenceCohortDefinition.java | 16 +- .../ProgramEnrollmentCohortDefinition.java | 16 +- .../definition/ScriptedCohortDefinition.java | 16 +- .../definition/SqlCohortDefinition.java | 16 +- .../definition/StaticCohortDefinition.java | 16 +- .../definition/TextObsCohortDefinition.java | 16 +- .../definition/VisitCohortDefinition.java | 19 +- .../AgeCohortDefinitionEvaluator.java | 16 +- .../AllPatientsCohortDefinitionEvaluator.java | 16 +- .../BaseObsCohortDefinitionEvaluator.java | 16 +- ...irthAndDeathCohortDefinitionEvaluator.java | 16 +- .../CodedObsCohortDefinitionEvaluator.java | 16 +- .../evaluator/CohortDefinitionEvaluator.java | 16 +- .../CompositionCohortDefinitionEvaluator.java | 16 +- ...nalParameterCohortDefinitionEvaluator.java | 16 +- .../DateObsCohortDefinitionEvaluator.java | 16 +- ...itionLibraryCohortDefinitionEvaluator.java | 19 +- .../EncounterCohortDefinitionEvaluator.java | 16 +- ...WithCodedObsCohortDefinitionEvaluator.java | 16 +- .../EvaluatableCohortDefinitionEvaluator.java | 9 + .../GenderCohortDefinitionEvaluator.java | 16 +- .../InProgramCohortDefinitionEvaluator.java | 16 +- .../InStateCohortDefinitionEvaluator.java | 16 +- .../InverseCohortDefinitionEvaluator.java | 16 +- .../LogicCohortDefinitionEvaluator.java | 16 +- ...edParametersCohortDefinitionEvaluator.java | 16 +- .../NumericObsCohortDefinitionEvaluator.java | 16 +- ...sInEncounterCohortDefinitionEvaluator.java | 16 +- ...nalParameterCohortDefinitionEvaluator.java | 16 +- ...ntIdentifierCohortDefinitionEvaluator.java | 16 +- ...PatientStateCohortDefinitionEvaluator.java | 16 +- ...sonAttributeCohortDefinitionEvaluator.java | 16 +- ...nceOrAbsenceCohortDefinitionEvaluator.java | 16 +- ...amEnrollmentCohortDefinitionEvaluator.java | 16 +- .../ScriptedCohortDefinitionEvaluator.java | 16 +- .../SqlCohortDefinitionEvaluator.java | 16 +- .../StaticCohortDefinitionEvaluator.java | 16 +- .../TextObsCohortDefinitionEvaluator.java | 16 +- .../VisitCohortDefinitionEvaluator.java | 19 +- .../SqlCohortDefinitionSaveHandler.java | 16 +- .../history/CohortDefinitionHistory.java | 16 +- .../CohortDefinitionSearchHistory.java | 16 +- .../BuiltInCohortDefinitionLibrary.java | 19 +- .../persister/CohortDefinitionPersister.java | 16 +- .../MockCohortDefinitionPersister.java | 16 +- .../SerializedCohortDefinitionPersister.java | 16 +- .../StaticCohortDefinitionPersister.java | 16 +- .../service/CohortDefinitionService.java | 16 +- .../service/CohortDefinitionServiceImpl.java | 16 +- .../util/CohortExpressionParser.java | 16 +- .../cohort/definition/util/CohortFilter.java | 16 +- .../cohort/query/db/CohortQueryDAO.java | 16 +- .../db/hibernate/HibernateCohortQueryDAO.java | 16 +- .../query/service/CohortQueryService.java | 16 +- .../query/service/CohortQueryServiceImpl.java | 16 +- .../openmrs/module/reporting/common/Age.java | 16 +- .../module/reporting/common/AgeRange.java | 16 +- .../module/reporting/common/AuditInfo.java | 19 +- .../common/BeanPropertyComparator.java | 16 +- .../module/reporting/common/Birthdate.java | 16 +- .../reporting/common/BooleanOperator.java | 16 +- .../module/reporting/common/ContentType.java | 16 +- .../module/reporting/common/DateRange.java | 16 +- .../module/reporting/common/DateUtil.java | 9 + .../common/DelimitedKeyComparator.java | 9 + .../module/reporting/common/DrugOrderSet.java | 16 +- .../module/reporting/common/DurationUnit.java | 16 +- .../module/reporting/common/ExcelBuilder.java | 9 + .../module/reporting/common/ExcelUtil.java | 9 + .../module/reporting/common/Fraction.java | 16 +- .../module/reporting/common/GroovyHelper.java | 9 + .../reporting/common/HibernateUtil.java | 16 +- .../module/reporting/common/ListMap.java | 16 +- .../module/reporting/common/Localized.java | 16 +- .../module/reporting/common/LogicUtil.java | 9 + .../module/reporting/common/MessageUtil.java | 9 + .../module/reporting/common/NumericRange.java | 16 +- .../reporting/common/ObjectCounter.java | 16 +- .../module/reporting/common/ObjectUtil.java | 9 + .../reporting/common/ObsActiveList.java | 16 +- .../reporting/common/RangeComparator.java | 9 + .../reporting/common/ReflectionUtil.java | 9 + .../reporting/common/ScriptingLanguage.java | 16 +- .../reporting/common/SetComparator.java | 9 + .../module/reporting/common/SortCriteria.java | 16 +- .../module/reporting/common/TimePeriod.java | 19 +- .../reporting/common/TimeQualifier.java | 16 +- .../module/reporting/common/Timer.java | 9 + .../module/reporting/common/VitalStatus.java | 16 +- .../module/reporting/data/BaseData.java | 16 +- .../reporting/data/BaseDataDefinition.java | 16 +- .../BaseDefinitionLibraryDataDefinition.java | 19 +- .../reporting/data/BaseSqlDataDefinition.java | 16 +- .../data/ConvertedDataDefinition.java | 16 +- .../openmrs/module/reporting/data/Data.java | 16 +- .../module/reporting/data/DataDefinition.java | 16 +- .../reporting/data/DataSetDataDefinition.java | 16 +- .../module/reporting/data/DataUtil.java | 16 +- .../reporting/data/JoinDataDefinition.java | 16 +- .../module/reporting/data/MappedData.java | 16 +- .../data/converter/AgeConverter.java | 16 +- .../data/converter/AgeRangeConverter.java | 16 +- .../converter/AttributeValueConverter.java | 16 +- .../data/converter/BirthdateConverter.java | 16 +- .../converter/BirthdateToAgeConverter.java | 16 +- .../data/converter/BooleanConverter.java | 16 +- .../data/converter/ChainedConverter.java | 16 +- .../converter/ChangeInValueConverter.java | 16 +- .../data/converter/CollectionConverter.java | 16 +- .../converter/CollectionElementConverter.java | 9 + .../ConcatenatedPropertyConverter.java | 16 +- .../ConceptCodeFromConceptConverter.java | 9 + .../data/converter/CountConverter.java | 9 + .../data/converter/DataConverter.java | 16 +- .../data/converter/DataSetRowConverter.java | 16 +- .../data/converter/DateConverter.java | 16 +- .../converter/EarliestCreatedConverter.java | 19 +- .../data/converter/ExistenceConverter.java | 16 +- .../data/converter/ListConverter.java | 16 +- .../data/converter/MapConverter.java | 16 +- .../data/converter/MapElementConverter.java | 16 +- .../MostRecentlyCreatedConverter.java | 19 +- .../data/converter/NullValueConverter.java | 16 +- .../data/converter/ObjectFormatter.java | 16 +- .../converter/ObsFromObsGroupConverter.java | 9 + .../data/converter/ObsValueConverter.java | 9 + .../ObsValueTextAsCodedConverter.java | 9 + .../converter/PrivilegedDataConverter.java | 9 + .../data/converter/PropertyConverter.java | 16 +- .../data/converter/StringConverter.java | 16 +- .../data/encounter/EncounterData.java | 16 +- .../data/encounter/EncounterDataUtil.java | 16 +- .../encounter/EvaluatedEncounterData.java | 16 +- .../AgeAtEncounterDataDefinition.java | 19 +- .../AuditInfoEncounterDataDefinition.java | 19 +- .../ConvertedEncounterDataDefinition.java | 16 +- .../definition/EncounterDataDefinition.java | 16 +- .../EncounterDataSetDataDefinition.java | 16 +- .../EncounterDatetimeDataDefinition.java | 16 +- .../EncounterFormDataDefinition.java | 16 +- .../definition/EncounterIdDataDefinition.java | 16 +- .../EncounterLocationDataDefinition.java | 16 +- .../EncounterProviderDataDefinition.java | 16 +- .../EncounterTypeDataDefinition.java | 16 +- .../EncounterVisitDataDefinition.java | 9 + .../ObsForEncounterDataDefinition.java | 9 + .../PatientToEncounterDataDefinition.java | 16 +- .../PersonToEncounterDataDefinition.java | 16 +- .../SimultaneousEncountersDataDefinition.java | 19 +- .../SqlEncounterDataDefinition.java | 19 +- .../AgeAtEncounterDataEvaluator.java | 19 +- .../AuditInfoEncounterDataEvaluator.java | 19 +- .../ConvertedEncounterDataEvaluator.java | 16 +- .../evaluator/EncounterDataEvaluator.java | 16 +- .../EncounterDatetimeDataEvaluator.java | 16 +- .../evaluator/EncounterIdDataEvaluator.java | 16 +- .../EncounterLocationDataEvaluator.java | 9 + .../EncounterPropertyDataEvaluator.java | 16 +- .../EncounterProviderDataEvaluator.java | 9 + .../evaluator/EncounterTypeDataEvaluator.java | 16 +- .../EncounterVisitDataEvaluator.java | 9 + .../ObsForEncounterDataEvaluator.java | 9 + .../PatientToEncounterDataEvaluator.java | 16 +- .../PersonToEncounterDataEvaluator.java | 16 +- .../SimultaneousEncountersDataEvaluator.java | 19 +- .../evaluator/SqlEncounterDataEvaluator.java | 19 +- .../library/BuiltInEncounterDataLibrary.java | 19 +- .../SerializedEncounterDataPersister.java | 16 +- .../service/EncounterDataService.java | 16 +- .../service/EncounterDataServiceImpl.java | 16 +- .../reporting/data/obs/EvaluatedObsData.java | 19 +- .../module/reporting/data/obs/ObsData.java | 16 +- .../reporting/data/obs/ObsDataUtil.java | 16 +- .../ConvertedObsDataDefinition.java | 9 + .../EncounterToObsDataDefinition.java | 9 + .../GroupMemberObsDataDefinition.java | 9 + .../obs/definition/ObsDataDefinition.java | 19 +- .../obs/definition/ObsIdDataDefinition.java | 9 + .../PatientToObsDataDefinition.java | 9 + .../definition/PersonToObsDataDefinition.java | 9 + .../evaluator/ConvertedObsDataEvaluator.java | 9 + .../EncounterToObsDataEvaluator.java | 9 + .../GroupMemberObsDataEvaluator.java | 9 + .../data/obs/evaluator/ObsDataEvaluator.java | 19 +- .../obs/evaluator/ObsIdDataEvaluator.java | 9 + .../evaluator/ObsPropertyDataEvaluator.java | 16 +- .../evaluator/PatientToObsDataEvaluator.java | 9 + .../evaluator/PersonToObsDataEvaluator.java | 9 + .../data/obs/service/ObsDataService.java | 9 + .../data/obs/service/ObsDataServiceImpl.java | 9 + .../data/patient/EvaluatedPatientData.java | 16 +- .../reporting/data/patient/PatientData.java | 16 +- .../ConvertedPatientDataDefinition.java | 16 +- .../CurrentPatientStateDataDefinition.java | 16 +- ...efinitionLibraryPatientDataDefinition.java | 19 +- .../DrugOrdersForPatientDataDefinition.java | 16 +- .../EncountersForPatientDataDefinition.java | 16 +- .../definition/LogicDataDefinition.java | 16 +- .../PatientCalculationDataDefinition.java | 18 +- .../definition/PatientDataDefinition.java | 16 +- .../PatientDataSetDataDefinition.java | 16 +- .../definition/PatientIdDataDefinition.java | 16 +- .../PatientIdentifierDataDefinition.java | 16 +- .../PatientObjectDataDefinition.java | 16 +- .../PersonToPatientDataDefinition.java | 16 +- .../PreferredIdentifierDataDefinition.java | 16 +- ...amEnrollmentsForPatientDataDefinition.java | 16 +- ...ProgramStatesForPatientDataDefinition.java | 16 +- ...iptedCompositionPatientDataDefinition.java | 16 +- .../definition/SqlPatientDataDefinition.java | 9 + .../StaticValuePatientDataDefinition.java | 16 +- .../ConvertedPatientDataEvaluator.java | 16 +- .../CurrentPatientStateDataEvaluator.java | 16 +- ...DefinitionLibraryPatientDataEvaluator.java | 19 +- .../DrugOrdersForPatientDataEvaluator.java | 16 +- .../EncountersForPatientDataEvaluator.java | 16 +- .../patient/evaluator/LogicDataEvaluator.java | 16 +- .../PatientCalculationDataEvaluator.java | 16 +- .../evaluator/PatientDataEvaluator.java | 16 +- .../PatientDataSetDataEvaluator.java | 16 +- .../evaluator/PatientIdDataEvaluator.java | 16 +- .../PatientIdentifierDataEvaluator.java | 16 +- .../evaluator/PatientObjectDataEvaluator.java | 16 +- .../PatientPropertyDataEvaluator.java | 16 +- .../PersonToPatientDataEvaluator.java | 16 +- .../PreferredIdentifierDataEvaluator.java | 16 +- ...ramEnrollmentsForPatientDataEvaluator.java | 16 +- .../ProgramStatesForPatientDataEvaluator.java | 16 +- ...ositionPatientDataDefinitionEvaluator.java | 16 +- .../evaluator/SqlPatientDataEvaluator.java | 9 + .../StaticValuePatientDataEvaluator.java | 16 +- .../library/BuiltInPatientDataLibrary.java | 19 +- .../SerializedPatientDataPersister.java | 16 +- .../patient/service/PatientDataService.java | 16 +- .../service/PatientDataServiceImpl.java | 16 +- .../data/person/EvaluatedPersonData.java | 16 +- .../reporting/data/person/PersonData.java | 16 +- .../reporting/data/person/PersonDataUtil.java | 16 +- .../AgeAtDateOfOtherDataDefinition.java | 16 +- .../person/definition/AgeDataDefinition.java | 16 +- .../definition/BirthdateDataDefinition.java | 16 +- .../ConvertedPersonDataDefinition.java | 16 +- .../definition/GenderDataDefinition.java | 16 +- .../ObsActiveListPersonDataDefinition.java | 16 +- .../ObsForPersonDataDefinition.java | 16 +- .../PersonAttributeDataDefinition.java | 16 +- .../definition/PersonDataDefinition.java | 16 +- .../definition/PersonIdDataDefinition.java | 16 +- .../PreferredAddressDataDefinition.java | 16 +- .../PreferredNameDataDefinition.java | 16 +- .../RelationshipsForPersonDataDefinition.java | 16 +- .../definition/VitalStatusDataDefinition.java | 16 +- .../AgeAtDateOfOtherDataEvaluator.java | 16 +- .../person/evaluator/AgeDataEvaluator.java | 16 +- .../evaluator/BirthdateDataEvaluator.java | 16 +- .../ConvertedPersonDataEvaluator.java | 16 +- .../person/evaluator/GenderDataEvaluator.java | 16 +- .../ObsActiveListPersonDataEvaluator.java | 16 +- .../evaluator/ObsForPersonDataEvaluator.java | 16 +- .../PersonAttributeDataEvaluator.java | 16 +- .../person/evaluator/PersonDataEvaluator.java | 16 +- .../evaluator/PersonIdDataEvaluator.java | 16 +- .../PersonPropertyDataEvaluator.java | 16 +- .../PreferredAddressDataEvaluator.java | 16 +- .../evaluator/PreferredNameDataEvaluator.java | 16 +- .../RelationshipsForPersonDataEvaluator.java | 16 +- .../evaluator/VitalStatusDataEvaluator.java | 16 +- .../SerializedPersonDataPersister.java | 16 +- .../person/service/PersonDataService.java | 16 +- .../person/service/PersonDataServiceImpl.java | 16 +- .../data/visit/EvaluatedVisitData.java | 19 +- .../reporting/data/visit/VisitData.java | 19 +- .../reporting/data/visit/VisitDataUtil.java | 16 +- .../definition/ObsForVisitDataDefinition.java | 16 +- .../OrderForVisitDataDefinition.java | 16 +- .../PatientToVisitDataDefinition.java | 19 +- .../PersonToVisitDataDefinition.java | 19 +- .../definition/SqlVisitDataDefinition.java | 9 + .../visit/definition/VisitDataDefinition.java | 19 +- .../definition/VisitIdDataDefinition.java | 9 + .../evaluator/ObsForVisitDataEvaluator.java | 16 +- .../evaluator/OrderForVisitDataEvaluator.java | 16 +- .../PatientToVisitDataEvaluator.java | 9 + .../evaluator/PersonToVisitDataEvaluator.java | 9 + .../evaluator/SqlVisitDataEvaluator.java | 9 + .../visit/evaluator/VisitDataEvaluator.java | 19 +- .../visit/evaluator/VisitIdDataEvaluator.java | 9 + .../evaluator/VisitPropertyDataEvaluator.java | 16 +- .../library/BuiltInVisitDataLibrary.java | 19 +- .../data/visit/service/VisitDataService.java | 19 +- .../visit/service/VisitDataServiceImpl.java | 19 +- .../module/reporting/dataset/DataSet.java | 16 +- .../reporting/dataset/DataSetColumn.java | 16 +- .../reporting/dataset/DataSetMetaData.java | 16 +- .../module/reporting/dataset/DataSetRow.java | 16 +- .../dataset/DataSetRowComparator.java | 16 +- .../reporting/dataset/DataSetRowList.java | 16 +- .../module/reporting/dataset/DataSetUtil.java | 16 +- .../dataset/LazyPageableDataSet.java | 16 +- .../module/reporting/dataset/MapDataSet.java | 16 +- .../reporting/dataset/PageableDataSet.java | 16 +- .../reporting/dataset/SimpleDataSet.java | 9 + .../dataset/SimpleDataSetMetaData.java | 16 +- .../definition/BaseColumnDefinition.java | 16 +- .../column/definition/ColumnDefinition.java | 16 +- .../RowPerObjectColumnDefinition.java | 16 +- .../definition/BaseDataSetDefinition.java | 16 +- .../CohortCrossTabDataSetDefinition.java | 16 +- ...ndicatorAndDimensionDataSetDefinition.java | 9 + .../CohortIndicatorDataSetDefinition.java | 9 + ...ithVaryingParametersDataSetDefinition.java | 19 +- .../dataset/definition/DataSetDefinition.java | 16 +- .../EncounterAndObsDataSetDefinition.java | 16 +- .../EncounterDataSetDefinition.java | 16 +- .../EvaluatableDataSetDefinition.java | 9 + .../definition/LogicDataSetDefinition.java | 16 +- .../MultiParameterDataSetDefinition.java | 16 +- ...MultiPeriodIndicatorDataSetDefinition.java | 9 + .../definition/ObsDataSetDefinition.java | 9 + .../definition/PageableDataSetDefinition.java | 16 +- .../definition/PatientDataSetDefinition.java | 16 +- .../RepeatPerTimePeriodDataSetDefinition.java | 19 +- .../RowPerObjectDataSetDefinition.java | 16 +- .../SimpleIndicatorDataSetDefinition.java | 17 +- .../SimplePatientDataSetDefinition.java | 16 +- .../definition/SqlDataSetDefinition.java | 16 +- .../definition/VisitDataSetDefinition.java | 19 +- .../evaluator/CohortDataSetEvaluator.java | 16 +- ...IndicatorAndDimensionDataSetEvaluator.java | 9 + .../CohortIndicatorDataSetEvaluator.java | 9 + ...WithVaryingParametersDataSetEvaluator.java | 19 +- .../evaluator/DataSetEvaluator.java | 16 +- .../EncounterAndObsDataSetEvaluator.java | 16 +- .../evaluator/EncounterDataSetEvaluator.java | 16 +- .../EvaluatableDataSetEvaluator.java | 9 + .../LazyPageableDataSetEvaluator.java | 16 +- .../evaluator/LogicDataSetEvaluator.java | 16 +- .../MultiParameterDataSetEvaluator.java | 16 +- .../MultiPeriodIndicatorDataSetEvaluator.java | 9 + .../evaluator/ObsDataSetEvaluator.java | 9 + .../evaluator/PatientDataSetEvaluator.java | 16 +- .../RepeatPerTimePeriodDataSetEvaluator.java | 19 +- .../SimpleIndicatorDataSetEvaluator.java | 17 +- .../SimplePatientDataSetEvaluator.java | 16 +- .../evaluator/SqlDataSetEvaluator.java | 17 +- .../evaluator/VisitDataSetEvaluator.java | 17 +- .../persister/DataSetDefinitionPersister.java | 16 +- .../SerializedDataSetDefinitionPersister.java | 16 +- .../service/DataSetDefinitionService.java | 16 +- .../service/DataSetDefinitionServiceImpl.java | 16 +- .../service/BaseDataSetQueryService.java | 16 +- .../query/service/DataSetQueryService.java | 16 +- .../query/service/db/DataSetQueryDAO.java | 16 +- .../service/db/HibernateDataSetQueryDAO.java | 16 +- .../definition/DefinitionContext.java | 16 +- .../definition/DefinitionSummary.java | 9 + .../reporting/definition/DefinitionUtil.java | 16 +- .../configuration/ConfigurationProperty.java | 16 +- ...onPropertyAndParameterCachingStrategy.java | 16 +- .../ConfigurationPropertyCachingStrategy.java | 16 +- .../definition/configuration/Property.java | 16 +- .../definition/converter/ConverterUtil.java | 16 +- .../converter/DefinitionConverter.java | 16 +- .../SqlCohortDefinitionConverter.java | 16 +- .../evaluator/DefinitionEvaluator.java | 16 +- .../library/AllDefinitionLibraries.java | 19 +- .../library/BaseDefinitionLibrary.java | 19 +- .../definition/library/DefinitionLibrary.java | 19 +- .../library/DocumentedDefinition.java | 19 +- .../library/LibraryDefinitionSummary.java | 9 + ...mplementerConfiguredDefinitionLibrary.java | 9 + ...nterConfiguredCohortDefinitionLibrary.java | 9 + ...terConfiguredDataSetDefinitionLibrary.java | 9 + ...figuredEncounterDataDefinitionLibrary.java | 9 + ...onfiguredPatientDataDefinitionLibrary.java | 9 + ...rConfiguredVisitDataDefinitionLibrary.java | 9 + .../persister/DefinitionPersister.java | 16 +- .../SerializedDefinitionPersister.java | 16 +- .../service/BaseDefinitionService.java | 16 +- .../definition/service/DefinitionService.java | 16 +- .../service/SerializedDefinitionService.java | 16 +- .../SerializedDefinitionServiceImpl.java | 16 +- .../reporting/evaluation/BaseDefinition.java | 16 +- .../reporting/evaluation/Definition.java | 16 +- .../reporting/evaluation/Evaluated.java | 16 +- .../evaluation/EvaluationConfiguration.java | 16 +- .../evaluation/EvaluationContext.java | 16 +- .../evaluation/EvaluationException.java | 9 + .../evaluation/EvaluationProfiler.java | 17 +- .../reporting/evaluation/EvaluationUtil.java | 16 +- .../MissingDependencyException.java | 9 + .../reporting/evaluation/caching/Caching.java | 16 +- .../evaluation/caching/CachingStrategy.java | 16 +- .../evaluation/caching/NoCachingStrategy.java | 16 +- .../context/EncounterEvaluationContext.java | 16 +- .../context/ObsEvaluationContext.java | 16 +- .../context/PersonEvaluationContext.java | 16 +- .../context/VisitEvaluationContext.java | 16 +- .../evaluation/parameter/Mapped.java | 16 +- .../evaluation/parameter/Parameter.java | 16 +- .../parameter/ParameterException.java | 16 +- .../evaluation/parameter/Parameterizable.java | 16 +- .../parameter/ParameterizableUtil.java | 9 + .../querybuilder/HqlQueryBuilder.java | 9 + .../evaluation/querybuilder/QueryBuilder.java | 16 +- .../querybuilder/SqlQueryBuilder.java | 9 + .../evaluation/service/EvaluationService.java | 16 +- .../service/EvaluationServiceImpl.java | 16 +- .../reporting/indicator/BaseIndicator.java | 16 +- .../reporting/indicator/CohortIndicator.java | 16 +- .../indicator/CohortIndicatorResult.java | 16 +- .../module/reporting/indicator/Indicator.java | 16 +- .../reporting/indicator/IndicatorResult.java | 16 +- .../indicator/QueryCountIndicator.java | 16 +- .../indicator/SimpleIndicatorResult.java | 16 +- .../reporting/indicator/SqlIndicator.java | 16 +- .../aggregation/AggregationUtil.java | 16 +- .../indicator/aggregation/Aggregator.java | 16 +- .../aggregation/CountAggregator.java | 16 +- .../aggregation/DistinctAggregator.java | 16 +- .../indicator/aggregation/MaxAggregator.java | 16 +- .../indicator/aggregation/MeanAggregator.java | 16 +- .../aggregation/MedianAggregator.java | 16 +- .../indicator/aggregation/MinAggregator.java | 16 +- .../indicator/aggregation/ModeAggregator.java | 16 +- .../indicator/aggregation/SumAggregator.java | 16 +- .../dimension/CohortDefinitionDimension.java | 16 +- .../CohortDefinitionDimensionCategory.java | 9 + .../indicator/dimension/CohortDimension.java | 16 +- .../dimension/CohortDimensionResult.java | 16 +- .../CohortIndicatorAndDimensionResult.java | 9 + .../indicator/dimension/Dimension.java | 16 +- .../dimension/DimensionCategory.java | 9 + .../indicator/dimension/DimensionSet.java | 16 +- .../evaluator/CohortDimensionEvaluator.java | 16 +- .../evaluator/DimensionEvaluator.java | 16 +- .../persister/DimensionPersister.java | 9 + .../SerializedDimensionPersister.java | 9 + .../dimension/service/DimensionService.java | 16 +- .../service/DimensionServiceImpl.java | 16 +- .../evaluator/CohortIndicatorEvaluator.java | 16 +- .../evaluator/IndicatorEvaluator.java | 16 +- .../QueryCountIndicatorEvaluator.java | 16 +- .../evaluator/SqlIndicatorEvaluator.java | 16 +- .../persister/IndicatorPersister.java | 16 +- .../SerializedIndicatorPersister.java | 16 +- .../indicator/service/IndicatorService.java | 16 +- .../service/IndicatorServiceImpl.java | 16 +- .../indicator/util/IndicatorUtil.java | 16 +- .../CohortDefinitionEditor.java | 16 +- .../DataSetDefinitionEditor.java | 16 +- .../propertyeditor/IndicatorEditor.java | 16 +- .../propertyeditor/MappedEditor.java | 9 + .../propertyeditor/RenderingModeEditor.java | 9 + .../ReportDefinitionEditor.java | 16 +- .../module/reporting/query/BaseIdSet.java | 16 +- .../module/reporting/query/BaseQuery.java | 16 +- .../module/reporting/query/BaseSqlQuery.java | 16 +- .../reporting/query/CompositionQuery.java | 16 +- .../openmrs/module/reporting/query/IdSet.java | 16 +- .../query/MappedParametersQuery.java | 9 + .../openmrs/module/reporting/query/Query.java | 16 +- .../module/reporting/query/QueryUtil.java | 9 + .../query/encounter/EncounterIdSet.java | 16 +- .../query/encounter/EncounterQueryResult.java | 16 +- .../definition/AllEncounterQuery.java | 16 +- .../definition/AuditEncounterQuery.java | 19 +- .../definition/BasicEncounterQuery.java | 19 +- .../definition/CodedObsForEncounterQuery.java | 19 +- .../definition/CompositionEncounterQuery.java | 16 +- .../ConditionalParameterEncounterQuery.java | 9 + .../encounter/definition/EncounterQuery.java | 16 +- .../MappedParametersEncounterQuery.java | 9 + .../MostRecentEncounterForPatientQuery.java | 16 +- .../NumericObsForEncounterQuery.java | 19 +- .../definition/ObsForEncounterQuery.java | 19 +- .../definition/PatientEncounterQuery.java | 16 +- .../definition/SqlEncounterQuery.java | 16 +- .../evaluator/AllEncounterQueryEvaluator.java | 16 +- .../AuditEncounterQueryEvaluator.java | 19 +- .../BasicEncounterQueryEvaluator.java | 19 +- .../CompositionEncounterQueryEvaluator.java | 16 +- ...ionalParameterEncounterQueryEvaluator.java | 9 + .../evaluator/EncounterQueryEvaluator.java | 16 +- ...ppedParametersEncounterQueryEvaluator.java | 9 + ...centEncounterForPatientQueryEvaluator.java | 16 +- .../ObsForEncounterQueryEvaluator.java | 19 +- .../PatientEncounterQueryEvaluator.java | 16 +- .../evaluator/SqlEncounterQueryEvaluator.java | 16 +- .../SerializedEncounterQueryPersister.java | 16 +- .../service/EncounterQueryService.java | 16 +- .../service/EncounterQueryServiceImpl.java | 16 +- .../evaluator/CompositionQueryEvaluator.java | 16 +- .../module/reporting/query/obs/ObsIdSet.java | 16 +- .../reporting/query/obs/ObsQueryResult.java | 16 +- .../query/obs/definition/AllObsQuery.java | 9 + .../query/obs/definition/BasicObsQuery.java | 9 + .../definition/MappedParametersObsQuery.java | 9 + .../query/obs/definition/ObsQuery.java | 16 +- .../query/obs/definition/PatientObsQuery.java | 9 + .../query/obs/definition/SqlObsQuery.java | 16 +- .../obs/evaluator/AllObsQueryEvaluator.java | 16 +- .../obs/evaluator/BasicObsQueryEvaluator.java | 9 + .../MappedParametersObsQueryEvaluator.java | 9 + .../obs/evaluator/ObsQueryEvaluator.java | 16 +- .../evaluator/PatientObsQueryEvaluator.java | 9 + .../obs/evaluator/SqlObsQueryEvaluator.java | 16 +- .../SerializedObsQueryPersister.java | 16 +- .../query/obs/service/ObsQueryService.java | 16 +- .../obs/service/ObsQueryServiceImpl.java | 16 +- .../reporting/query/person/PersonIdSet.java | 16 +- .../query/person/PersonQueryResult.java | 16 +- .../person/definition/AllPersonQuery.java | 16 +- .../person/definition/PatientPersonQuery.java | 16 +- .../query/person/definition/PersonQuery.java | 16 +- .../person/definition/SqlPersonQuery.java | 16 +- .../evaluator/AllPersonQueryEvaluator.java | 16 +- .../PatientPersonQueryEvaluator.java | 16 +- .../evaluator/PersonQueryEvaluator.java | 16 +- .../evaluator/SqlPersonQueryEvaluator.java | 16 +- .../SerializedPersonQueryPersister.java | 16 +- .../person/service/PersonQueryService.java | 16 +- .../service/PersonQueryServiceImpl.java | 16 +- .../reporting/query/visit/VisitIdSet.java | 9 + .../query/visit/VisitQueryResult.java | 9 + .../visit/definition/ActiveVisitQuery.java | 9 + .../query/visit/definition/AllVisitQuery.java | 16 +- .../visit/definition/BasicVisitQuery.java | 19 +- .../query/visit/definition/VisitQuery.java | 19 +- .../evaluator/ActiveVisitQueryEvaluator.java | 9 + .../evaluator/AllVisitQueryEvaluator.java | 16 +- .../evaluator/BasicVisitQueryEvaluator.java | 19 +- .../visit/evaluator/VisitQueryEvaluator.java | 19 +- .../visit/service/VisitQueryService.java | 9 + .../visit/service/VisitQueryServiceImpl.java | 9 + .../module/reporting/report/Report.java | 9 + .../module/reporting/report/ReportData.java | 16 +- .../module/reporting/report/ReportDesign.java | 16 +- .../report/ReportDesignResource.java | 16 +- .../report/ReportProcessorConfiguration.java | 16 +- .../reporting/report/ReportRequest.java | 9 + .../definition/BaseReportDefinition.java | 16 +- .../PeriodIndicatorReportDefinition.java | 9 + .../report/definition/ReportDefinition.java | 16 +- .../DefaultReportDefinitionEvaluator.java | 16 +- .../evaluator/ReportDefinitionEvaluator.java | 16 +- .../service/ReportDefinitionService.java | 16 +- .../service/ReportDefinitionServiceImpl.java | 9 + .../report/manager/BaseReportManager.java | 19 +- .../report/manager/ReportManager.java | 18 +- .../report/manager/ReportManagerUtil.java | 16 +- .../report/processor/DiskReportProcessor.java | 16 +- .../processor/EmailReportProcessor.java | 16 +- .../processor/LoggingReportProcessor.java | 16 +- .../report/processor/ReportProcessor.java | 16 +- .../renderer/AbstractReportRenderer.java | 16 +- .../renderer/CohortDetailReportRenderer.java | 16 +- .../report/renderer/CsvReportRenderer.java | 16 +- .../renderer/DelimitedTextReportRenderer.java | 16 +- .../renderer/ExcelTemplateRenderer.java | 16 +- .../renderer/IndicatorReportRenderer.java | 16 +- .../renderer/InteractiveReportRenderer.java | 9 + .../report/renderer/RenderingException.java | 16 +- .../report/renderer/RenderingMode.java | 16 +- .../report/renderer/ReportDesignRenderer.java | 16 +- .../report/renderer/ReportRenderer.java | 16 +- .../renderer/ReportRendererException.java | 16 +- .../renderer/ReportTemplateRenderer.java | 16 +- .../renderer/SimpleHtmlReportRenderer.java | 16 +- .../report/renderer/TextTemplateRenderer.java | 16 +- .../report/renderer/TsvReportRenderer.java | 16 +- .../report/renderer/XlsReportRenderer.java | 9 + .../report/renderer/XmlReportRenderer.java | 16 +- .../template/GroovyTemplateEngine.java | 16 +- .../renderer/template/TemplateEngine.java | 16 +- .../template/TemplateEngineManager.java | 16 +- .../template/TemplateEvaluationException.java | 16 +- .../template/VelocityTemplateEngine.java | 16 +- .../report/service/ReportService.java | 16 +- .../report/service/ReportServiceImpl.java | 9 + .../report/service/db/HibernateReportDAO.java | 16 +- .../report/service/db/ReportDAO.java | 16 +- .../report/task/DeleteOldReportsTask.java | 9 + .../report/task/PersistCachedReportsTask.java | 9 + .../task/QueueScheduledReportsTask.java | 9 + .../reporting/report/task/ReportingTask.java | 9 + .../report/task/ReportingTimerTask.java | 9 + .../report/task/RunQueuedReportsTask.java | 9 + .../util/PeriodIndicatorReportUtil.java | 9 + .../reporting/report/util/ReportUtil.java | 9 + .../report/util/SqlScriptParser.java | 9 + .../reporting/report/util/SqlUtils.java | 16 +- ...CalculationRegistrationShortConverter.java | 9 + .../serializer/CohortDefinitionConverter.java | 9 + .../DataSetDefinitionConverter.java | 9 + .../serializer/DimensionConverter.java | 9 + .../EncounterDataDefinitionConverter.java | 9 + .../serializer/EncounterQueryConverter.java | 9 + .../serializer/IndicatorConverter.java | 9 + .../serializer/ObsQueryConverter.java | 9 + .../PatientDataDefinitionConverter.java | 9 + .../PersonDataDefinitionConverter.java | 9 + .../serializer/PersonQueryConverter.java | 9 + .../serializer/ReportDefinitionConverter.java | 9 + .../serializer/ReportingSerializer.java | 9 + .../serializer/ReportingShortConverter.java | 9 + .../reporting/template/HandlebarsHelpers.java | 9 + .../reporting/template/TemplateFactory.java | 9 + .../validator/CohortDefinitionValidator.java | 9 + .../renderers/AbstractWebReportRenderer.java | 16 +- .../web/renderers/DefaultWebRenderer.java | 16 +- .../web/renderers/LogicReportWebRenderer.java | 16 +- .../web/renderers/WebReportRenderer.java | 16 +- license-header.txt | 7 + ...CompositionCohortDefinitionController.java | 9 + .../ManageCohortDefinitionsController.java | 9 + .../SqlCohortDefinitionController.java | 9 + .../web/controller/AjaxController.java | 9 + .../web/controller/DashboardController.java | 9 + .../EditAnnotatedDefinitionController.java | 9 + .../GetMappedAsStringController.java | 9 + ...InvalidSerializedDefinitionController.java | 9 + .../ManageDefinitionsController.java | 9 + .../ManageIndicatorsController.java | 9 + .../QueryParameterFormController.java | 16 +- .../RenderLogicDataSetController.java | 16 +- .../RenderReportFormController.java | 9 + .../controller/ReportDashboardController.java | 9 + ...sitionPatientDataDefinitionController.java | 16 +- .../controller/SqlDefinitionController.java | 9 + .../web/controller/ViewPortletController.java | 9 + .../AnnotatedDefinitionMappingHandler.java | 16 +- ...ossTabDataSetDefinitionMappingHandler.java | 16 +- .../CohortDefinitionMappingHandler.java | 16 +- ...ensionDataSetDefinitionMappingHandler.java | 16 +- ...ositionCohortDefinitionMappingHandler.java | 16 +- .../DataSetDefinitionMappingHandler.java | 16 +- .../mapping/DefinitionMappingHandler.java | 16 +- .../LogicDataSetDefinitionMappingHandler.java | 16 +- ...ameterDataSetDefinitionMappingHandler.java | 16 +- ...atientDataSetDefinitionMappingHandler.java | 16 +- ...onPatientDataDefinitionMappingHandler.java | 16 +- .../SqlCohortDefinitionMappingHandler.java | 16 +- .../SqlDataDefinitionMappingHandler.java | 16 +- .../SqlDataSetDefinitionMappingHandler.java | 16 +- .../mapping/SqlQueryMappingHandler.java | 16 +- ...mitedTextReportRendererMappingHandler.java | 16 +- .../ExcelTemplateRendererMappingHandler.java | 17 +- ...IndicatorReportRendererMappingHandler.java | 17 +- .../renderers/RendererMappingHandler.java | 16 +- ...impleHtmlReportRendererMappingHandler.java | 17 +- .../TextTemplateRendererMappingHandler.java | 17 +- .../XlsReportRendererMappingHandler.java | 17 +- .../XmlReportRendererMappingHandler.java | 17 +- .../BaseCohortIndicatorPortletController.java | 9 + ...mensionSpecificationPortletController.java | 9 + .../ErrorReportsPortletController.java | 9 + .../MappedPropertyPortletController.java | 9 + .../MappedPropertyPortletFormController.java | 9 + ...erationParameterEditPortletController.java | 16 +- .../portlet/ParameterPortletController.java | 9 + .../ParameterPortletFormController.java | 9 + .../ParameterizablePortletController.java | 9 + .../ParameterizablePortletFormController.java | 9 + .../QueuedReportsPortletController.java | 9 + .../portlet/ReportDesignFormController.java | 9 + .../ReportDesignPortletController.java | 9 + .../ReportHistoryPortletController.java | 9 + .../portlet/ReportListPortletController.java | 9 + .../ReportProcessorFormController.java | 9 + .../ReportProcessorPortletController.java | 9 + .../portlet/ReportingPortletController.java | 9 + .../portlet/RunReportPortletController.java | 9 + .../SavedReportsPortletController.java | 9 + .../ScheduledReportsPortletController.java | 9 + .../web/datasets/CohortDataSetEditor.java | 9 + ...ortIndicatorAndDimensionDataSetEditor.java | 9 + .../web/datasets/LogicDataSetEditor.java | 16 +- .../datasets/ManageDatasetsController.java | 9 + .../datasets/MultiParameterDataSetEditor.java | 9 + .../web/datasets/PatientDataSetEditor.java | 16 +- .../web/datasets/SqlDataSetEditor.java | 9 + ...itCohortDefinitionDimensionController.java | 9 + .../ManageDimensionsController.java | 9 + .../web/extension/GutterListExt.java | 9 + .../web/extension/ManageAdminListExt.java | 9 + .../web/extension/RunAdminListExt.java | 9 + .../EditCohortIndicatorController.java | 9 + .../indicator/EditSqlIndicatorController.java | 9 + .../reporting/web/model/IndicatorForm.java | 16 +- .../web/reports/CurrentReportController.java | 9 + .../web/reports/LogicReportController.java | 16 +- .../ManageReportQueuePortletController.java | 9 + .../web/reports/ManageReportsController.java | 16 +- .../ManageScheduledReportsController.java | 16 +- .../PeriodIndicatorReportController.java | 9 + .../reporting/web/reports/ReportEditor.java | 9 + .../web/reports/ReportHistoryController.java | 9 + .../ReportRequestPortletController.java | 16 +- .../web/reports/RunReportFormController.java | 16 +- .../web/reports/RunReportListController.java | 16 +- ...mitedTextReportRendererFormController.java | 16 +- .../ExcelReportRendererFormController.java | 16 +- ...figurableReportRendererFormController.java | 16 +- .../renderers/TextTemplateFormController.java | 16 +- .../reporting/web/taglib/DataSetTag.java | 16 +- .../reporting/web/taglib/DisplayLabelTag.java | 16 +- .../reporting/web/taglib/ForEachTag.java | 16 +- .../reporting/web/taglib/FormatTag.java | 9 + .../reporting/web/taglib/Functions.java | 16 +- .../reporting/web/taglib/TimespanTag.java | 16 +- .../module/reporting/web/util/AjaxUtil.java | 9 + .../reporting/web/util/ParameterUtil.java | 9 + .../web/validator/IndicatorFormValidator.java | 9 + .../reporting/web/widget/AjaxController.java | 9 + .../CalculationRegistrationHandler.java | 16 +- .../handler/CohortDefinitionHandler.java | 16 +- .../handler/DataSetDefinitionHandler.java | 16 +- .../web/widget/handler/DimensionHandler.java | 9 + .../web/widget/handler/IndicatorHandler.java | 16 +- .../web/widget/handler/MappedHandler.java | 16 +- .../handler/PatientDataDefinitionHandler.java | 16 +- .../handler/ReportDefinitionHandler.java | 16 +- .../handler/ReportDesignRendererHandler.java | 16 +- .../handler/ReportDesignResourceHandler.java | 16 +- .../handler/ScriptingLanguageHandler.java | 16 +- 996 files changed, 7342 insertions(+), 7110 deletions(-) create mode 100644 LICENSE create mode 100644 license-header.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..52f07dd23e --- /dev/null +++ b/LICENSE @@ -0,0 +1,401 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + +--------------------- + +Healthcare Disclaimer + +In the United States, or any other jurisdictions where they may apply, the +following additional disclaimer of warranty and limitation of liability are +hereby incorporated into the terms and conditions of MPL 2.0: + +1. No warranties of any kind whatsoever are made as to the results that + You will obtain from relying upon the covered code (or any information + or content obtained by way of the covered code), including but not + limited to compliance with privacy laws or regulations or clinical + care industry standards and protocols. Use of the covered code is not + a substitute for a health care providerÂ’s standard practice or + professional judgment. Any decision with regard to the appropriateness + of treatment, or the validity or reliability of information or content + made available by the covered code, is the sole responsibility of the + health care provider. Consequently, it is incumbent upon each health + care provider to verify all medical history and treatment plans with + each patient. + +2. Under no circumstances and under no legal theory, whether tort + (including negligence), contract, or otherwise, shall any Contributor, + or anyone who distributes Covered Software as permitted by the + license, be liable to You for any indirect, special, incidental, + consequential damages of any character including, without limitation, + damages for loss of goodwill, work stoppage, computer failure or + malfunction, or any and all other damages or losses, of any nature + whatsoever (direct or otherwise) on account of or associated with the + use or inability to use the covered content (including, without + limitation, the use of information or content made available by the + covered code, all documentation associated therewith, and the failure + of the covered code to comply with privacy laws and regulations or + clinical care industry standards and protocols), even if such party + shall have been informed of the possibility of such damages. + +Copyright (c) OpenMRS Inc. +OpenMRS is a registered trademark and the OpenMRS graphic logo is a trademark of OpenMRS Inc. \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java index 3d097f7fb8..b7f2d861ce 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java index 2e26138e8e..460ba2cf56 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java index 08f11745c3..a65d1fa2ce 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java @@ -1,7 +1,7 @@ -/* +/** * This Source Code Form is subject to the terms of the Mozilla Public License, * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java index 4f88657f45..7a214dd25f 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java index f83787d45f..1f5a014233 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java index b9f3f3eb66..3c344c3f66 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java index 16876a0e39..b83c9cf328 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java index b00f350538..3ec2cb10f7 100644 --- a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java +++ b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java @@ -1,7 +1,7 @@ -/* +/** * This Source Code Form is subject to the terms of the Mozilla Public License, * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java index f36a4f14dd..2354ae0d79 100644 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java index bd8979fab6..8ae4703616 100644 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java index 3c2cd5734a..bd7058d629 100644 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java index 4e0a4d02d9..5dd4336231 100644 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java index a52f73b087..5cbe226399 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/CohortsTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/CohortsTest.java index 5a6758cfbb..d48aa8fe4b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/CohortsTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/CohortsTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java index f1dbee5d2f..e419e97dc3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluatorTest.java index 7eac705b3a..8e46e03490 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AnEvaluatableCohortDefinition.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AnEvaluatableCohortDefinition.java index 4a6c77642c..b5061fc8b7 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AnEvaluatableCohortDefinition.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AnEvaluatableCohortDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.openmrs.module.reporting.cohort.EvaluatedCohort; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java index a0686c729d..a7ec30c3d8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluatorTest.java index 0885f915ae..f84e027cf8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluatorTest.java index 297212de66..4bb0a0e1b4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluatorTest.java index 7d07eeebc2..d7a1ba4c73 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluatorTest.java index ba91762ef9..ff36853b5b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluatorTest.java index a4153042b4..8c81d71f9a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java index 31781560df..cc6d521c7a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluatorTest.java index e49f897d2f..7282b9aea0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluatorTest.java index 6bf5b2f445..d4d8338025 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import static org.hamcrest.core.Is.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluatorTest.java index 26843fd30c..fbcf6ccfd2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluatorTest.java index d69733ca03..5015e6bcdd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluatorTest.java index e2a7a3ad9f..81737a44f3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluatorTest.java index 5ebf31bcdf..e9c5d4ede3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluatorTest.java index 7fe0d8b85e..8a3d490f25 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluatorTest.java index ab2e1ee193..02b888b4bd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluatorTest.java index e229de35a4..a41ab48200 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java index 3c549f50c2..7c902382f6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluatorTest.java index fcb1c64fd3..dc03e71c4c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluatorTest.java index f697eff155..fce60c57fc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluatorTest.java index ec1ec27bac..f6528e6ef5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluatorTest.java index de1a122cf3..94cf966ae3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluatorTest.java index 33f4a6c117..2e55deb021 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluatorTest.java index ab2148986f..3e2b85234b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluatorTest.java index 51c6aab477..af9e268ee6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java index 692de99ac7..296a0d48d3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java index 4901e72b0f..641aa69a77 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.library; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/service/BaseCohortDefinitionServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/service/BaseCohortDefinitionServiceTest.java index b96586b1e8..dee399e8dc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/service/BaseCohortDefinitionServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/service/BaseCohortDefinitionServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.service; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceTest.java index 6e0f954af1..455f63609d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.query.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/AgeTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/AgeTest.java index 500fefbccd..bc21ac7fd2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/AgeTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/AgeTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.common; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/DateRangeTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/DateRangeTest.java index 0756c52a2d..ffb83aa77b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/DateRangeTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/DateRangeTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import java.util.Date; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/DateUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/DateUtilTest.java index 7e8a7b369c..ac2566e8e5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/DateUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/DateUtilTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/DelimitedKeyComparatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/DelimitedKeyComparatorTest.java index c39a67cc5a..6a5013a3e6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/DelimitedKeyComparatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/DelimitedKeyComparatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelBuilderTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelBuilderTest.java index 40d461c3c9..840fcfcd76 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelBuilderTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelBuilderTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelUtilTest.java index 6e53ad5f26..333692126e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ExcelUtilTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/FractionTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/FractionTest.java index 4082157505..d6f5547768 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/FractionTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/FractionTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ObjectUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ObjectUtilTest.java index 2e041687cc..169df9d80c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ObjectUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ObjectUtilTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ReflectionUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ReflectionUtilTest.java index dbd9ae4d7d..4ca680345a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ReflectionUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ReflectionUtilTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import static org.hamcrest.Matchers.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ReportingMatchers.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ReportingMatchers.java index 91b9880157..e1a165f7b3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ReportingMatchers.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ReportingMatchers.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.common; import org.hamcrest.BaseMatcher; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/TestUtil.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/TestUtil.java index e227196715..5298bdd833 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/TestUtil.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/TestUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import java.io.BufferedReader; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/JoinDataDefinitionTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/JoinDataDefinitionTest.java index 9b70d4fd57..79380fa6a5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/JoinDataDefinitionTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/JoinDataDefinitionTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeConverterTest.java index 99cfdaa4b2..dd0c764810 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeConverterTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeRangeConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeRangeConverterTest.java index f9ce94061b..70bb59aad7 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeRangeConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AgeRangeConverterTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AttributeValueConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AttributeValueConverterTest.java index 45d3606de9..138b77ba42 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AttributeValueConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/AttributeValueConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateConverterTest.java index e5db522fd5..dbe0ee81c2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverterTest.java index 70cdbf00c8..44aecb6366 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import java.util.Date; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BooleanConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BooleanConverterTest.java index 4390af0eb9..5b880d8976 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BooleanConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/BooleanConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/DateConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/DateConverterTest.java index 3f8302183c..e396302d74 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/DateConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/DateConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import java.text.SimpleDateFormat; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ListConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ListConverterTest.java index dee1615f14..4c6f25f3a8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ListConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ListConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/MapConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/MapConverterTest.java index eb665cbe8e..52756bc564 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/MapConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/MapConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/NullValueConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/NullValueConverterTest.java index 38848b61cf..abb32cb929 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/NullValueConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/NullValueConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverterTest.java index 5d413affbe..f0e987ad75 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverterTest.java index 39853b237b..5ca08b9196 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import static org.hamcrest.CoreMatchers.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonAddressConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonAddressConverterTest.java index c29a028015..35a40f686d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonAddressConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonAddressConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonNameConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonNameConverterTest.java index 1ca290f52d..ec8fceb17d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonNameConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PersonNameConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java index 19cbf5d567..c6661638c0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import static org.hamcrest.core.Is.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PropertyConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PropertyConverterTest.java index d2525e1a4d..c60a1d2a60 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PropertyConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PropertyConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/StringConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/StringConverterTest.java index ef657b776c..ffc0bb3902 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/StringConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/StringConverterTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluatorTest.java index 75ecd633f2..cf48a14919 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluatorTest.java index 9a70d88c6f..76f89d5c1a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluatorTest.java index b1ee1c090f..f6e2885514 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluatorTest.java index 014cfa12dd..f87380ac77 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluatorTest.java index b5f0b4fc03..e86c8815ef 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java index 2bcedad330..1d2e5cd9fd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluatorTest.java index 7de4cf556a..70e7d29163 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java index a485c9538e..8fe280df50 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java index c4fcb4f74d..72f6bce10e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluatorTest.java index 8ba4175eff..df69f7804d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluatorTest.java index 8dfe885b4b..349d0c34de 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluatorTest.java index 08d75ad006..dd79996df4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluatorTest.java index 93ba17cf48..9173475efc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibraryTest.java index addcb14124..6f06492f21 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibraryTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.library; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImplTest.java index 15cbaeac72..030cdf0a2a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluatorTest.java index b60d42e964..985663064f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluatorTest.java index 794a2cf894..dec78b4116 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluatorTest.java index b49614cf89..137fffcfe2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluatorTest.java index 35c8779e88..6c0d14a7bf 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluatorTest.java index e2a09faa78..672768e78e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsEvaluatorTest.java index 9a8f41af83..530b7ce18c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluatorTest.java index 0482b3ff35..256e3a61ef 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluatorTest.java index d4f5dd0a8f..02bfe144e6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluatorTest.java index 4400a69540..501fef1c7c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.patient.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluatorTest.java index d5f83495f7..58f6f164da 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluatorTest.java index f326ee2054..ced30955e1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluatorTest.java index 7199ad1d98..0aee3e3939 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluatorTest.java index 7049db7e6c..b4e13060c9 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluatorTest.java index c0ae3ee76d..8cd6eaa8b3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java index 479607b7c3..d79c1537c1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluatorTest.java index 8570df6ab3..4309e9737d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluatorTest.java index ac721fb34c..3e9f6959c3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluatorTest.java index 7d82270e96..ad404b526f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluatorTest.java index 514c798f0b..9484a687bc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluatorTest.java index b247030920..19b9e0caa1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataEvaluatorTest.java index ff7cb40769..fa048c1ff0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluatorTest.java index 13e8227df3..048c9c1f7b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/TestPatientCalculation.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/TestPatientCalculation.java index 2c6e244ba6..81344cb03e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/TestPatientCalculation.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/TestPatientCalculation.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibraryTest.java index 0e91a7301c..c0e36907cd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibraryTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.patient.library; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java index 30157b957d..4cd21f1535 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluatorTest.java index 30feab5fa6..8e190af39d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluatorTest.java index 8affd45af0..e86fc3d04f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluatorTest.java index bc4c5ad9e9..759234b847 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluatorTest.java index cc65e47488..4e3b111cba 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluatorTest.java index 5b528c9ca2..3c4673e0e8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluatorTest.java index bb6166a783..86602e2fa5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluatorTest.java index da1c58b75d..fc6d52c45a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluatorTest.java index 6b0c9d866e..38c4bba52d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluatorTest.java index ee4255e01c..3f32c3e3c3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluatorTest.java index 041e7ebfb8..c2f742a9bd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluatorTest.java index f6e46d9ae8..d83e664a83 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluatorTest.java index 3ed234ca1f..0c11dd8643 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluatorTest.java index 9060f8b4e4..bd452f52b5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImplTest.java index 6c0d37a8b1..d3d532008c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluatorTest.java index d4a222a751..4208c7070f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java index de3d20696e..a9cd62c794 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluatorTest.java index b05285d06c..94aee19532 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluatorTest.java index 23919796e9..c46eb67e98 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluatorTest.java index e4baf10fc7..8b6ff32f17 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import static org.hamcrest.core.Is.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java index c9dbab89b3..5bc097b695 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibraryTest.java index c6d6581f5b..8e4a0b7b5e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.library; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/AnEvaluatableDataSetDefinition.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/AnEvaluatableDataSetDefinition.java index 821d14cd32..0356c5817e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/AnEvaluatableDataSetDefinition.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/AnEvaluatableDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.openmrs.module.reporting.dataset.DataSet; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortCrossTabDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortCrossTabDataSetEvaluatorTest.java index e83bc39709..22fd375df5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortCrossTabDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortCrossTabDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluatorTest.java index bdaf403346..073f4d7874 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import java.util.Date; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluatorTest.java index 3e039d4b23..85572c216b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.hamcrest.BaseMatcher; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluatorTest.java index bd5c17cc7c..8f8b6bcdf3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluatorTest.java index ff1d720b4d..c385b959df 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluatorTest.java index 1d6acc6d56..7e3b88d661 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import static org.hamcrest.core.Is.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluatorTest.java index 81da12f69d..b3e425070e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java index b51c7e0eae..20835efb60 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java index 75196cb357..eabc956409 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MySqlDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MySqlDataSetEvaluatorTest.java index 7e1f124b42..e3ea510f0f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MySqlDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MySqlDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluatorTest.java index cfdd5587a9..cb18cdba3f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import static org.hamcrest.Matchers.containsInAnyOrder; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluatorTest.java index 3626279237..9fa2d74b51 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PersonDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PersonDataSetEvaluatorTest.java index 175a9c0a99..dc4be26c49 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PersonDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/PersonDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java index a2297d185d..eb6a55594c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.lang.time.DateUtils; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluatorTest.java index 16b5a68b4c..e9d2ebe15d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluatorTest.java index 202cf92f0a..6e6c42217f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluatorTest.java index f49e118d56..fc894892b1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluatorTest.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverterTest.java index e5bee05518..6b19801eea 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverterTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.converter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibrariesComponentTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibrariesComponentTest.java index bbe0ce82d6..12a1a80048 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibrariesComponentTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibrariesComponentTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibraryTest.java index 8064dcd256..3eb71bc779 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java index 92de2eed94..b2b1081683 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java index 11d444da31..fb9aac7fb5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.core.Is.is; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java index 7dac0fe1db..d522dbdcd0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java index c8745e20d4..f5cef2f82e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java index d64d6c32c0..907dd52052 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java index 3d4843ceb1..3501dde203 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/service/DefinitionServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/service/DefinitionServiceTest.java index 5340408c20..993641f0c8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/service/DefinitionServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/service/DefinitionServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.service; import static org.hamcrest.Matchers.empty; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/CachingCohortDefinitionTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/CachingCohortDefinitionTest.java index 97e54ea0d4..7eaa093abc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/CachingCohortDefinitionTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/CachingCohortDefinitionTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationContextTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationContextTest.java index 1e08d029fe..562782eee4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationContextTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationContextTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java index 33f8baae2f..4278709a09 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.evaluation; import org.apache.log4j.Appender; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/parameter/ParameterUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/parameter/ParameterUtilTest.java index f0755842c6..5a3f3a03cb 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/parameter/ParameterUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/parameter/ParameterUtilTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.parameter; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilderTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilderTest.java index 8770acff9e..058b3f9cfc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilderTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilderTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.querybuilder; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilderTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilderTest.java index e7e1c7ce43..7bd145eab1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilderTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilderTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.querybuilder; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceTest.java index e9dce1894d..6fae1d5b33 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation.service; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/CohortIndicatorDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/CohortIndicatorDataSetEvaluatorTest.java index c997dab78f..01188ea49d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/CohortIndicatorDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/CohortIndicatorDataSetEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator; import java.util.Collections; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/PeriodIndicatorReportTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/PeriodIndicatorReportTest.java index 950024fdb7..56d776cd07 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/PeriodIndicatorReportTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/PeriodIndicatorReportTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/QueryCountIndicatorEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/QueryCountIndicatorEvaluatorTest.java index 62bc43a256..f528157aab 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/QueryCountIndicatorEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/QueryCountIndicatorEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/SqlIndicatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/SqlIndicatorTest.java index 9d6b5a6d20..b0374f0443 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/SqlIndicatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/SqlIndicatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/aggregation/AggregationTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/aggregation/AggregationTest.java index c35f8751a8..2836bfdb9e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/aggregation/AggregationTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/aggregation/AggregationTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.aggregation; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/util/IndicatorUtilTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/util/IndicatorUtilTest.java index 500a83b8fc..b8f3da7fdb 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/indicator/util/IndicatorUtilTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/indicator/util/IndicatorUtilTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.util; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/logic/GenderRule.java b/api-tests/src/test/java/org/openmrs/module/reporting/logic/GenderRule.java index 8f9732faad..2b478f1990 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/logic/GenderRule.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/logic/GenderRule.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.logic; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicContext.java b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicContext.java index 46303d4001..bf9c84e1de 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicContext.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.logic; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicCriteria.java b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicCriteria.java index 44a4ca0520..2a2b810e63 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicCriteria.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicCriteria.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.logic; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicService.java b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicService.java index 7c00485b66..b4edacf9a7 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicService.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/logic/MockLogicService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.logic; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluatorTest.java index e0ea0e4dc2..43e8f85e4c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluatorTest.java index 3bdc0bc919..bc72ceafc2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluatorTest.java index 93f3ce9444..0540a2fa7e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluatorTest.java index cd65a44fa5..17e1e6032c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.apache.commons.logging.Log; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluatorTest.java index 0b182617f1..0a33358472 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java index 82f0232d56..091968460d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluatorTest.java index 0280273f41..ed29b899c0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluatorTest.java index 1df07c4f8a..0b99cec1c4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluatorTest.java index 95075273e6..70a426410a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImplTest.java index 5d5dd238cb..e92c7cffa8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluatorTest.java index 4ce4971606..1e69dc38d3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluatorTest.java index 53c7a2d1be..b2f47f881c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java index 5522646b4e..1df50abe27 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImplTest.java index 497517e47a..9355ea9521 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluatorTest.java index 9356567f82..d7589052ba 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluatorTest.java index 941b7755ee..cec3431b9a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.person.evaluator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluatorTest.java index b9b6287e8c..bda0e35b02 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluatorTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImplTest.java index dc64330d6a..9977db9bbb 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java index 8d13a74e28..b42867324e 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit.evaluator; import org.junit.Before; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java index b40265b942..89cb8a84a6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.visit.evaluator; import static org.openmrs.module.reporting.common.ReportingMatchers.hasExactlyIds; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/ReportRequestTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/ReportRequestTest.java index 5aa4cf8dbe..d25058bb86 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/ReportRequestTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/ReportRequestTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImplTest.java index 6711035ee4..13561a3307 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImplTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition.service; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRendererTest.java index 4abf4b2c77..6d06b87a65 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRendererTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CsvReportRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CsvReportRendererTest.java index d0b02806af..b53f70156a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CsvReportRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/CsvReportRendererTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRendererTest.java index cb1e20263d..522a5b7128 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRendererTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.report.renderer; import org.apache.commons.io.IOUtils; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRendererTest.java index 54f95b9d67..18c8255ec3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRendererTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ReportDesignRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ReportDesignRendererTest.java index 6ba5eac190..1a21c9347c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ReportDesignRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/ReportDesignRendererTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.renderer; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java index 1dd55b7332..ae4e3f43a0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/XlsReportRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/XlsReportRendererTest.java index a91a9e4945..7caa69d197 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/XlsReportRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/XlsReportRendererTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/MysqlReportServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/MysqlReportServiceTest.java index 2213c2cc4b..9f21b63574 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/MysqlReportServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/MysqlReportServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.service; import java.util.List; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java index fcd2cbc5d1..fcd90d4f4b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.service; import org.apache.commons.io.FileUtils; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/TestReportProcessor.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/TestReportProcessor.java index 8c5f55e3b0..dcee4f3345 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/TestReportProcessor.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/TestReportProcessor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.service; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/db/PropertiesTypeTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/db/PropertiesTypeTest.java index 68aad5b4d8..de842ac55d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/db/PropertiesTypeTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/db/PropertiesTypeTest.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.report.service.db; import org.junit.Test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlScriptParserTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlScriptParserTest.java index 9fb2186293..c17e6ea3ec 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlScriptParserTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlScriptParserTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.util; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlUtilsTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlUtilsTest.java index a2a601f0f7..09cb8ee186 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlUtilsTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/util/SqlUtilsTest.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.util; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/serializer/ReportingSerializerTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/serializer/ReportingSerializerTest.java index e2fffa1ccc..7179027286 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/serializer/ReportingSerializerTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/serializer/ReportingSerializerTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/template/HandlebarsHelpersTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/template/HandlebarsHelpersTest.java index 40a884c0c7..25e50e41c0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/template/HandlebarsHelpersTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/template/HandlebarsHelpersTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.template; import com.github.jknack.handlebars.Options; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/test/AuthenticatedUserTestHelper.java b/api-tests/src/test/java/org/openmrs/module/reporting/test/AuthenticatedUserTestHelper.java index a685793cba..425dbbb7dc 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/test/AuthenticatedUserTestHelper.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/test/AuthenticatedUserTestHelper.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.test; import org.junit.After; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/test/CustomMessageSource.java b/api-tests/src/test/java/org/openmrs/module/reporting/test/CustomMessageSource.java index 3e08a8849a..7f7c2e63e0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/test/CustomMessageSource.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/test/CustomMessageSource.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.test; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/BaseObsCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/BaseObsCohortDefinitionValidatorTest.java index b43433e1a8..4f331898ab 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/BaseObsCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/BaseObsCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/CompositionCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/CompositionCohortDefinitionValidatorTest.java index 13e7e26f98..bb3fcf356c 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/CompositionCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/CompositionCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.HashMap; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InProgramCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InProgramCohortDefinitionValidatorTest.java index 00388a4c48..16504b11f1 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InProgramCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InProgramCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InStateCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InStateCohortDefinitionValidatorTest.java index 3bb3914962..cf0a6fe5aa 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InStateCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InStateCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InverseCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InverseCohortDefinitionValidatorTest.java index 095b8dfdf1..8488dd3a27 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/InverseCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/InverseCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/LogicCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/LogicCohortDefinitionValidatorTest.java index 9ea7113d9d..2c20eb860a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/LogicCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/LogicCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/PatientStateCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/PatientStateCohortDefinitionValidatorTest.java index 676d4af11f..a79e2d54a7 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/PatientStateCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/PatientStateCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/ProgramEnrollmentCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/ProgramEnrollmentCohortDefinitionValidatorTest.java index 4642efe0dc..31a01e311f 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/ProgramEnrollmentCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/ProgramEnrollmentCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.ArrayList; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/SqlCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/SqlCohortDefinitionValidatorTest.java index e818937f0a..978e8b8071 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/SqlCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/SqlCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import org.junit.Assert; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/validator/StaticCohortDefinitionValidatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/validator/StaticCohortDefinitionValidatorTest.java index 87eeb582ef..1fd0587f33 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/validator/StaticCohortDefinitionValidatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/validator/StaticCohortDefinitionValidatorTest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import org.junit.Assert; diff --git a/api/src/main/java/org/openmrs/module/reporting/ExceptionUtil.java b/api/src/main/java/org/openmrs/module/reporting/ExceptionUtil.java index f8393ad4e8..68432192d7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ExceptionUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/ExceptionUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting; diff --git a/api/src/main/java/org/openmrs/module/reporting/IllegalDatabaseAccessException.java b/api/src/main/java/org/openmrs/module/reporting/IllegalDatabaseAccessException.java index 5f606a6c3a..7adbbdcd3a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/IllegalDatabaseAccessException.java +++ b/api/src/main/java/org/openmrs/module/reporting/IllegalDatabaseAccessException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting; diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java b/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java index f5d9176be9..27503d63ad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting; diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingException.java b/api/src/main/java/org/openmrs/module/reporting/ReportingException.java index d6d2b67781..74726d7987 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingException.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting; diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java index 8a020ccfb7..beb2c4e90c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting; diff --git a/api/src/main/java/org/openmrs/module/reporting/calculation/DataCalculation.java b/api/src/main/java/org/openmrs/module/reporting/calculation/DataCalculation.java index cc3b81dfc4..86c0bcfaf2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/calculation/DataCalculation.java +++ b/api/src/main/java/org/openmrs/module/reporting/calculation/DataCalculation.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculation.java b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculation.java index 49c95944ce..aa402a0754 100644 --- a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculation.java +++ b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculation.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationProvider.java b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationProvider.java index 609a431a0e..b3bdf13d4d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationProvider.java +++ b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationProvider.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationSuggestion.java b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationSuggestion.java index 0cb13d1642..7ef1b9dee5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationSuggestion.java +++ b/api/src/main/java/org/openmrs/module/reporting/calculation/PatientDataCalculationSuggestion.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api/src/main/java/org/openmrs/module/reporting/calculation/ReportingCalculationUtil.java b/api/src/main/java/org/openmrs/module/reporting/calculation/ReportingCalculationUtil.java index 6b7b9a637b..c3df68d02e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/calculation/ReportingCalculationUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/calculation/ReportingCalculationUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.calculation; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/CohortUtil.java b/api/src/main/java/org/openmrs/module/reporting/cohort/CohortUtil.java index 43c4ba8596..b78a500e7c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/CohortUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/CohortUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/Cohorts.java b/api/src/main/java/org/openmrs/module/reporting/cohort/Cohorts.java index 13b1e1a1dd..fb5c4ce360 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/Cohorts.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/Cohorts.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/EvaluatedCohort.java b/api/src/main/java/org/openmrs/module/reporting/cohort/EvaluatedCohort.java index 26b39ff904..271497d525 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/EvaluatedCohort.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/EvaluatedCohort.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/PatientIdSet.java b/api/src/main/java/org/openmrs/module/reporting/cohort/PatientIdSet.java index d6b8175487..28a7d3927c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/PatientIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/PatientIdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AgeCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AgeCohortDefinition.java index 1554e4b829..86743d5df9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AgeCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AgeCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AllPatientsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AllPatientsCohortDefinition.java index db2a969a59..e66bb59941 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AllPatientsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/AllPatientsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseCohortDefinition.java index 3c8a33ad73..39560627a8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseObsCohortDefinition.java index 52c7fd4bc9..a8fe9c13b1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BaseObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java index 41a5353c42..78d0f515ff 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CodedObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CodedObsCohortDefinition.java index 0c69b10606..7c72222ef1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CodedObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CodedObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CohortDefinition.java index 19a6ba50e4..217dca4b75 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CompositionCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CompositionCohortDefinition.java index 053f07629f..9431a53466 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CompositionCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/CompositionCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionalParameterCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionalParameterCohortDefinition.java index 4dc943824e..df05ed80bf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionalParameterCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionalParameterCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DateObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DateObsCohortDefinition.java index 75bedd5bd6..68066debf4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DateObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DateObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DefinitionLibraryCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DefinitionLibraryCohortDefinition.java index 1cc417ad61..0c316c5678 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DefinitionLibraryCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DefinitionLibraryCohortDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterCohortDefinition.java index 0eefd97a81..8711a0217b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterWithCodedObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterWithCodedObsCohortDefinition.java index 4e838fb474..64ab77ffe0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterWithCodedObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EncounterWithCodedObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EvaluatableCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EvaluatableCohortDefinition.java index 15adb4c212..ff32613266 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EvaluatableCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/EvaluatableCohortDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition; import org.openmrs.module.reporting.cohort.EvaluatedCohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/GenderCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/GenderCohortDefinition.java index ef8087128c..3fa5a4760f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/GenderCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/GenderCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InProgramCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InProgramCohortDefinition.java index 341b712939..8437180f29 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InProgramCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InProgramCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InStateCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InStateCohortDefinition.java index c108472fb6..cf00ee1eac 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InStateCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InStateCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InverseCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InverseCohortDefinition.java index 7d113e0263..6d0f90cf1c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InverseCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/InverseCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/LogicCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/LogicCohortDefinition.java index 762da227d4..d82538ae45 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/LogicCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/LogicCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/MappedParametersCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/MappedParametersCohortDefinition.java index d35c0cdaca..571cc52d5a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/MappedParametersCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/MappedParametersCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/NumericObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/NumericObsCohortDefinition.java index 12afcf5e11..6630599621 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/NumericObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/NumericObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ObsInEncounterCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ObsInEncounterCohortDefinition.java index 5f089a72a8..424b1f86ab 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ObsInEncounterCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ObsInEncounterCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/OptionalParameterCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/OptionalParameterCohortDefinition.java index d2f3077549..748e85c34f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/OptionalParameterCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/OptionalParameterCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientIdentifierCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientIdentifierCohortDefinition.java index 93e46c4421..2b20e44711 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientIdentifierCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientIdentifierCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientStateCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientStateCohortDefinition.java index 000e74f299..732b56a3b9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientStateCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PatientStateCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PersonAttributeCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PersonAttributeCohortDefinition.java index c8342896a4..93d31eb586 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PersonAttributeCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PersonAttributeCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PresenceOrAbsenceCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PresenceOrAbsenceCohortDefinition.java index 6b5aa69dd3..efc2243936 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PresenceOrAbsenceCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/PresenceOrAbsenceCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ProgramEnrollmentCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ProgramEnrollmentCohortDefinition.java index 9ee95c3506..a994167649 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ProgramEnrollmentCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ProgramEnrollmentCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ScriptedCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ScriptedCohortDefinition.java index 20ca013247..969ae5ba2c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ScriptedCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ScriptedCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/SqlCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/SqlCohortDefinition.java index 2a3c250067..f738e2bcc9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/SqlCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/SqlCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/StaticCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/StaticCohortDefinition.java index b4736ac1e1..ce7c168c9c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/StaticCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/StaticCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/TextObsCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/TextObsCohortDefinition.java index f463764ae9..15efad1a40 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/TextObsCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/TextObsCohortDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/VisitCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/VisitCohortDefinition.java index 204594f59a..e7c60f2f4f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/VisitCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/VisitCohortDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluator.java index 09ff96283f..fb375a6d15 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluator.java index 7431ef3f51..1dbca99df9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/AllPatientsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BaseObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BaseObsCohortDefinitionEvaluator.java index 02f604492a..81f961700d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BaseObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BaseObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java index 82bc8d4535..341b2db3a5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluator.java index b034f8e8db..07f50f088d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CodedObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CohortDefinitionEvaluator.java index 08e2e166c8..6fa4c80af1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluator.java index 1440030e9e..53e1fdd761 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/CompositionCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluator.java index 39878395cc..3fb1c856ce 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionalParameterCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluator.java index 58c8e68597..621a7aca52 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DateObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluator.java index 85b01d83f6..ec7829ed1b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DefinitionLibraryCohortDefinitionEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluator.java index 01cd33b92c..39ff298bf3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluator.java index 3984937bd8..e6b56c4c4c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterWithCodedObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluator.java index cd236ae39d..73ed824cee 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/EvaluatableCohortDefinitionEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluator.java index ff7b472afc..455460a425 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/GenderCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluator.java index f744785487..77212d6486 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InProgramCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluator.java index 6c0ff8af67..1b739ac93d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InStateCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluator.java index c15541f28b..2648dcde72 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/InverseCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/LogicCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/LogicCohortDefinitionEvaluator.java index 4e98706a60..b839988676 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/LogicCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/LogicCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluator.java index 7fbbff2dcc..d8021a3ae3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/MappedParametersCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluator.java index ac97e790f8..651b391234 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/NumericObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ObsInEncounterCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ObsInEncounterCohortDefinitionEvaluator.java index 7e36aa4e7c..bc0ba345b1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ObsInEncounterCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ObsInEncounterCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluator.java index 4806b30380..677cc59473 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/OptionalParameterCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluator.java index 3814a9e27c..5d2fb90a66 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluator.java index 8bf2abded2..7bc35d7613 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientStateCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluator.java index 6ab979c446..367c083727 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PersonAttributeCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluator.java index 8951726928..808e30fee4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/PresenceOrAbsenceCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluator.java index db716fe8e8..697a2e1ef0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ProgramEnrollmentCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluator.java index 16c6add5d7..8cafc34e01 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ScriptedCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluator.java index 40773899a3..e1faa0dce5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/SqlCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/StaticCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/StaticCohortDefinitionEvaluator.java index b42fec74c8..a6257ed5b0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/StaticCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/StaticCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluator.java index 878d82d142..f7f044441c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/TextObsCohortDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluator.java index 9bfab6d77f..027ea1d3f4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.evaluator; import org.openmrs.Cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/handler/SqlCohortDefinitionSaveHandler.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/handler/SqlCohortDefinitionSaveHandler.java index 7fc778b15d..05809f8079 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/handler/SqlCohortDefinitionSaveHandler.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/handler/SqlCohortDefinitionSaveHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionHistory.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionHistory.java index f1bfcf1e43..8f919fa1b2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionHistory.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionHistory.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.history; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionSearchHistory.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionSearchHistory.java index 7b2d13c32c..6dba79d342 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionSearchHistory.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/history/CohortDefinitionSearchHistory.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.history; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java index 0fbd7458a5..50e909e9ce 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.cohort.definition.library; import org.openmrs.EncounterType; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/CohortDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/CohortDefinitionPersister.java index 422f54c30c..5b59eb3268 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/CohortDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/CohortDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/MockCohortDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/MockCohortDefinitionPersister.java index a1a1634dc1..c51ec72d5b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/MockCohortDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/MockCohortDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/SerializedCohortDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/SerializedCohortDefinitionPersister.java index 4182050d1a..34d4371b38 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/SerializedCohortDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/SerializedCohortDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/StaticCohortDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/StaticCohortDefinitionPersister.java index 8d0879a4d2..d46b7dfc92 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/StaticCohortDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/persister/StaticCohortDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionService.java index e06c0a75f0..417eedd5d3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionServiceImpl.java index 6a460c5a7a..a2fbc0fe46 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/service/CohortDefinitionServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortExpressionParser.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortExpressionParser.java index d9d4d0b457..8b3121989b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortExpressionParser.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortExpressionParser.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.util; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortFilter.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortFilter.java index d6caed7df5..6a5fb49bbe 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortFilter.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/util/CohortFilter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.definition.util; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/CohortQueryDAO.java b/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/CohortQueryDAO.java index fcf435c336..bbe3e2a204 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/CohortQueryDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/CohortQueryDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.query.db; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/hibernate/HibernateCohortQueryDAO.java b/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/hibernate/HibernateCohortQueryDAO.java index 2180555a0c..390f69ba77 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/hibernate/HibernateCohortQueryDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/query/db/hibernate/HibernateCohortQueryDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.query.db.hibernate; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryService.java b/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryService.java index b76622af85..f5242d8943 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.query.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceImpl.java index c8727c305b..96f739cb78 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/query/service/CohortQueryServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.cohort.query.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Age.java b/api/src/main/java/org/openmrs/module/reporting/common/Age.java index 4b8af3fa19..de4dfbb01d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/Age.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/Age.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/AgeRange.java b/api/src/main/java/org/openmrs/module/reporting/common/AgeRange.java index 7260c89b62..e0f20a628e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/AgeRange.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/AgeRange.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/AuditInfo.java b/api/src/main/java/org/openmrs/module/reporting/common/AuditInfo.java index 035d55afc9..051dede243 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/AuditInfo.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/AuditInfo.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.common; import org.openmrs.Auditable; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/BeanPropertyComparator.java b/api/src/main/java/org/openmrs/module/reporting/common/BeanPropertyComparator.java index 8ab2487036..f9bc29ca6f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/BeanPropertyComparator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/BeanPropertyComparator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Birthdate.java b/api/src/main/java/org/openmrs/module/reporting/common/Birthdate.java index a90daf9a02..8891ea35b9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/Birthdate.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/Birthdate.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/BooleanOperator.java b/api/src/main/java/org/openmrs/module/reporting/common/BooleanOperator.java index 879392d54b..fabb049b5f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/BooleanOperator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/BooleanOperator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java b/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java index 799aae0c61..d1d9b1b509 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/DateRange.java b/api/src/main/java/org/openmrs/module/reporting/common/DateRange.java index 0aa85ac60c..ab5ab1c3fc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/DateRange.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/DateRange.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/DateUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/DateUtil.java index 3e4195577a..15204c83c4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/DateUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/DateUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.commons.lang3.time.DateUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/DelimitedKeyComparator.java b/api/src/main/java/org/openmrs/module/reporting/common/DelimitedKeyComparator.java index 8b91278fac..664385f4d9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/DelimitedKeyComparator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/DelimitedKeyComparator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import java.util.Comparator; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/DrugOrderSet.java b/api/src/main/java/org/openmrs/module/reporting/common/DrugOrderSet.java index 31e08a65a4..a9cb444413 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/DrugOrderSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/DrugOrderSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/DurationUnit.java b/api/src/main/java/org/openmrs/module/reporting/common/DurationUnit.java index b7e780449b..db54fd288d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/DurationUnit.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/DurationUnit.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ExcelBuilder.java b/api/src/main/java/org/openmrs/module/reporting/common/ExcelBuilder.java index 8453f34ee4..e5efa96bd4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ExcelBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ExcelBuilder.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.poi.ss.usermodel.Cell; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ExcelUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/ExcelUtil.java index 5971274176..fc4ad881ec 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ExcelUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ExcelUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.commons.io.IOUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Fraction.java b/api/src/main/java/org/openmrs/module/reporting/common/Fraction.java index a49d9009ec..8ad2fbbca0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/Fraction.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/Fraction.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/GroovyHelper.java b/api/src/main/java/org/openmrs/module/reporting/common/GroovyHelper.java index f14a92fc15..24802d0c10 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/GroovyHelper.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/GroovyHelper.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import java.io.File; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/HibernateUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/HibernateUtil.java index c910a174e1..7523c5d1e8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/HibernateUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/HibernateUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ListMap.java b/api/src/main/java/org/openmrs/module/reporting/common/ListMap.java index f497fe59d0..dc92660284 100755 --- a/api/src/main/java/org/openmrs/module/reporting/common/ListMap.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ListMap.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Localized.java b/api/src/main/java/org/openmrs/module/reporting/common/Localized.java index ce94dba7cf..fa86aebfdf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/Localized.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/Localized.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/LogicUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/LogicUtil.java index c26d224ae7..63a100fcb4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/LogicUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/LogicUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import java.util.List; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/MessageUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/MessageUtil.java index b82f744578..e27be74a6a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/MessageUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/MessageUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/NumericRange.java b/api/src/main/java/org/openmrs/module/reporting/common/NumericRange.java index abffe8d478..dcfa7cc65e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/NumericRange.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/NumericRange.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ObjectCounter.java b/api/src/main/java/org/openmrs/module/reporting/common/ObjectCounter.java index d1b879d459..12260fa113 100755 --- a/api/src/main/java/org/openmrs/module/reporting/common/ObjectCounter.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ObjectCounter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ObjectUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/ObjectUtil.java index 9a0cd775c5..982d342c09 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ObjectUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ObjectUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.commons.io.IOUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ObsActiveList.java b/api/src/main/java/org/openmrs/module/reporting/common/ObsActiveList.java index eaf532128e..d971f087f3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ObsActiveList.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ObsActiveList.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/RangeComparator.java b/api/src/main/java/org/openmrs/module/reporting/common/RangeComparator.java index 16282a6d97..f5e4ef7132 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/RangeComparator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/RangeComparator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ReflectionUtil.java b/api/src/main/java/org/openmrs/module/reporting/common/ReflectionUtil.java index bfc1d246e1..f459ae38c1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ReflectionUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ReflectionUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; import org.apache.commons.beanutils.PropertyUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ScriptingLanguage.java b/api/src/main/java/org/openmrs/module/reporting/common/ScriptingLanguage.java index d41fd10b77..f8ee185ddb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ScriptingLanguage.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ScriptingLanguage.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SetComparator.java b/api/src/main/java/org/openmrs/module/reporting/common/SetComparator.java index 6ab9fae30d..7f1ec69a4d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SetComparator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SetComparator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java index 7a011bfb28..b480817659 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/TimePeriod.java b/api/src/main/java/org/openmrs/module/reporting/common/TimePeriod.java index bc7cf25a53..3341f8b2f0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/TimePeriod.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/TimePeriod.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.common; import org.joda.time.Days; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/TimeQualifier.java b/api/src/main/java/org/openmrs/module/reporting/common/TimeQualifier.java index e1dde58e44..46b3246434 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/TimeQualifier.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/TimeQualifier.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Timer.java b/api/src/main/java/org/openmrs/module/reporting/common/Timer.java index 05e9e408e1..98490f75f6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/Timer.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/Timer.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.common; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/common/VitalStatus.java b/api/src/main/java/org/openmrs/module/reporting/common/VitalStatus.java index b1d89577bd..4818057493 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/VitalStatus.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/VitalStatus.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.common; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/BaseData.java b/api/src/main/java/org/openmrs/module/reporting/data/BaseData.java index 0fd52bd5da..eeeb8820fd 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/BaseData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/BaseData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/BaseDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/BaseDataDefinition.java index f6f9d1a38c..4bb31d2daa 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/BaseDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/BaseDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/BaseDefinitionLibraryDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/BaseDefinitionLibraryDataDefinition.java index e4a3e7bad1..3836fa367c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/BaseDefinitionLibraryDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/BaseDefinitionLibraryDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/BaseSqlDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/BaseSqlDataDefinition.java index a19a2cc970..407b6183eb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/BaseSqlDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/BaseSqlDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/ConvertedDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/ConvertedDataDefinition.java index 23a80bd20c..312616f452 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/ConvertedDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/ConvertedDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/Data.java b/api/src/main/java/org/openmrs/module/reporting/data/Data.java index 9e92f68b8b..7db13e2278 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/Data.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/Data.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/DataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/DataDefinition.java index 08386d3c4b..f40ea19e86 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/DataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/DataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/DataSetDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/DataSetDataDefinition.java index 1d62af1a4f..c3ca607601 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/DataSetDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/DataSetDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/DataUtil.java b/api/src/main/java/org/openmrs/module/reporting/data/DataUtil.java index bac8ca7552..17d86ac8b5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/DataUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/DataUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/JoinDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/JoinDataDefinition.java index 7592b95bfd..4359ae2a45 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/JoinDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/JoinDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/MappedData.java b/api/src/main/java/org/openmrs/module/reporting/data/MappedData.java index 53ec4cc985..c8f4fd28f0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/MappedData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/MappedData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeConverter.java index fffbe337e7..6fccf481e9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeRangeConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeRangeConverter.java index ded1cd33f8..9284b77b04 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeRangeConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/AgeRangeConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/AttributeValueConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/AttributeValueConverter.java index f7cc906004..3d44051406 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/AttributeValueConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/AttributeValueConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateConverter.java index c84e5bc129..67f924cf67 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverter.java index 5259d63630..22c39c4d9c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/BirthdateToAgeConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/BooleanConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/BooleanConverter.java index 77cb802dbc..fefd19f1d3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/BooleanConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/BooleanConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ChainedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ChainedConverter.java index 0428ec6ff3..b0c5324712 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ChainedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ChainedConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ChangeInValueConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ChangeInValueConverter.java index b70fcd73a7..7d6d8badaf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ChangeInValueConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ChangeInValueConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionConverter.java index 57a01a7073..d24183ec97 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionElementConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionElementConverter.java index b22815bf68..0e04ced328 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionElementConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/CollectionElementConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import java.util.Collection; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConcatenatedPropertyConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConcatenatedPropertyConverter.java index ea2a8c112d..37e65d104a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConcatenatedPropertyConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConcatenatedPropertyConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java index 489b847b12..bc4bab3571 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/CountConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/CountConverter.java index b30788916e..8fd694f0f7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/CountConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/CountConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import java.util.Collection; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/DataConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/DataConverter.java index 78b1b1e9a5..327ad02981 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/DataConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/DataConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/DataSetRowConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/DataSetRowConverter.java index 82ece307ea..2a89367665 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/DataSetRowConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/DataSetRowConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/DateConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/DateConverter.java index 19e29b1a75..3eda3b05af 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/DateConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/DateConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java index 5cefa73ff8..2829c7a0a6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.converter; import org.openmrs.Auditable; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ExistenceConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ExistenceConverter.java index 6b794338e5..5ef83672e6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ExistenceConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ExistenceConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ListConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ListConverter.java index d4f5626055..73228537b5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ListConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ListConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/MapConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/MapConverter.java index 541365de12..32d84a569e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/MapConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/MapConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/MapElementConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/MapElementConverter.java index 686c90d27d..ad60d3ba5b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/MapElementConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/MapElementConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java index 979be08989..42af0bd813 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.converter; import org.openmrs.Auditable; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/NullValueConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/NullValueConverter.java index a28afeb682..c1c27630ca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/NullValueConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/NullValueConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObjectFormatter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObjectFormatter.java index b5ee93167b..991edc8fad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObjectFormatter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObjectFormatter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java index 604fb78bf7..848f487085 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueConverter.java index 6e8c75a569..180d29e3ce 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverter.java index c85d58ed08..b69215a2c9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsValueTextAsCodedConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.apache.commons.lang3.StringUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverter.java index 523a6a7adf..7dd7d5efdf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.converter; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/PropertyConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/PropertyConverter.java index 9ed3fc67d3..82bc7fabca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/PropertyConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/PropertyConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/StringConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/StringConverter.java index 4f2f394889..f9a4f19d89 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/StringConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/StringConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterData.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterData.java index cb298e983a..ade8d3b038 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterDataUtil.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterDataUtil.java index a84188c741..68cf4b72e0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterDataUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EncounterDataUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EvaluatedEncounterData.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EvaluatedEncounterData.java index 843e40258c..8007499a55 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/EvaluatedEncounterData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/EvaluatedEncounterData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AgeAtEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AgeAtEncounterDataDefinition.java index 999f08ac95..c8f22cf0d6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AgeAtEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AgeAtEncounterDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.module.reporting.common.Age; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AuditInfoEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AuditInfoEncounterDataDefinition.java index 13095fd7ea..9fdc8a2740 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AuditInfoEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/AuditInfoEncounterDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.module.reporting.common.AuditInfo; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ConvertedEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ConvertedEncounterDataDefinition.java index 2866f0bfb5..0b11bbbd77 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ConvertedEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ConvertedEncounterDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataDefinition.java index 07740ece99..f7cb03b4c1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataSetDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataSetDataDefinition.java index c1f1934362..955744e315 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataSetDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDataSetDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDatetimeDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDatetimeDataDefinition.java index a6768950d5..4b83d8e829 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDatetimeDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterDatetimeDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterFormDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterFormDataDefinition.java index 3676568851..3f25e67f27 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterFormDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterFormDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterIdDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterIdDataDefinition.java index a2e72ef7cd..e87614ee00 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterIdDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterIdDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterLocationDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterLocationDataDefinition.java index 569e509e78..3599c66272 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterLocationDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterLocationDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterProviderDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterProviderDataDefinition.java index 0dda4a4603..5c49d1c6d7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterProviderDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterProviderDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterTypeDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterTypeDataDefinition.java index ce4a09eee2..3dd7a5acb4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterTypeDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterTypeDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterVisitDataDefinition.java index 26cd82682f..56b29947cb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/EncounterVisitDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.Visit; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java index b953128d26..78be23a3e4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PatientToEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PatientToEncounterDataDefinition.java index 04d0279707..64cf67d4ef 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PatientToEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PatientToEncounterDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PersonToEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PersonToEncounterDataDefinition.java index bf1a25be75..8004939e51 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PersonToEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/PersonToEncounterDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SimultaneousEncountersDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SimultaneousEncountersDataDefinition.java index 98e11ebdf3..7cdd1e7431 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SimultaneousEncountersDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SimultaneousEncountersDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SqlEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SqlEncounterDataDefinition.java index c95218b202..caec1691db 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SqlEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/SqlEncounterDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.definition; import org.openmrs.module.reporting.data.BaseSqlDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluator.java index 2bc848c504..07ce8ed8bb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AgeAtEncounterDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluator.java index 29aae375a4..cbd7856d37 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/AuditInfoEncounterDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluator.java index 18ca3a9139..450aaa40da 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ConvertedEncounterDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDataEvaluator.java index 22299dd8cd..8f1c81ded8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDatetimeDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDatetimeDataEvaluator.java index b2a5b092e3..e3a89741f8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDatetimeDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterDatetimeDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluator.java index 6e5ffcb191..49545d1676 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterIdDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluator.java index e4d5352867..99cfe182e7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterLocationDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterPropertyDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterPropertyDataEvaluator.java index a25ab45572..bc7314d173 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterPropertyDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterPropertyDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluator.java index 6deb55f079..3dd6bed141 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterTypeDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterTypeDataEvaluator.java index 382e8f13c0..4de60cb06d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterTypeDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterTypeDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluator.java index 2f88e1fc35..9d982358b3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterVisitDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java index f0eeafbc4b..c571e73dfb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.encounter.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluator.java index 6ba2a94fd2..88a148be95 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PatientToEncounterDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluator.java index dce25714db..b8fa427961 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/PersonToEncounterDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluator.java index 637ed8ad77..9592a8547e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SimultaneousEncountersDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluator.java index f550bd0935..ed07724974 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/SqlEncounterDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibrary.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibrary.java index 80d6d0cb5d..af0543aa9d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/library/BuiltInEncounterDataLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.encounter.library; import org.openmrs.module.reporting.common.AuditInfo; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/persister/SerializedEncounterDataPersister.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/persister/SerializedEncounterDataPersister.java index f73f64a207..595979e127 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/persister/SerializedEncounterDataPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/persister/SerializedEncounterDataPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataService.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataService.java index f9c599649b..446f958ab2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataService.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImpl.java index 51c4041254..b11a9ca3a4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/service/EncounterDataServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.encounter.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/EvaluatedObsData.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/EvaluatedObsData.java index f036f04853..39164bdf6f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/EvaluatedObsData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/EvaluatedObsData.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.obs; import org.openmrs.module.reporting.data.obs.definition.ObsDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsData.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsData.java index d8a99eb643..f601260081 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsDataUtil.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsDataUtil.java index f79019b138..993fde9c05 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsDataUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/ObsDataUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ConvertedObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ConvertedObsDataDefinition.java index 97870a1b18..bd5a9f7e27 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ConvertedObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ConvertedObsDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.ConvertedDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/EncounterToObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/EncounterToObsDataDefinition.java index b90bccb9f3..c881d1c3c0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/EncounterToObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/EncounterToObsDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.JoinDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/GroupMemberObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/GroupMemberObsDataDefinition.java index 160f8f9ee7..a83f947c7a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/GroupMemberObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/GroupMemberObsDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsDataDefinition.java index 2be865e8fb..6d1090ef33 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.DataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsIdDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsIdDataDefinition.java index 4695823318..2cdb9c4edf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsIdDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/ObsIdDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.BaseDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PatientToObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PatientToObsDataDefinition.java index 6f0467a30c..f9dadf329f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PatientToObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PatientToObsDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.JoinDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PersonToObsDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PersonToObsDataDefinition.java index 53fb4dfc6a..688ff16a4a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PersonToObsDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/definition/PersonToObsDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.definition; import org.openmrs.module.reporting.data.JoinDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluator.java index 22f0259bf6..252a50d96a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ConvertedObsDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluator.java index ae8dea5487..fbfad8909c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/EncounterToObsDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluator.java index 505352c7d8..2cf033df50 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/GroupMemberObsDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsDataEvaluator.java index e254a01fc3..b2d7bbc805 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.module.reporting.data.obs.EvaluatedObsData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluator.java index d0a86a1d1d..833ba4abad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsIdDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsPropertyDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsPropertyDataEvaluator.java index 087b345189..ff89534b23 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsPropertyDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/ObsPropertyDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.obs.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluator.java index 34f095520f..93ae5fc7ad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PatientToObsDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.Cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsDataEvaluator.java index 95154c224a..b55ba79922 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/evaluator/PersonToObsDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.evaluator; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataService.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataService.java index 66cd382371..ebb7572685 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataService.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataService.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.service; import org.openmrs.module.reporting.data.obs.EvaluatedObsData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataServiceImpl.java index b1ce96379a..b47261e64d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/obs/service/ObsDataServiceImpl.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.obs.service; import org.openmrs.module.reporting.data.obs.EvaluatedObsData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/EvaluatedPatientData.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/EvaluatedPatientData.java index 89d2dd0822..ca417b479c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/EvaluatedPatientData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/EvaluatedPatientData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/PatientData.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/PatientData.java index f3b9c2b61d..4486b16b16 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/PatientData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/PatientData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ConvertedPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ConvertedPatientDataDefinition.java index 48e5ddc131..d73646fa57 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ConvertedPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ConvertedPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/CurrentPatientStateDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/CurrentPatientStateDataDefinition.java index 675a779372..662a76ff0a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/CurrentPatientStateDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/CurrentPatientStateDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DefinitionLibraryPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DefinitionLibraryPatientDataDefinition.java index d448256d0c..80bafacd3b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DefinitionLibraryPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DefinitionLibraryPatientDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.patient.definition; import org.openmrs.module.reporting.data.BaseDefinitionLibraryDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DrugOrdersForPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DrugOrdersForPatientDataDefinition.java index ce9c2e9bda..824b5d4761 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DrugOrdersForPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/DrugOrdersForPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/EncountersForPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/EncountersForPatientDataDefinition.java index 6076532b2f..05a0d4b90b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/EncountersForPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/EncountersForPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/LogicDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/LogicDataDefinition.java index cda6d2f742..2300a3590e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/LogicDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/LogicDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientCalculationDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientCalculationDataDefinition.java index 94dea01511..81b0da7284 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientCalculationDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientCalculationDataDefinition.java @@ -1,18 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - - package org.openmrs.module.reporting.data.patient.definition; import org.openmrs.calculation.CalculationRegistration; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataDefinition.java index fa67f4f59b..773f6299a3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataSetDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataSetDataDefinition.java index 1f5c732054..c7fa947798 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataSetDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientDataSetDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdDataDefinition.java index 5b19cc2d2e..d74144efc4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdentifierDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdentifierDataDefinition.java index a75c94d534..0679b72dd2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdentifierDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientIdentifierDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientObjectDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientObjectDataDefinition.java index 1cce0d054f..f172c9fbbd 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientObjectDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PatientObjectDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PersonToPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PersonToPatientDataDefinition.java index e3ba45d7a9..3aa7ff70a6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PersonToPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PersonToPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PreferredIdentifierDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PreferredIdentifierDataDefinition.java index e5251db96b..fbacd59186 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PreferredIdentifierDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/PreferredIdentifierDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramEnrollmentsForPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramEnrollmentsForPatientDataDefinition.java index 247dce514f..758ecd831b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramEnrollmentsForPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramEnrollmentsForPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramStatesForPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramStatesForPatientDataDefinition.java index 091ff04741..07cd32c8dd 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramStatesForPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ProgramStatesForPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ScriptedCompositionPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ScriptedCompositionPatientDataDefinition.java index b30505c636..94cd95bfc5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ScriptedCompositionPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/ScriptedCompositionPatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/SqlPatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/SqlPatientDataDefinition.java index 02c0181eda..32ca762711 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/SqlPatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/SqlPatientDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.definition; import org.openmrs.module.reporting.data.BaseSqlDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/StaticValuePatientDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/StaticValuePatientDataDefinition.java index 8347431f4b..de32c901b3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/StaticValuePatientDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/definition/StaticValuePatientDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluator.java index 9a0e80010c..bed2645c6d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ConvertedPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluator.java index be9608326d..1dbefffd46 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/CurrentPatientStateDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluator.java index 1a8e7e9ac8..5c9d55c71b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DefinitionLibraryPatientDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.patient.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluator.java index 50587f4472..33aa125688 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/DrugOrdersForPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluator.java index f775d56cd0..243e507c46 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/EncountersForPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluator.java index 660786df2f..767697c48c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/LogicDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluator.java index 794acc8b30..74762867ea 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientCalculationDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataEvaluator.java index 6b8aec7f86..0393d0df17 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataSetDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataSetDataEvaluator.java index d1fcc1e185..95292fe941 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataSetDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientDataSetDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluator.java index a763a8e9d3..c3d1c3ab39 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java index 564cdf8b04..a30a63e112 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluator.java index a5aa6f94b8..b7f7ec67f1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientObjectDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientPropertyDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientPropertyDataEvaluator.java index 7c38fb0c03..7de7f154d2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientPropertyDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientPropertyDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluator.java index fb4abe85ee..c5cb33d6ad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PersonToPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluator.java index 0349b367f0..1b4f012fb8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PreferredIdentifierDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluator.java index 7b1513cec4..8261b30906 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramEnrollmentsForPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluator.java index f4ed37e519..dce76969fe 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ProgramStatesForPatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataDefinitionEvaluator.java index bf898c45d2..2c22a7b5b6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/ScriptedCompositionPatientDataDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluator.java index b30677afd0..c362f93e8b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/SqlPatientDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.patient.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/StaticValuePatientDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/StaticValuePatientDataEvaluator.java index 70094320a5..f151fd31d3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/StaticValuePatientDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/StaticValuePatientDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibrary.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibrary.java index 81c378f454..c562385697 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/library/BuiltInPatientDataLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.patient.library; import org.openmrs.PatientIdentifier; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/persister/SerializedPatientDataPersister.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/persister/SerializedPatientDataPersister.java index 5efb47af50..8fc47e6f3e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/persister/SerializedPatientDataPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/persister/SerializedPatientDataPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataService.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataService.java index 5f9dd6be5a..98ee05b792 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataService.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImpl.java index 56e00751e7..0f2ec4cf47 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.patient.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/EvaluatedPersonData.java b/api/src/main/java/org/openmrs/module/reporting/data/person/EvaluatedPersonData.java index 4bc35c9e0e..8ccfb2dffb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/EvaluatedPersonData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/EvaluatedPersonData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/PersonData.java b/api/src/main/java/org/openmrs/module/reporting/data/person/PersonData.java index 67eb9f87d3..b8ba69e8f7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/PersonData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/PersonData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/PersonDataUtil.java b/api/src/main/java/org/openmrs/module/reporting/data/person/PersonDataUtil.java index d9bfc5ded8..eec61ce804 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/PersonDataUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/PersonDataUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeAtDateOfOtherDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeAtDateOfOtherDataDefinition.java index 00fb18817d..4d6b5ce8c0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeAtDateOfOtherDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeAtDateOfOtherDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeDataDefinition.java index 244cfc4765..6babd85a54 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/AgeDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/BirthdateDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/BirthdateDataDefinition.java index 23a494334a..1985ec006f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/BirthdateDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/BirthdateDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ConvertedPersonDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ConvertedPersonDataDefinition.java index 98e0c14956..fb4d3a6104 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ConvertedPersonDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ConvertedPersonDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/GenderDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/GenderDataDefinition.java index 4771ee9384..78d2a55eb7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/GenderDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/GenderDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsActiveListPersonDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsActiveListPersonDataDefinition.java index f335d56364..8a091a2db0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsActiveListPersonDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsActiveListPersonDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsForPersonDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsForPersonDataDefinition.java index 4ff1c5e897..ad88baf429 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsForPersonDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/ObsForPersonDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonAttributeDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonAttributeDataDefinition.java index ebfac5a240..1566f38384 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonAttributeDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonAttributeDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonDataDefinition.java index 6d56001d17..f354adb872 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonIdDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonIdDataDefinition.java index 812712d0ed..93fbe50891 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonIdDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PersonIdDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredAddressDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredAddressDataDefinition.java index 3c9dbe010e..cc9fa1b5c6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredAddressDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredAddressDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredNameDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredNameDataDefinition.java index 583b9ec107..53e3e6bdcc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredNameDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/PreferredNameDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/RelationshipsForPersonDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/RelationshipsForPersonDataDefinition.java index 30068b40b1..e949f0fb4f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/RelationshipsForPersonDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/RelationshipsForPersonDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/VitalStatusDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/VitalStatusDataDefinition.java index a240784b6b..7e215c763f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/definition/VitalStatusDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/definition/VitalStatusDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluator.java index 374aa0816f..7a62b4bd5e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeAtDateOfOtherDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluator.java index 4fa50b46f5..42778ed1b6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/AgeDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluator.java index 9770bed0c0..74cb959f2d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/BirthdateDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluator.java index 406738ed38..254d5082ae 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ConvertedPersonDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluator.java index f131612d41..1f7e9db2ee 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/GenderDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluator.java index 650636f730..a1f4af2508 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsActiveListPersonDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluator.java index 088d26c67b..c02bc6e5d8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/ObsForPersonDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluator.java index 23ae3d3b67..39911181bb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonAttributeDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonDataEvaluator.java index 080b36c199..f86bee656c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluator.java index 1fb34eaaa6..184c1e5fb5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonIdDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonPropertyDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonPropertyDataEvaluator.java index 1906423012..ccb6d4ff5b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonPropertyDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PersonPropertyDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluator.java index ccdd784dcf..a03b967aa3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredAddressDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluator.java index d8b235abf2..531628ba25 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/PreferredNameDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluator.java index 146c2e5ed5..7dd33425de 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/RelationshipsForPersonDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluator.java index 4cf2efe560..0870b1e389 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/evaluator/VitalStatusDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/persister/SerializedPersonDataPersister.java b/api/src/main/java/org/openmrs/module/reporting/data/person/persister/SerializedPersonDataPersister.java index 0e8b5edd27..448189f53b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/persister/SerializedPersonDataPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/persister/SerializedPersonDataPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataService.java b/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataService.java index 226abe4139..b258e32fbb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataService.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImpl.java index 75847f572b..12129cbecf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/person/service/PersonDataServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.person.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/EvaluatedVisitData.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/EvaluatedVisitData.java index b92fc76df1..eb28c5bcf5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/EvaluatedVisitData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/EvaluatedVisitData.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit; import org.openmrs.module.reporting.data.visit.definition.VisitDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitData.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitData.java index a4f3828ef3..0ebabe817f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitData.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitData.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit; import org.openmrs.module.reporting.data.BaseData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitDataUtil.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitDataUtil.java index 81b5caa800..a66c55a089 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitDataUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/VisitDataUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/ObsForVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/ObsForVisitDataDefinition.java index a87d5f939d..420a6f2919 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/ObsForVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/ObsForVisitDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/OrderForVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/OrderForVisitDataDefinition.java index b10df2d992..33c9a91b2b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/OrderForVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/OrderForVisitDataDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PatientToVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PatientToVisitDataDefinition.java index 29188feb41..0036cc89de 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PatientToVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PatientToVisitDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.definition; import org.openmrs.module.reporting.data.JoinDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PersonToVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PersonToVisitDataDefinition.java index 7a79e9d1c9..566cf6c1d6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PersonToVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/PersonToVisitDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.definition; import org.openmrs.module.reporting.data.JoinDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/SqlVisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/SqlVisitDataDefinition.java index 220f3f2bc2..3ac94fa003 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/SqlVisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/SqlVisitDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.definition; import org.openmrs.module.reporting.data.BaseDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitDataDefinition.java index 862047e380..9ace528982 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitDataDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.definition; import org.openmrs.module.reporting.data.DataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitIdDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitIdDataDefinition.java index 65bcd930cf..a928ff9fd4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitIdDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/definition/VisitIdDataDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.definition; import org.openmrs.module.reporting.data.BaseDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluator.java index c44a03519c..cc1934dd5d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/ObsForVisitDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluator.java index 1c9bb7940c..f239dcc24e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluator.java index 3d1305abb0..b66b6aa6b7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PatientToVisitDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.openmrs.Cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluator.java index f74d3f4932..fae6c66a9d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/PersonToVisitDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.openmrs.Cohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluator.java index 91341e5cd6..9a547a9cd4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/SqlVisitDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import java.util.Map; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitDataEvaluator.java index e1b7ec8a36..975b4a5ba9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitDataEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.evaluator; import org.openmrs.module.reporting.data.visit.EvaluatedVisitData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluator.java index 13ace93aee..9997f76f31 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.data.visit.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitPropertyDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitPropertyDataEvaluator.java index 3dd1648926..18d903e682 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitPropertyDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/evaluator/VisitPropertyDataEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.data.visit.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibrary.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibrary.java index 9c99ca7684..b7d2968d6b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/library/BuiltInVisitDataLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.library; import org.openmrs.module.reporting.data.visit.definition.VisitDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataService.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataService.java index 963ae9d9aa..ab60f272b2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataService.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataService.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.service; import org.openmrs.module.reporting.data.visit.EvaluatedVisitData; diff --git a/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataServiceImpl.java index ad75159a28..ad1da16198 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/visit/service/VisitDataServiceImpl.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.data.visit.service; import org.openmrs.module.reporting.data.visit.EvaluatedVisitData; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSet.java index 03d500fbb4..b7b7f3606c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetColumn.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetColumn.java index c35b5d9e25..b36a208872 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetColumn.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetColumn.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetMetaData.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetMetaData.java index f752b3a4a2..dac179f2e3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetMetaData.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetMetaData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRow.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRow.java index 0a33364e12..c8dbbfe834 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRow.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRow.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowComparator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowComparator.java index 114620d27c..8a6cce0fd0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowComparator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowComparator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowList.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowList.java index dd966b9b86..17253697f5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowList.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetRowList.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetUtil.java b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetUtil.java index 6d3ba2df0c..54d6288ca0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/DataSetUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/LazyPageableDataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/LazyPageableDataSet.java index 7035cde03b..2d4ec49ae5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/LazyPageableDataSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/LazyPageableDataSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/MapDataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/MapDataSet.java index 7d36320815..5ff0c21fa5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/MapDataSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/MapDataSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/PageableDataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/PageableDataSet.java index 7b92221406..50995542c4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/PageableDataSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/PageableDataSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSet.java index d94639b29c..02afaea239 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSet.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset; import org.openmrs.module.reporting.common.SortCriteria; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSetMetaData.java b/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSetMetaData.java index c370beafe9..2d0d5c3501 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSetMetaData.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/SimpleDataSetMetaData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/BaseColumnDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/BaseColumnDefinition.java index 4471b2735e..0d3cd10da9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/BaseColumnDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/BaseColumnDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.column.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/ColumnDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/ColumnDefinition.java index ae78a4662b..f6bc7c5b9e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/ColumnDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/ColumnDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.column.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/RowPerObjectColumnDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/RowPerObjectColumnDefinition.java index 731ea7c618..6e7b4c30c8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/RowPerObjectColumnDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/column/definition/RowPerObjectColumnDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.column.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/BaseDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/BaseDataSetDefinition.java index 1b57b580d2..89ab5e5e26 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/BaseDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/BaseDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortCrossTabDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortCrossTabDataSetDefinition.java index d316dd5cf4..cf7ee0a32a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortCrossTabDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortCrossTabDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java index 1a0b323066..bb2ab80d1c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorDataSetDefinition.java index 88598bf4b3..008736f5f1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java index 76a09b9806..42441e1aa1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition; import org.openmrs.module.reporting.cohort.EvaluatedCohort; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataSetDefinition.java index 64544420b5..a5900e2f5a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterAndObsDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterAndObsDataSetDefinition.java index 207c641de4..5eb1209aaa 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterAndObsDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterAndObsDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterDataSetDefinition.java index c88d7a247b..1a1a28a336 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EncounterDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EvaluatableDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EvaluatableDataSetDefinition.java index f2d6a4b3d9..75013ffa5b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EvaluatableDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/EvaluatableDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition; import org.openmrs.module.reporting.dataset.DataSet; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/LogicDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/LogicDataSetDefinition.java index 896d8aa1f0..8756db7926 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/LogicDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/LogicDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiParameterDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiParameterDataSetDefinition.java index e6ca065cd1..f19c9f5796 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiParameterDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiParameterDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiPeriodIndicatorDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiPeriodIndicatorDataSetDefinition.java index 3b2ce3d921..665e781926 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiPeriodIndicatorDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/MultiPeriodIndicatorDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/ObsDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/ObsDataSetDefinition.java index 1d7c5d3253..1160bd7b8b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/ObsDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/ObsDataSetDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition; import org.openmrs.module.reporting.common.Localized; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PageableDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PageableDataSetDefinition.java index 5730ae6563..b4bc78dce9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PageableDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PageableDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PatientDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PatientDataSetDefinition.java index af714db4bc..4e24c3329a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PatientDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/PatientDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RepeatPerTimePeriodDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RepeatPerTimePeriodDataSetDefinition.java index 84c5891c3a..b39240cc8e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RepeatPerTimePeriodDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RepeatPerTimePeriodDataSetDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition; import org.openmrs.module.reporting.common.TimePeriod; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RowPerObjectDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RowPerObjectDataSetDefinition.java index 552bfe97a4..6199813c56 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RowPerObjectDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/RowPerObjectDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimpleIndicatorDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimpleIndicatorDataSetDefinition.java index 848046cdff..3f3dc6eec2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimpleIndicatorDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimpleIndicatorDataSetDefinition.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimplePatientDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimplePatientDataSetDefinition.java index 7d8381c3bc..c51e0098b2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimplePatientDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SimplePatientDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlDataSetDefinition.java index bf97a2b429..721c291289 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlDataSetDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/VisitDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/VisitDataSetDefinition.java index 9a3bfe388a..d7d79bf11e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/VisitDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/VisitDataSetDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition; import org.openmrs.module.reporting.common.TimeQualifier; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortDataSetEvaluator.java index fc68de5189..e89127dc8c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorAndDimensionDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorAndDimensionDataSetEvaluator.java index 0e7f8560ac..7276992e6c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorAndDimensionDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorAndDimensionDataSetEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import java.util.List; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluator.java index 7708248a4c..f1d92337b5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortIndicatorDataSetEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import java.util.HashMap; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluator.java index b8148e0c22..b010605731 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/CohortsWithVaryingParametersDataSetEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import com.github.jknack.handlebars.Template; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java index 46b685ad1a..eea2489bd2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluator.java index a6339dcae3..14c9330326 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterAndObsDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluator.java index 730b0dedc4..66b31429ef 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EncounterDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluator.java index 25e42e53f3..2494a42285 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/EvaluatableDataSetEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LazyPageableDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LazyPageableDataSetEvaluator.java index 3c35baf94e..1bba4526dc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LazyPageableDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LazyPageableDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluator.java index 52c0d7a959..bc941174b1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/LogicDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluator.java index 71eea93f8a..b401f8cfa1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluator.java index b22ac0c030..5481e32b82 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import java.util.Arrays; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluator.java index 66ae37cab4..1f2404cf84 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/ObsDataSetEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluator.java index 0767e17c97..5a561e370d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/PatientDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluator.java index 4c4cbccb73..e51b99ca3b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.joda.time.DateTime; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimpleIndicatorDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimpleIndicatorDataSetEvaluator.java index 4ed8ed03ed..745edc7787 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimpleIndicatorDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimpleIndicatorDataSetEvaluator.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluator.java index e1f55f8851..7a5f8d1884 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SimplePatientDataSetEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluator.java index fe002824a6..ab7709a107 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlDataSetEvaluator.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluator.java index 884d1e856f..9f9d7d985e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/VisitDataSetEvaluator.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.lang.time.StopWatch; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataSetDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataSetDefinitionPersister.java index b3d3c0afa3..48e44e8b7d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataSetDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataSetDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/SerializedDataSetDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/SerializedDataSetDefinitionPersister.java index 1a8ce013ea..f6d907cfbb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/SerializedDataSetDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/SerializedDataSetDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionService.java index 919a473631..7bdc769e0c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionServiceImpl.java index b97028f823..617912d934 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/service/DataSetDefinitionServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/BaseDataSetQueryService.java b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/BaseDataSetQueryService.java index b5ed7941cf..3d100ee660 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/BaseDataSetQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/BaseDataSetQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.query.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/DataSetQueryService.java b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/DataSetQueryService.java index bb46eb04a7..97d8166e2c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/DataSetQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/DataSetQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.query.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/DataSetQueryDAO.java b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/DataSetQueryDAO.java index 18f4c7c2d2..e3e6fe6a09 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/DataSetQueryDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/DataSetQueryDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.query.service.db; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/HibernateDataSetQueryDAO.java b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/HibernateDataSetQueryDAO.java index acebe8a20d..f00d37a712 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/HibernateDataSetQueryDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/query/service/db/HibernateDataSetQueryDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.dataset.query.service.db; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionContext.java b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionContext.java index b043a88b4f..13f6349bcf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionSummary.java b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionSummary.java index 5d7869f7ce..d5fedc897a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionSummary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionSummary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition; import org.openmrs.OpenmrsMetadata; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionUtil.java b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionUtil.java index cabf0e809a..3feb6386f6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/DefinitionUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationProperty.java b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationProperty.java index b0e6f25dff..c3d3c02e4d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationProperty.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationProperty.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.configuration; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyAndParameterCachingStrategy.java b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyAndParameterCachingStrategy.java index fc5675197b..e6d50c328d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyAndParameterCachingStrategy.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyAndParameterCachingStrategy.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.configuration; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyCachingStrategy.java b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyCachingStrategy.java index 65be8c0b84..4fcc5a1037 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyCachingStrategy.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/ConfigurationPropertyCachingStrategy.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.configuration; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/Property.java b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/Property.java index 8f4d1f8b6c..1a29e95bbe 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/configuration/Property.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/configuration/Property.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.configuration; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/converter/ConverterUtil.java b/api/src/main/java/org/openmrs/module/reporting/definition/converter/ConverterUtil.java index 18f1dc55d6..ab616d2e0d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/converter/ConverterUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/converter/ConverterUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/converter/DefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/definition/converter/DefinitionConverter.java index 4a46a11260..44ab91f1d8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/converter/DefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/converter/DefinitionConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverter.java index d58584567c..8e2248e880 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/converter/SqlCohortDefinitionConverter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.converter; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/evaluator/DefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/definition/evaluator/DefinitionEvaluator.java index 98451a91fc..0b28d4ca2d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/evaluator/DefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/evaluator/DefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibraries.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibraries.java index 5e8223f958..320d9c3b4a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibraries.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/AllDefinitionLibraries.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.definition.library; import org.openmrs.module.reporting.cohort.definition.DefinitionLibraryCohortDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java index 371826d361..017938dc0e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.definition.library; import org.apache.commons.lang.StringUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/DefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/DefinitionLibrary.java index 6aebe07765..4ca4a7ae01 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/DefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/DefinitionLibrary.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.definition.library; import org.openmrs.module.reporting.evaluation.Definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/DocumentedDefinition.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/DocumentedDefinition.java index 585c906ffa..0afdfe72fc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/DocumentedDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/DocumentedDefinition.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.definition.library; import java.lang.annotation.ElementType; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/LibraryDefinitionSummary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/LibraryDefinitionSummary.java index 6fd5c9d2ac..416b6ef7d0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/LibraryDefinitionSummary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/LibraryDefinitionSummary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library; import org.openmrs.module.reporting.evaluation.parameter.Parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java index 4748041d8b..fdfc0e7f33 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import java.io.File; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibrary.java index 062b0b2f7e..bfa8c23d72 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import java.io.File; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibrary.java index 655557df77..3aa53b6467 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibrary.java index 6061e0f616..a4c663a4df 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibrary.java index 30cd0ca122..ce57cfb609 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import java.io.File; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibrary.java index 01b4455b6e..da7370d819 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibrary.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.definition.library.implementerconfigured; import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/persister/DefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/definition/persister/DefinitionPersister.java index 913d940b23..9af46633d8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/persister/DefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/persister/DefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/persister/SerializedDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/definition/persister/SerializedDefinitionPersister.java index 48eae94176..2bcebaddd4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/persister/SerializedDefinitionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/persister/SerializedDefinitionPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/service/BaseDefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/definition/service/BaseDefinitionService.java index 5a44512905..e316fcbdd2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/service/BaseDefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/service/BaseDefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/service/DefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/definition/service/DefinitionService.java index a7c84598c8..db0a3b1773 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/service/DefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/service/DefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionService.java index 529f4fe2b0..00f10ba097 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java index 0cc7400e71..21afe8d844 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/BaseDefinition.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/BaseDefinition.java index 69d98d8014..47cf1e9c13 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/BaseDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/BaseDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/Definition.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/Definition.java index 117c769468..4c593b1b96 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/Definition.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/Definition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/Evaluated.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/Evaluated.java index 7ae93418a7..d7b49b3a02 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/Evaluated.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/Evaluated.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationConfiguration.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationConfiguration.java index 0e05f21ced..dda7e4312f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationConfiguration.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationConfiguration.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationContext.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationContext.java index ca88436246..59dcf0bbb6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationException.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationException.java index e40569eaa2..37cc323e27 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationException.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationException.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation; import org.openmrs.api.APIException; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationProfiler.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationProfiler.java index ea3033bafa..5f21205fc4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationProfiler.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationProfiler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.evaluation; import org.apache.commons.io.IOUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationUtil.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationUtil.java index 9705b1de91..8013dace76 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/EvaluationUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/MissingDependencyException.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/MissingDependencyException.java index a82a78433d..02455c3e9b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/MissingDependencyException.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/MissingDependencyException.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/Caching.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/Caching.java index 6addfd08bf..df6c781349 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/Caching.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/Caching.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.caching; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/CachingStrategy.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/CachingStrategy.java index a791d06fdc..34f892c65b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/CachingStrategy.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/CachingStrategy.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.caching; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/NoCachingStrategy.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/NoCachingStrategy.java index c31d426081..74b1a5b3b4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/NoCachingStrategy.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/caching/NoCachingStrategy.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.caching; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/EncounterEvaluationContext.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/EncounterEvaluationContext.java index 004ccb98cf..e7712df83f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/EncounterEvaluationContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/EncounterEvaluationContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.context; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/ObsEvaluationContext.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/ObsEvaluationContext.java index a4f4365f77..778cf89342 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/ObsEvaluationContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/ObsEvaluationContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.context; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/PersonEvaluationContext.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/PersonEvaluationContext.java index 1bbbc42999..3ee602decc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/PersonEvaluationContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/PersonEvaluationContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.context; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/VisitEvaluationContext.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/VisitEvaluationContext.java index 2ad315aba3..7aadcb704a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/context/VisitEvaluationContext.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/context/VisitEvaluationContext.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.context; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Mapped.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Mapped.java index 174bb7e34c..2e1e18703d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Mapped.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Mapped.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java index 93ca3d02da..aca7c749d2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterException.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterException.java index d06ca0f888..434bac4869 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterException.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameterizable.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameterizable.java index 56f8858399..243dd4df70 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameterizable.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameterizable.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterizableUtil.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterizableUtil.java index 19de75801a..7a09f3a9b4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterizableUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/ParameterizableUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation.parameter; import org.apache.commons.lang.StringUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java index 774e2f637c..3069bcf594 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation.querybuilder; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java index 9be4f7e2a9..23252e4706 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.querybuilder; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java index b401bdb2c3..0fcd38dbed 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.evaluation.querybuilder; import java.sql.Connection; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationService.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationService.java index fd84973638..27c432c1ee 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationService.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java index b731c0bd0e..00754786a1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.evaluation.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/BaseIndicator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/BaseIndicator.java index b56626bd0e..0a2c883ee5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/BaseIndicator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/BaseIndicator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicator.java index b9c3356aa1..c8c2d01df9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicatorResult.java b/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicatorResult.java index 9fba3255f2..7e8fbd0a84 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicatorResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/CohortIndicatorResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/Indicator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/Indicator.java index 90d39fd944..3175e47be5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/Indicator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/Indicator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/IndicatorResult.java b/api/src/main/java/org/openmrs/module/reporting/indicator/IndicatorResult.java index 00adfd6ddd..c18ab889e3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/IndicatorResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/IndicatorResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/QueryCountIndicator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/QueryCountIndicator.java index 68ac8b03a1..40f815d93e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/QueryCountIndicator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/QueryCountIndicator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/SimpleIndicatorResult.java b/api/src/main/java/org/openmrs/module/reporting/indicator/SimpleIndicatorResult.java index 1cefd23d0e..c0de09e63d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/SimpleIndicatorResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/SimpleIndicatorResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/SqlIndicator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/SqlIndicator.java index 54d8132488..f063e894f1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/SqlIndicator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/SqlIndicator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/AggregationUtil.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/AggregationUtil.java index ecb7ffb63d..9cc66e8efc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/AggregationUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/AggregationUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/Aggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/Aggregator.java index 29983f4d4b..ddc475af5d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/Aggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/Aggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/CountAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/CountAggregator.java index af76df6e77..9c37610167 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/CountAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/CountAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/DistinctAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/DistinctAggregator.java index c22e92990a..69b30edeca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/DistinctAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/DistinctAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MaxAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MaxAggregator.java index ff6ec53776..b4fedcc58a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MaxAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MaxAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MeanAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MeanAggregator.java index 2ac2c762cb..692147d01a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MeanAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MeanAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MedianAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MedianAggregator.java index 9844083593..490b9dbcfd 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MedianAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MedianAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MinAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MinAggregator.java index 30cd5294e6..fe9378f2eb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MinAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/MinAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/ModeAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/ModeAggregator.java index 81b6c7303f..01832a3367 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/ModeAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/ModeAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/SumAggregator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/SumAggregator.java index 2fd55e99ef..06cdaf57c8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/SumAggregator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/aggregation/SumAggregator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.aggregation; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimension.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimension.java index cda950f85f..67a3486a42 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimension.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimension.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimensionCategory.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimensionCategory.java index ac24f49993..98ae49ea34 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimensionCategory.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDefinitionDimensionCategory.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.dimension; import java.util.Map; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimension.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimension.java index 37aaea061e..dc404c0cce 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimension.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimension.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimensionResult.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimensionResult.java index 9b273d4549..31ed51bc17 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimensionResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortDimensionResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortIndicatorAndDimensionResult.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortIndicatorAndDimensionResult.java index 74aa1e747e..790c8d833d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortIndicatorAndDimensionResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/CohortIndicatorAndDimensionResult.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.dimension; import java.util.HashMap; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/Dimension.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/Dimension.java index 40d1249330..77296afc99 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/Dimension.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/Dimension.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionCategory.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionCategory.java index 015c907a4b..53f7d4f910 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionCategory.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionCategory.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.dimension; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionSet.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionSet.java index 15d1634106..a960e2bf24 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/DimensionSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/CohortDimensionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/CohortDimensionEvaluator.java index 077d877481..961b41dd30 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/CohortDimensionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/CohortDimensionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/DimensionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/DimensionEvaluator.java index ece2151566..9b8b242125 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/DimensionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/evaluator/DimensionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/DimensionPersister.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/DimensionPersister.java index adabcd4305..5d355949ec 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/DimensionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/DimensionPersister.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.dimension.persister; import java.util.List; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/SerializedDimensionPersister.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/SerializedDimensionPersister.java index 6d47598c99..cebcd8bcca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/SerializedDimensionPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/persister/SerializedDimensionPersister.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.indicator.dimension.persister; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionService.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionService.java index e2c3742340..93941aaa27 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionServiceImpl.java index 1d0723400d..419d1cbb11 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/dimension/service/DimensionServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.dimension.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java index b7ff2e20da..c94da7fa65 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/IndicatorEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/IndicatorEvaluator.java index 1e51ccaee2..498514f53d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/IndicatorEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/IndicatorEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/QueryCountIndicatorEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/QueryCountIndicatorEvaluator.java index 59aa9e3047..4136bde50a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/QueryCountIndicatorEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/QueryCountIndicatorEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/SqlIndicatorEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/SqlIndicatorEvaluator.java index 5caeefa867..e227cac450 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/SqlIndicatorEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/SqlIndicatorEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/persister/IndicatorPersister.java b/api/src/main/java/org/openmrs/module/reporting/indicator/persister/IndicatorPersister.java index 2e39b9407d..15c7c3855b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/persister/IndicatorPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/persister/IndicatorPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/persister/SerializedIndicatorPersister.java b/api/src/main/java/org/openmrs/module/reporting/indicator/persister/SerializedIndicatorPersister.java index 5f149c7843..c660c9c208 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/persister/SerializedIndicatorPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/persister/SerializedIndicatorPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorService.java b/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorService.java index 0655c2f016..6dde025ccc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorService.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorServiceImpl.java index 9fccd0e7e0..fa49ea4ce5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/service/IndicatorServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/util/IndicatorUtil.java b/api/src/main/java/org/openmrs/module/reporting/indicator/util/IndicatorUtil.java index 91051983e7..901f4491ca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/util/IndicatorUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/util/IndicatorUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.indicator.util; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/CohortDefinitionEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/CohortDefinitionEditor.java index 84743721fc..61f5cc0727 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/CohortDefinitionEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/CohortDefinitionEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.propertyeditor; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/DataSetDefinitionEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/DataSetDefinitionEditor.java index ae99acac88..6c0e3d194f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/DataSetDefinitionEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/DataSetDefinitionEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.propertyeditor; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/IndicatorEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/IndicatorEditor.java index 37b3103c5d..cdeb4bfa02 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/IndicatorEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/IndicatorEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.propertyeditor; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/MappedEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/MappedEditor.java index f80da6633e..c65c014b3d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/MappedEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/MappedEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.propertyeditor; import java.beans.PropertyEditorSupport; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/RenderingModeEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/RenderingModeEditor.java index b99fc3fbf9..347cb12f1a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/RenderingModeEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/RenderingModeEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.propertyeditor; import java.beans.PropertyEditorSupport; diff --git a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/ReportDefinitionEditor.java b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/ReportDefinitionEditor.java index 877ec170d3..f13deda6f3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/propertyeditor/ReportDefinitionEditor.java +++ b/api/src/main/java/org/openmrs/module/reporting/propertyeditor/ReportDefinitionEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.propertyeditor; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/BaseIdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/BaseIdSet.java index 4e0d54c477..077146c21c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/BaseIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/BaseIdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/BaseQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/BaseQuery.java index 2dceb28ed8..ea059815af 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/BaseQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/BaseQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/BaseSqlQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/BaseSqlQuery.java index 4166a27230..6d017703dc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/BaseSqlQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/BaseSqlQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/CompositionQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/CompositionQuery.java index 369639104c..3da6cbc558 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/CompositionQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/CompositionQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/IdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/IdSet.java index 1dc09c15f0..195e31a05a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/IdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/IdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/MappedParametersQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/MappedParametersQuery.java index 6b92ddca30..4924f87cff 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/MappedParametersQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/MappedParametersQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query; import org.openmrs.OpenmrsObject; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/Query.java b/api/src/main/java/org/openmrs/module/reporting/query/Query.java index ca0cc8ab17..5899825b86 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/Query.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/Query.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/QueryUtil.java b/api/src/main/java/org/openmrs/module/reporting/query/QueryUtil.java index c8739f62a5..b6905bbfac 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/QueryUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/QueryUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterIdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterIdSet.java index 4e796d7c17..a870e0f550 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterIdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterQueryResult.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterQueryResult.java index 877506ce3d..e103bf4f70 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterQueryResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/EncounterQueryResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AllEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AllEncounterQuery.java index 04c2e64a5a..b6f56b064a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AllEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AllEncounterQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AuditEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AuditEncounterQuery.java index b88921199e..291df2f288 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AuditEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/AuditEncounterQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/BasicEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/BasicEncounterQuery.java index 79dd933d07..4f0eb481ca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/BasicEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/BasicEncounterQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CodedObsForEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CodedObsForEncounterQuery.java index ce5f73c13b..85f7cd85ca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CodedObsForEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CodedObsForEncounterQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CompositionEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CompositionEncounterQuery.java index 5452e66ce3..a123c776ca 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CompositionEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/CompositionEncounterQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ConditionalParameterEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ConditionalParameterEncounterQuery.java index 494a3cac3d..b74c8448cc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ConditionalParameterEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ConditionalParameterEncounterQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/EncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/EncounterQuery.java index 17b501526c..f186c356c7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/EncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/EncounterQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MappedParametersEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MappedParametersEncounterQuery.java index 8f716aa2b8..f8bd5b6315 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MappedParametersEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MappedParametersEncounterQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MostRecentEncounterForPatientQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MostRecentEncounterForPatientQuery.java index 16f9a3113e..12b283aa57 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MostRecentEncounterForPatientQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/MostRecentEncounterForPatientQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/NumericObsForEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/NumericObsForEncounterQuery.java index 8413dfc4b5..196e102d26 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/NumericObsForEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/NumericObsForEncounterQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.module.reporting.common.RangeComparator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ObsForEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ObsForEncounterQuery.java index 22a688d120..f7cc04e8c8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ObsForEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/ObsForEncounterQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/PatientEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/PatientEncounterQuery.java index a67d5100ff..c74e0bb145 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/PatientEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/PatientEncounterQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/SqlEncounterQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/SqlEncounterQuery.java index 3c29853d48..aea504f0b7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/SqlEncounterQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/definition/SqlEncounterQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AllEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AllEncounterQueryEvaluator.java index ff6a3c5241..c944b11a4c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AllEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AllEncounterQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluator.java index 93fd7b4be9..f0eacd92d0 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/AuditEncounterQueryEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluator.java index dd9d7e45f7..61e972b001 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/BasicEncounterQueryEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.openmrs.Encounter; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluator.java index 34876e7c60..b0025e8e3d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/CompositionEncounterQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluator.java index b29fe49a69..4c25f968fb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ConditionalParameterEncounterQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/EncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/EncounterQueryEvaluator.java index fe23dba68d..824a425162 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/EncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/EncounterQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluator.java index 122ef9c39f..050f8895f3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersEncounterQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.encounter.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluator.java index a5ab5c7a4e..efa46ecd86 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/MostRecentEncounterForPatientQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluator.java index 94f90b9dea..73dc519b2a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/ObsForEncounterQueryEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.encounter.evaluator; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/PatientEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/PatientEncounterQueryEvaluator.java index 1a76c9c78d..78248b673a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/PatientEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/PatientEncounterQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluator.java index f9218235fc..f6bf041d22 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/evaluator/SqlEncounterQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/persister/SerializedEncounterQueryPersister.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/persister/SerializedEncounterQueryPersister.java index ce54ad348f..ddefac2863 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/persister/SerializedEncounterQueryPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/persister/SerializedEncounterQueryPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryService.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryService.java index 1f26e63b91..73b59a0713 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImpl.java index b3fa460c84..2cb5d02fa6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/encounter/service/EncounterQueryServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.encounter.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/evaluator/CompositionQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/evaluator/CompositionQueryEvaluator.java index a4690d7d3b..f83afc2e49 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/evaluator/CompositionQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/evaluator/CompositionQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsIdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsIdSet.java index 076a3ec34a..10f2e3b1ac 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsIdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsQueryResult.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsQueryResult.java index 543f3fcb7b..d0f26eec0d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsQueryResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/ObsQueryResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/AllObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/AllObsQuery.java index 3eb92b2429..fe4418485a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/AllObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/AllObsQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.definition; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/BasicObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/BasicObsQuery.java index 93562598f1..4a3e70c6fc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/BasicObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/BasicObsQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.definition; import org.openmrs.Concept; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/MappedParametersObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/MappedParametersObsQuery.java index 41d06b2e33..932b727003 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/MappedParametersObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/MappedParametersObsQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.definition; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/ObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/ObsQuery.java index 5c997a4a81..f660b55a9c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/ObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/ObsQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/PatientObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/PatientObsQuery.java index 587c0e0cf1..9b8d631954 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/PatientObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/PatientObsQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.definition; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/SqlObsQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/SqlObsQuery.java index 11c47c0e69..1c245ad123 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/SqlObsQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/definition/SqlObsQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluator.java index 508371abeb..61d1947899 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/AllObsQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluator.java index ca066eab13..dc15e29d32 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/BasicObsQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.evaluator; import org.openmrs.Obs; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/MappedParametersObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/MappedParametersObsQueryEvaluator.java index 4a8aa27391..0ccf7ff929 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/MappedParametersObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/MappedParametersObsQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.evaluator; import org.openmrs.annotation.Handler; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/ObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/ObsQueryEvaluator.java index ddfef0a24b..42206ae669 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/ObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/ObsQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/PatientObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/PatientObsQueryEvaluator.java index 827747cc11..1c6d853dcb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/PatientObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/PatientObsQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.obs.evaluator; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluator.java index c2666d5f25..d00e349b03 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/persister/SerializedObsQueryPersister.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/persister/SerializedObsQueryPersister.java index 8dda111ef1..ccb81d443b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/persister/SerializedObsQueryPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/persister/SerializedObsQueryPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryService.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryService.java index 645a5810df..19f9631042 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImpl.java index 02b15ac189..b19d26976c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/obs/service/ObsQueryServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.obs.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/PersonIdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/person/PersonIdSet.java index 89a14918f4..1ec4b3686b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/PersonIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/PersonIdSet.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/PersonQueryResult.java b/api/src/main/java/org/openmrs/module/reporting/query/person/PersonQueryResult.java index 432a1992d3..9286791928 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/PersonQueryResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/PersonQueryResult.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/AllPersonQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/AllPersonQuery.java index aaa61e89bb..8e70946105 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/AllPersonQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/AllPersonQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PatientPersonQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PatientPersonQuery.java index 2d0342b9cf..5b3de3f16f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PatientPersonQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PatientPersonQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PersonQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PersonQuery.java index 3ff1e4cf6c..09c4fcc74a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PersonQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/PersonQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/SqlPersonQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/SqlPersonQuery.java index ea803f662b..6f3407aa39 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/definition/SqlPersonQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/definition/SqlPersonQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluator.java index 55cc9d0241..5d3dd61796 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/AllPersonQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluator.java index cd62395598..9503459c0d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PatientPersonQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PersonQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PersonQueryEvaluator.java index 8d98f6b43f..9b297aa8f7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PersonQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/PersonQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluator.java index 0b807758ed..52c4e3f55e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/evaluator/SqlPersonQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/persister/SerializedPersonQueryPersister.java b/api/src/main/java/org/openmrs/module/reporting/query/person/persister/SerializedPersonQueryPersister.java index 6e9096a4c3..472786e9cf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/persister/SerializedPersonQueryPersister.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/persister/SerializedPersonQueryPersister.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.persister; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryService.java b/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryService.java index b0bc583b71..544924c5c1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImpl.java index 4c47573e8c..fae297563e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/person/service/PersonQueryServiceImpl.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.person.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitIdSet.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitIdSet.java index 29a61621f5..97aa129390 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitIdSet.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitIdSet.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit; import java.util.List; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitQueryResult.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitQueryResult.java index f07507c36c..5dcd483db7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitQueryResult.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/VisitQueryResult.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit; import org.openmrs.module.reporting.evaluation.Evaluated; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/ActiveVisitQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/ActiveVisitQuery.java index f7b4fdf55b..802e02b1bc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/ActiveVisitQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/ActiveVisitQuery.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit.definition; import org.openmrs.Visit; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/AllVisitQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/AllVisitQuery.java index 13446d7684..4f6d804cc4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/AllVisitQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/AllVisitQuery.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.visit.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/BasicVisitQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/BasicVisitQuery.java index 53d8834c04..8b597a4b22 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/BasicVisitQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/BasicVisitQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.visit.definition; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/VisitQuery.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/VisitQuery.java index dd2c06aa3b..26fa139c00 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/VisitQuery.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/definition/VisitQuery.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.visit.definition; import org.openmrs.Visit; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluator.java index ad7004cd61..902a9082bb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit.evaluator; import org.openmrs.Visit; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/AllVisitQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/AllVisitQueryEvaluator.java index c875eed1f0..60df5ca1a5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/AllVisitQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/AllVisitQueryEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.query.visit.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluator.java index fe787e51aa..4366acac3b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.visit.evaluator; import java.util.List; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/VisitQueryEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/VisitQueryEvaluator.java index 176e511034..227aebf7d6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/VisitQueryEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/evaluator/VisitQueryEvaluator.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.query.visit.evaluator; import org.openmrs.module.reporting.definition.evaluator.DefinitionEvaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryService.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryService.java index 38b5eda614..822efa7c6f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryService.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryService.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit.service; import org.openmrs.module.reporting.definition.service.DefinitionService; diff --git a/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryServiceImpl.java index 72385bec64..83e7783fe7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/query/visit/service/VisitQueryServiceImpl.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.query.visit.service; import org.openmrs.module.reporting.definition.service.DefinitionService; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/Report.java b/api/src/main/java/org/openmrs/module/reporting/report/Report.java index 12d0a37fce..9cdaa56752 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/Report.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/Report.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report; import org.openmrs.module.reporting.report.renderer.ReportRenderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/ReportData.java b/api/src/main/java/org/openmrs/module/reporting/report/ReportData.java index 7861e8adff..efcd9a8364 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/ReportData.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/ReportData.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/ReportDesign.java b/api/src/main/java/org/openmrs/module/reporting/report/ReportDesign.java index 3606f5df81..9b9ad99c40 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/ReportDesign.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/ReportDesign.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/ReportDesignResource.java b/api/src/main/java/org/openmrs/module/reporting/report/ReportDesignResource.java index 28fa26e938..6e1f71aa49 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/ReportDesignResource.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/ReportDesignResource.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/ReportProcessorConfiguration.java b/api/src/main/java/org/openmrs/module/reporting/report/ReportProcessorConfiguration.java index 72cf8617e8..84b2a991af 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/ReportProcessorConfiguration.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/ReportProcessorConfiguration.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/ReportRequest.java b/api/src/main/java/org/openmrs/module/reporting/report/ReportRequest.java index b2019b9eaf..4a20b510eb 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/ReportRequest.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/ReportRequest.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report; import org.openmrs.BaseOpenmrsObject; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/BaseReportDefinition.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/BaseReportDefinition.java index d4fd694d4e..a80b66e5ae 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/BaseReportDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/BaseReportDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/PeriodIndicatorReportDefinition.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/PeriodIndicatorReportDefinition.java index 7e88f37656..5680cb97e8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/PeriodIndicatorReportDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/PeriodIndicatorReportDefinition.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.definition; import java.util.HashMap; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/ReportDefinition.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/ReportDefinition.java index 896735bf8f..8fd4653a5d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/ReportDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/ReportDefinition.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/DefaultReportDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/DefaultReportDefinitionEvaluator.java index 6a56963d8f..b33216f43f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/DefaultReportDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/DefaultReportDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/ReportDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/ReportDefinitionEvaluator.java index eca7167a5e..9ee7a64d7a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/ReportDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/evaluator/ReportDefinitionEvaluator.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition.evaluator; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionService.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionService.java index e0c96524e4..9d35176d5f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionService.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.definition.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImpl.java index c41157cf33..4bd37b67d4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/definition/service/ReportDefinitionServiceImpl.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.definition.service; import org.openmrs.api.APIException; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/manager/BaseReportManager.java b/api/src/main/java/org/openmrs/module/reporting/report/manager/BaseReportManager.java index e5332f77ec..e2be48d44f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/manager/BaseReportManager.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/manager/BaseReportManager.java @@ -1,17 +1,12 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.report.manager; import org.openmrs.module.reporting.evaluation.parameter.Parameter; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManager.java b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManager.java index 6120d8d215..76e4353daf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManager.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManager.java @@ -1,15 +1,11 @@ -/* - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.manager; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java index 25b39bb9ec..30ff117075 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.manager; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/processor/DiskReportProcessor.java b/api/src/main/java/org/openmrs/module/reporting/report/processor/DiskReportProcessor.java index 13c67c8a47..d5be4ec0e3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/processor/DiskReportProcessor.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/processor/DiskReportProcessor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.processor; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/processor/EmailReportProcessor.java b/api/src/main/java/org/openmrs/module/reporting/report/processor/EmailReportProcessor.java index 916c0d7b38..502e676705 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/processor/EmailReportProcessor.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/processor/EmailReportProcessor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.processor; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/processor/LoggingReportProcessor.java b/api/src/main/java/org/openmrs/module/reporting/report/processor/LoggingReportProcessor.java index 717411c4cb..dd97d78882 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/processor/LoggingReportProcessor.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/processor/LoggingReportProcessor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.processor; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/processor/ReportProcessor.java b/api/src/main/java/org/openmrs/module/reporting/report/processor/ReportProcessor.java index 2aed229af9..ee1cc443e1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/processor/ReportProcessor.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/processor/ReportProcessor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.processor; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/AbstractReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/AbstractReportRenderer.java index 0061944af4..e95e9c346e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/AbstractReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/AbstractReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRenderer.java index aaca2b6d4a..da2eb0ebbe 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/CohortDetailReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/CsvReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/CsvReportRenderer.java index 45896c83b8..b279f88c24 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/CsvReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/CsvReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRenderer.java index 3a1ab62116..ef9f9feb3b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/DelimitedTextReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRenderer.java index a6445876e9..237edd1209 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ExcelTemplateRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/IndicatorReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/IndicatorReportRenderer.java index 05c2811fde..756531d990 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/IndicatorReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/IndicatorReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/InteractiveReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/InteractiveReportRenderer.java index c2ad92494b..f936183848 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/InteractiveReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/InteractiveReportRenderer.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.renderer; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingException.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingException.java index 5992865392..8a7f94cbc5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingException.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingMode.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingMode.java index 72043af260..7169354e2e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingMode.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/RenderingMode.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportDesignRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportDesignRenderer.java index 5fda86db18..0bc18f37d5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportDesignRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportDesignRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRenderer.java index 7a27d9d61e..735c780629 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRendererException.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRendererException.java index afdc437724..d3aabd4002 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRendererException.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportRendererException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java index 25ab07f2db..11aa975c1e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/SimpleHtmlReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/SimpleHtmlReportRenderer.java index 0cd96afab0..a5f3f845db 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/SimpleHtmlReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/SimpleHtmlReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/TextTemplateRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/TextTemplateRenderer.java index cc1a7dba9a..731cbb6815 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/TextTemplateRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/TextTemplateRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/TsvReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/TsvReportRenderer.java index 59dc47d755..968a824359 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/TsvReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/TsvReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/XlsReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/XlsReportRenderer.java index ac59dd1f92..edbebe7390 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/XlsReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/XlsReportRenderer.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.renderer; import org.apache.commons.io.IOUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/XmlReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/XmlReportRenderer.java index 918aeb9e73..855351a2ce 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/XmlReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/XmlReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/GroovyTemplateEngine.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/GroovyTemplateEngine.java index d9fda41427..604d538578 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/GroovyTemplateEngine.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/GroovyTemplateEngine.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer.template; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngine.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngine.java index 40e4186f9f..a51e74f77a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngine.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngine.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer.template; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngineManager.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngineManager.java index 4a97e5f5d7..299de8b151 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngineManager.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEngineManager.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer.template; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEvaluationException.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEvaluationException.java index cb675ff876..b88b488c10 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEvaluationException.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/TemplateEvaluationException.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer.template; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/VelocityTemplateEngine.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/VelocityTemplateEngine.java index a588e2d5f4..a56180148d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/VelocityTemplateEngine.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/template/VelocityTemplateEngine.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.renderer.template; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java index 7b02ccc6e3..fac343a05a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java index 98a27e505c..41d9602c06 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.service; import org.apache.commons.io.FileUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java index bc693dd364..aabed07c71 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java index b6c728803f..c36e465c07 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.service.db; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/DeleteOldReportsTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/DeleteOldReportsTask.java index 1edec9d9f6..50b83995ef 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/DeleteOldReportsTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/DeleteOldReportsTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/PersistCachedReportsTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/PersistCachedReportsTask.java index 19bc3da806..42d65fe10f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/PersistCachedReportsTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/PersistCachedReportsTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; /** diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/QueueScheduledReportsTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/QueueScheduledReportsTask.java index fb6f9422ec..5fb228da34 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/QueueScheduledReportsTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/QueueScheduledReportsTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTask.java index a47e230173..844caadb92 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTimerTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTimerTask.java index e7c6802895..2750e8018d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTimerTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/ReportingTimerTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/task/RunQueuedReportsTask.java b/api/src/main/java/org/openmrs/module/reporting/report/task/RunQueuedReportsTask.java index 22e659ea31..beae157ef1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/task/RunQueuedReportsTask.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/task/RunQueuedReportsTask.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.task; import org.apache.commons.logging.Log; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/util/PeriodIndicatorReportUtil.java b/api/src/main/java/org/openmrs/module/reporting/report/util/PeriodIndicatorReportUtil.java index 4735d986eb..3c3bb838b1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/util/PeriodIndicatorReportUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/util/PeriodIndicatorReportUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.util; import java.util.ArrayList; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/util/ReportUtil.java b/api/src/main/java/org/openmrs/module/reporting/report/util/ReportUtil.java index ab2fdecda7..64658110c7 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/util/ReportUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/util/ReportUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.util; import org.apache.commons.io.FileUtils; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/util/SqlScriptParser.java b/api/src/main/java/org/openmrs/module/reporting/report/util/SqlScriptParser.java index f93492f193..d2a6e6a1ed 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/util/SqlScriptParser.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/util/SqlScriptParser.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.report.util; import java.io.BufferedReader; diff --git a/api/src/main/java/org/openmrs/module/reporting/report/util/SqlUtils.java b/api/src/main/java/org/openmrs/module/reporting/report/util/SqlUtils.java index 4f9797790f..70ce5b390e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/util/SqlUtils.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/util/SqlUtils.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.report.util; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/CalculationRegistrationShortConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/CalculationRegistrationShortConverter.java index c71ec4abc5..b65b4ba0f9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/CalculationRegistrationShortConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/CalculationRegistrationShortConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import com.thoughtworks.xstream.converters.ConverterLookup; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/CohortDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/CohortDefinitionConverter.java index 4b24646305..c308791074 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/CohortDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/CohortDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/DataSetDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/DataSetDefinitionConverter.java index 2fd6eaf468..01d60c024e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/DataSetDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/DataSetDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/DimensionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/DimensionConverter.java index 636c60d88b..b51c4e78ec 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/DimensionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/DimensionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterDataDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterDataDefinitionConverter.java index 970831fe11..1c07944c24 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterDataDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterDataDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterQueryConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterQueryConverter.java index 7363bcf8ba..b0cbb7cf28 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterQueryConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/EncounterQueryConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/IndicatorConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/IndicatorConverter.java index ead23cd58f..ce21713d10 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/IndicatorConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/IndicatorConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ObsQueryConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ObsQueryConverter.java index af287ed7e4..3cbd9416ff 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ObsQueryConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ObsQueryConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/PatientDataDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/PatientDataDefinitionConverter.java index ed81e2b3b6..669cac9d2d 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/PatientDataDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/PatientDataDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/PersonDataDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/PersonDataDefinitionConverter.java index 2ccdc5a6e9..3a14e5b452 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/PersonDataDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/PersonDataDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/PersonQueryConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/PersonQueryConverter.java index 96e2580c6d..931ddfe08b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/PersonQueryConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/PersonQueryConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportDefinitionConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportDefinitionConverter.java index 912b81d678..0b83e99440 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportDefinitionConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportDefinitionConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.api.context.Context; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 76fc81eeff..4e1a248cb8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import com.thoughtworks.xstream.XStream; diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingShortConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingShortConverter.java index c642303ae1..84f7312f65 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingShortConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingShortConverter.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.serializer; import org.openmrs.module.reporting.definition.service.DefinitionService; diff --git a/api/src/main/java/org/openmrs/module/reporting/template/HandlebarsHelpers.java b/api/src/main/java/org/openmrs/module/reporting/template/HandlebarsHelpers.java index b26bb9c107..18b4ba40d9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/template/HandlebarsHelpers.java +++ b/api/src/main/java/org/openmrs/module/reporting/template/HandlebarsHelpers.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.template; import com.github.jknack.handlebars.Handlebars; diff --git a/api/src/main/java/org/openmrs/module/reporting/template/TemplateFactory.java b/api/src/main/java/org/openmrs/module/reporting/template/TemplateFactory.java index 205f394306..31f28cafc9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/template/TemplateFactory.java +++ b/api/src/main/java/org/openmrs/module/reporting/template/TemplateFactory.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.template; import com.github.jknack.handlebars.Handlebars; diff --git a/api/src/main/java/org/openmrs/module/reporting/validator/CohortDefinitionValidator.java b/api/src/main/java/org/openmrs/module/reporting/validator/CohortDefinitionValidator.java index 5bf643f012..9e2871ef27 100644 --- a/api/src/main/java/org/openmrs/module/reporting/validator/CohortDefinitionValidator.java +++ b/api/src/main/java/org/openmrs/module/reporting/validator/CohortDefinitionValidator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.validator; import java.util.Collection; diff --git a/api/src/main/java/org/openmrs/module/reporting/web/renderers/AbstractWebReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/web/renderers/AbstractWebReportRenderer.java index f480388bdc..0fe48f4540 100644 --- a/api/src/main/java/org/openmrs/module/reporting/web/renderers/AbstractWebReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/web/renderers/AbstractWebReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.renderers; diff --git a/api/src/main/java/org/openmrs/module/reporting/web/renderers/DefaultWebRenderer.java b/api/src/main/java/org/openmrs/module/reporting/web/renderers/DefaultWebRenderer.java index fcfa81c41e..2c735bbb12 100644 --- a/api/src/main/java/org/openmrs/module/reporting/web/renderers/DefaultWebRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/web/renderers/DefaultWebRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.renderers; diff --git a/api/src/main/java/org/openmrs/module/reporting/web/renderers/LogicReportWebRenderer.java b/api/src/main/java/org/openmrs/module/reporting/web/renderers/LogicReportWebRenderer.java index ea3b1e6e11..079046af6e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/web/renderers/LogicReportWebRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/web/renderers/LogicReportWebRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.renderers; diff --git a/api/src/main/java/org/openmrs/module/reporting/web/renderers/WebReportRenderer.java b/api/src/main/java/org/openmrs/module/reporting/web/renderers/WebReportRenderer.java index 057343e276..14688b2982 100644 --- a/api/src/main/java/org/openmrs/module/reporting/web/renderers/WebReportRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/web/renderers/WebReportRenderer.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.renderers; diff --git a/license-header.txt b/license-header.txt new file mode 100644 index 0000000000..1b0eb4fefd --- /dev/null +++ b/license-header.txt @@ -0,0 +1,7 @@ +This Source Code Form is subject to the terms of the Mozilla Public License, +v. 2.0. If a copy of the MPL was not distributed with this file, You can +obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under +the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + +Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS +graphic logo is a trademark of OpenMRS Inc. \ No newline at end of file diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java index 1334633453..838e9f2156 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.cohorts; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java index e46ea37989..93c7dba11b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.cohorts; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java index 000da621d8..547378ff5a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.cohorts; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java index a06b642846..57d84817af 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import java.util.Iterator; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java index fb45f00572..6f0f387efb 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.springframework.stereotype.Controller; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java index 63f0da7a47..68d9c0de36 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java index fe5efa83ed..dd03e45cab 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import java.util.*; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java index 8cdbb9aa2f..ba3fea8547 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import java.io.PrintStream; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java index 8444bbead5..947aece6c0 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java index 79a040597b..024edacd4b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.apache.commons.logging.Log; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java index a50d7a9fe1..385261f674 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java index 543d4540f9..eae98ca09f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java index 38a812d586..71db6e1a21 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.springframework.beans.propertyeditors.CustomDateEditor; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java index dafb487d1b..9a320c8655 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.apache.commons.logging.Log; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java index 6c40e742b2..9481b6c7c5 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java index ec70e56d70..6fcd1526d9 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ViewPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ViewPortletController.java index 19bc95e018..7fc81f8009 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ViewPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ViewPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller; import org.apache.commons.lang.StringUtils; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/AnnotatedDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/AnnotatedDefinitionMappingHandler.java index aeee49ac69..bfb41e0d37 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/AnnotatedDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/AnnotatedDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortCrossTabDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortCrossTabDataSetDefinitionMappingHandler.java index 342f6709d2..a0ac00f9d0 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortCrossTabDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortCrossTabDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortDefinitionMappingHandler.java index 051ceb7806..7b8f51489d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortIndicatorAndDimensionDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortIndicatorAndDimensionDataSetDefinitionMappingHandler.java index 2f440db800..509347fe65 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortIndicatorAndDimensionDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CohortIndicatorAndDimensionDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CompositionCohortDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CompositionCohortDefinitionMappingHandler.java index 07dba65642..fba69b583d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CompositionCohortDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/CompositionCohortDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DataSetDefinitionMappingHandler.java index c0bee61eba..e14a62942d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DefinitionMappingHandler.java index 1f29bdf472..360d81ad4e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/DefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/LogicDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/LogicDataSetDefinitionMappingHandler.java index 012aa2a06d..d11196b8b1 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/LogicDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/LogicDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/MultiParameterDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/MultiParameterDataSetDefinitionMappingHandler.java index a98b2b4f95..12e1cbf465 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/MultiParameterDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/MultiParameterDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/PatientDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/PatientDataSetDefinitionMappingHandler.java index bbe70fb699..e435ba2b6a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/PatientDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/PatientDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/ScriptedCompositionPatientDataDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/ScriptedCompositionPatientDataDefinitionMappingHandler.java index aa22e6e55b..5813974a7e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/ScriptedCompositionPatientDataDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/ScriptedCompositionPatientDataDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlCohortDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlCohortDefinitionMappingHandler.java index c312746cb2..90e93cbf09 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlCohortDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlCohortDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataDefinitionMappingHandler.java index 13cc1a9024..199287de17 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataSetDefinitionMappingHandler.java index 63015793e2..e5ec9578a4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataSetDefinitionMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlDataSetDefinitionMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlQueryMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlQueryMappingHandler.java index c8986efaf3..0e0cf0a220 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlQueryMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/SqlQueryMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/DelimitedTextReportRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/DelimitedTextReportRendererMappingHandler.java index 4b3c73cda6..57b2bb6ffa 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/DelimitedTextReportRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/DelimitedTextReportRendererMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/ExcelTemplateRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/ExcelTemplateRendererMappingHandler.java index 0a67b6c8ae..d244d06b51 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/ExcelTemplateRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/ExcelTemplateRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/IndicatorReportRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/IndicatorReportRendererMappingHandler.java index c163535b99..1c96e2992b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/IndicatorReportRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/IndicatorReportRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/RendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/RendererMappingHandler.java index e667a5e32b..36d930c372 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/RendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/RendererMappingHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.mapping.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/SimpleHtmlReportRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/SimpleHtmlReportRendererMappingHandler.java index ecc1ac7699..0a172bc3e7 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/SimpleHtmlReportRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/SimpleHtmlReportRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/TextTemplateRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/TextTemplateRendererMappingHandler.java index 94d0b0e315..a5c07b3f26 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/TextTemplateRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/TextTemplateRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XlsReportRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XlsReportRendererMappingHandler.java index e89b592de3..9531199380 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XlsReportRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XlsReportRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XmlReportRendererMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XmlReportRendererMappingHandler.java index 5ed9685491..063ed389f5 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XmlReportRendererMappingHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/renderers/XmlReportRendererMappingHandler.java @@ -1,17 +1,12 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ - package org.openmrs.module.reporting.web.controller.mapping.renderers; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/BaseCohortIndicatorPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/BaseCohortIndicatorPortletController.java index 753169e373..9612137d0e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/BaseCohortIndicatorPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/BaseCohortIndicatorPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Map; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/CohortIndicatorAndDimensionSpecificationPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/CohortIndicatorAndDimensionSpecificationPortletController.java index dd742fc09d..29626785f6 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/CohortIndicatorAndDimensionSpecificationPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/CohortIndicatorAndDimensionSpecificationPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ErrorReportsPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ErrorReportsPortletController.java index befd7c678e..52a3a22979 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ErrorReportsPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ErrorReportsPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Collections; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletController.java index 724cae51b3..52356ed201 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.lang.reflect.Field; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java index a06cd7a4e2..a9efb5c5f3 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.lang.reflect.Field; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MultiParameterIterationParameterEditPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MultiParameterIterationParameterEditPortletController.java index 78859af124..d314b7b554 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MultiParameterIterationParameterEditPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MultiParameterIterationParameterEditPortletController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.controller.portlet; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletController.java index f21b3ff24f..0c54944174 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Map; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java index 7b574ac691..24b3416e22 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Collection; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletController.java index f2e0f93349..0d022d2a6a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Map; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java index 7c80fdd2fb..3371ee9fef 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import javax.servlet.http.HttpServletRequest; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/QueuedReportsPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/QueuedReportsPortletController.java index 7fcce9279b..15da806cd5 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/QueuedReportsPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/QueuedReportsPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java index 86b2843a8f..612e14b37c 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.HashSet; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignPortletController.java index df5167951c..29a4394975 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Map; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportHistoryPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportHistoryPortletController.java index 03b40ece79..de346264c4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportHistoryPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportHistoryPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportListPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportListPortletController.java index 6e32b44510..eeb43dcb33 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportListPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportListPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java index 22f8c97c4f..3385a666fa 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.Properties; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorPortletController.java index c97411603e..a3851ec1ae 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportingPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportingPortletController.java index f822ea5368..c18d246c7a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportingPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportingPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.io.IOException; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/RunReportPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/RunReportPortletController.java index 351fe123c9..21313f4c38 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/RunReportPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/RunReportPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/SavedReportsPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/SavedReportsPortletController.java index 78150b352f..428ae3c8a4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/SavedReportsPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/SavedReportsPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ScheduledReportsPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ScheduledReportsPortletController.java index 046704cef5..83090ea3f7 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ScheduledReportsPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ScheduledReportsPortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.controller.portlet; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java index bf938dd2ed..a00dfa4111 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.datasets; import org.apache.commons.logging.Log; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java index 8bf9a29574..91a405ff8d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.datasets; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java index db341fde9c..c6df15a5a9 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.datasets; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java index bf85121140..870ed2046f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.datasets; import org.apache.commons.logging.Log; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java index 573f3d2551..1bec39fe9e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.datasets; import org.apache.commons.lang.StringUtils; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java index 5d36ef8652..97087b1eca 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.datasets; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java index b2d0c92429..8430ba2301 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.datasets; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java index 9966a068ea..6f34bf7011 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.dimensions; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java index d6e6c91b11..227767fa25 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.dimensions; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/extension/GutterListExt.java b/omod/src/main/java/org/openmrs/module/reporting/web/extension/GutterListExt.java index 21820ef877..f803b1fec2 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/extension/GutterListExt.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/extension/GutterListExt.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.extension; import org.openmrs.module.web.extension.LinkExt; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/extension/ManageAdminListExt.java b/omod/src/main/java/org/openmrs/module/reporting/web/extension/ManageAdminListExt.java index b1614ba7fd..3158f021cb 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/extension/ManageAdminListExt.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/extension/ManageAdminListExt.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.extension; import java.util.LinkedHashMap; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/extension/RunAdminListExt.java b/omod/src/main/java/org/openmrs/module/reporting/web/extension/RunAdminListExt.java index 023e0eaf51..49c9af045d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/extension/RunAdminListExt.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/extension/RunAdminListExt.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.extension; import java.util.LinkedHashMap; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java index 80314462f2..6719be699d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.indicator; import org.openmrs.api.context.Context; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java index 8d93eb9ef4..0e141a488e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.indicator; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/model/IndicatorForm.java b/omod/src/main/java/org/openmrs/module/reporting/web/model/IndicatorForm.java index c7b13a9857..19573a7b63 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/model/IndicatorForm.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/model/IndicatorForm.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.model; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java index 039abd53a4..4498dc2c2f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.reports; import org.openmrs.module.reporting.ReportingConstants; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java index 3bae22029a..60dea92492 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java index edf2df2fe5..d9104fc71b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.reports; import java.util.HashMap; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java index 251c3a488f..d2665a7402 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java index 7c3a950472..9880e7e442 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java index 7498392ad9..650c5f5ba7 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.reports; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java index e35d126522..c31c55e18f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.reports; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java index 572497da3e..73e225e098 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.reports; import org.apache.commons.io.IOUtils; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportRequestPortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportRequestPortletController.java index b4edcb377f..f88886458c 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportRequestPortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportRequestPortletController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportFormController.java index a885f0d054..012b7a1d5c 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportListController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportListController.java index 4d580a838e..c9d1aaab7b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportListController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/RunReportListController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java index 0b78b83efd..6e1b999d8c 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java index 4514fad4a5..8840aeb49a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java index ab1fa3029f..acf49a3613 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java index 33015edd53..b49e41adb0 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.reports.renderers; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DataSetTag.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DataSetTag.java index 9504c8ac0f..3fe16a8244 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DataSetTag.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DataSetTag.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.taglib; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DisplayLabelTag.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DisplayLabelTag.java index 9411d3b5a4..2fe70a22ed 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DisplayLabelTag.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/DisplayLabelTag.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.taglib; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/ForEachTag.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/ForEachTag.java index 6bce50d236..00309c293f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/ForEachTag.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/ForEachTag.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.taglib; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/FormatTag.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/FormatTag.java index 917bb925a3..8e1be720db 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/FormatTag.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/FormatTag.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.taglib; import java.io.IOException; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/Functions.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/Functions.java index ee7ab9424a..209edfb8fb 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/Functions.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/Functions.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.taglib; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/TimespanTag.java b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/TimespanTag.java index c130fe14f9..fbe27c8f88 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/taglib/TimespanTag.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/taglib/TimespanTag.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.taglib; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/util/AjaxUtil.java b/omod/src/main/java/org/openmrs/module/reporting/web/util/AjaxUtil.java index 1bef1085e5..1bf89f4c6a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/util/AjaxUtil.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/util/AjaxUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.util; import java.io.StringWriter; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/util/ParameterUtil.java b/omod/src/main/java/org/openmrs/module/reporting/web/util/ParameterUtil.java index ef1ee48fd5..57e0ecfb2d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/util/ParameterUtil.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/util/ParameterUtil.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.util; import java.util.ArrayList; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/validator/IndicatorFormValidator.java b/omod/src/main/java/org/openmrs/module/reporting/web/validator/IndicatorFormValidator.java index 7a38a5f049..a3001b6d09 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/validator/IndicatorFormValidator.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/validator/IndicatorFormValidator.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.validator; import java.util.List; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/AjaxController.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/AjaxController.java index 7171720aa4..3273ec8f22 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/AjaxController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/AjaxController.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.widget; import java.lang.reflect.Field; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CalculationRegistrationHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CalculationRegistrationHandler.java index 8960bad0f0..f61c9f258d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CalculationRegistrationHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CalculationRegistrationHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortDefinitionHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortDefinitionHandler.java index d34dff01a1..48a013a1c3 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortDefinitionHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/CohortDefinitionHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DataSetDefinitionHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DataSetDefinitionHandler.java index 0e62268c20..22a16113ff 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DataSetDefinitionHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DataSetDefinitionHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DimensionHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DimensionHandler.java index 7861c50105..f0a4e87732 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DimensionHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/DimensionHandler.java @@ -1,3 +1,12 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ package org.openmrs.module.reporting.web.widget.handler; import org.openmrs.annotation.Handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/IndicatorHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/IndicatorHandler.java index d27f70be60..5bf7e66559 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/IndicatorHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/IndicatorHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/MappedHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/MappedHandler.java index 88f6ada939..7d6b2ee957 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/MappedHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/MappedHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/PatientDataDefinitionHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/PatientDataDefinitionHandler.java index a6edd091b5..714a7cb470 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/PatientDataDefinitionHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/PatientDataDefinitionHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDefinitionHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDefinitionHandler.java index 4743977e75..65aee1fed2 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDefinitionHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDefinitionHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignRendererHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignRendererHandler.java index 1c9dedc2fe..2974448c23 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignRendererHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignRendererHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignResourceHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignResourceHandler.java index d77e4df20d..9367303ae6 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignResourceHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ReportDesignResourceHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ScriptingLanguageHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ScriptingLanguageHandler.java index 5ce7eb3746..1b96308566 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ScriptingLanguageHandler.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/widget/handler/ScriptingLanguageHandler.java @@ -1,15 +1,11 @@ /** - * The contents of this file are subject to the OpenMRS Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://license.openmrs.org + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * - * Copyright (C) OpenMRS, LLC. All Rights Reserved. + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. */ package org.openmrs.module.reporting.web.widget.handler; From 7a068852508d4a32d3e5ed629df75697cdd5e1d3 Mon Sep 17 00:00:00 2001 From: mseaton Date: Tue, 10 Apr 2018 01:02:53 -0400 Subject: [PATCH 003/143] REPORT-843 BirthAndDeathCohortDefinition should query on whether patient is marked as dead --- ...AndDeathCohortDefinitionEvaluatorTest.java | 25 +++++++++++++++++ .../BirthAndDeathCohortDefinition.java | 23 +++++++++++++--- ...irthAndDeathCohortDefinitionEvaluator.java | 27 +++++++++++++------ .../BuiltInCohortDefinitionLibrary.java | 1 + 4 files changed, 65 insertions(+), 11 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java index a7ec30c3d8..a186f394ac 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluatorTest.java @@ -162,4 +162,29 @@ public void evaluate_shouldFindPatientsThatDiedAfterTheSpecifiedDate() throws Ex Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null); Assert.assertFalse(cohort.contains(patientId)); } + + /** + * @see {@link BirthAndDeathCohortDefinitionEvaluator#evaluate(CohortDefinition,EvaluationContext)} + */ + @Test + public void evaluate_shouldReturnPatientsWhoDiedWithoutDeathDate() throws Exception { + BirthAndDeathCohortDefinition cd = new BirthAndDeathCohortDefinition(); + { + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null); + Assert.assertTrue(cohort.contains(23)); + Assert.assertTrue(cohort.contains(24)); + } + { + cd.setDied(true); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null); + Assert.assertTrue(cohort.contains(23)); + Assert.assertFalse(cohort.contains(24)); + } + { + cd.setDied(false); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null); + Assert.assertFalse(cohort.contains(23)); + Assert.assertTrue(cohort.contains(24)); + } + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java index 78d0f515ff..76aa6f6fed 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/BirthAndDeathCohortDefinition.java @@ -30,6 +30,9 @@ public class BirthAndDeathCohortDefinition extends BaseCohortDefinition { @ConfigurationProperty(group="birth") private Date bornOnOrBefore; + + @ConfigurationProperty(group="death") + private Boolean died; @ConfigurationProperty(group="death") private Date diedOnOrAfter; @@ -39,7 +42,7 @@ public class BirthAndDeathCohortDefinition extends BaseCohortDefinition { public BirthAndDeathCohortDefinition() { } - + /** * @return the bornOnOrAfter */ @@ -47,7 +50,7 @@ public Date getBornOnOrAfter() { return bornOnOrAfter; } - + /** * @param bornOnOrAfter the bornOnOrAfter to set */ @@ -71,7 +74,21 @@ public void setBornOnOrBefore(Date bornOnOrBefore) { this.bornOnOrBefore = bornOnOrBefore; } - + + /** + * @return whether the definition is configured to return patients who have been marked as died + */ + public Boolean getDied() { + return died; + } + + /** + * @param died set to true indicates to return patients who have been marked as died + */ + public void setDied(Boolean died) { + this.died = died; + } + /** * @return the diedOnOrAfter */ diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java index 341b2db3a5..331e5d7ae2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/BirthAndDeathCohortDefinitionEvaluator.java @@ -10,16 +10,21 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.openmrs.Cohort; +import org.openmrs.Patient; import org.openmrs.annotation.Handler; -import org.openmrs.api.context.Context; import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.query.service.CohortQueryService; import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.springframework.beans.factory.annotation.Autowired; @Handler(supports={BirthAndDeathCohortDefinition.class}) public class BirthAndDeathCohortDefinitionEvaluator implements CohortDefinitionEvaluator { + + @Autowired + EvaluationService evaluationService; public BirthAndDeathCohortDefinitionEvaluator() { } @@ -35,12 +40,18 @@ public BirthAndDeathCohortDefinitionEvaluator() { } * @should find patients that died after the specified date */ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationContext context) { - BirthAndDeathCohortDefinition definition = (BirthAndDeathCohortDefinition) cohortDefinition; - Cohort c = Context.getService(CohortQueryService.class).getPatientsHavingBirthAndDeath( - definition.getBornOnOrAfter(), - definition.getBornOnOrBefore(), - definition.getDiedOnOrAfter(), - definition.getDiedOnOrBefore()); + BirthAndDeathCohortDefinition cd = (BirthAndDeathCohortDefinition) cohortDefinition; + + HqlQueryBuilder q = new HqlQueryBuilder(); + q.select("p.patient.id"); + q.from(Patient.class, "p"); + q.whereGreaterOrEqualTo("p.birthdate", cd.getBornOnOrAfter()); + q.whereLessOrEqualTo("p.birthdate", cd.getBornOnOrBefore()); + q.whereEqual("p.dead", cd.getDied()); + q.whereGreaterOrEqualTo("p.deathDate", cd.getDiedOnOrAfter()); + q.whereLessOrEqualTo("p.deathDate", cd.getDiedOnOrBefore()); + Cohort c = new Cohort(evaluationService.evaluateToList(q, Integer.class, context)); + return new EvaluatedCohort(c, cohortDefinition, context); } diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java index 50e909e9ce..27564e8918 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java @@ -198,6 +198,7 @@ public CohortDefinition getBornDuringPeriod() { @DocumentedDefinition("diedDuringPeriod") public CohortDefinition getDiedDuringPeriod() { BirthAndDeathCohortDefinition cd = new BirthAndDeathCohortDefinition(); + cd.setDied(true); cd.addParameter(new Parameter("diedOnOrAfter", "reporting.parameter.startDate", Date.class)); cd.addParameter(new Parameter("diedOnOrBefore", "reporting.parameter.endDate", Date.class)); return new MappedParametersCohortDefinition(cd, "diedOnOrAfter", "startDate", "diedOnOrBefore", "endDate"); From c95776ff3519191808fcdfb94b3b62a5070bb86d Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 24 Apr 2018 14:12:24 +0000 Subject: [PATCH 004/143] [maven-release-plugin] prepare release 1.16.0 --- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 804bb0a447..8052822086 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index a1366d0fe8..6f321f3d18 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 reporting-api-2.0 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index f1a4243af4..c178fb5148 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index dd7de992d1..38a67ff255 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 0023c8f6ac..d393db000a 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 3cf11d8e76..28c9591230 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0-SNAPSHOT + 1.16.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.16.0 From c42a8ec16cf40dc699aa6b03dd4b079c2f1bb83c Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 24 Apr 2018 14:12:31 +0000 Subject: [PATCH 005/143] [maven-release-plugin] prepare for next development iteration --- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 8052822086..3411187f7e 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 6f321f3d18..34dfd450a4 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT reporting-api-2.0 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index c178fb5148..a84731f49a 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 38a67ff255..d0252d4c2f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index d393db000a..432ff74c0b 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 28c9591230..43df0d75b8 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.16.0 + 1.17.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.16.0 + HEAD From 60feba7a007292fff749981620cb6e5ff8ca0002 Mon Sep 17 00:00:00 2001 From: Samuel Male Date: Fri, 13 Jul 2018 10:10:44 +0300 Subject: [PATCH 006/143] REPORT-420:Added attribute of viewing affected Report Defs on the UI on editing a particular dataSet --- api/src/main/resources/messages.properties | 5 +- .../datasets/ManageDatasetsController.java | 35 ++++++++++++- .../main/webapp/datasets/datasetEditor.jsp | 52 +++++++++++++++++-- 3 files changed, 85 insertions(+), 7 deletions(-) diff --git a/api/src/main/resources/messages.properties b/api/src/main/resources/messages.properties index d17c4c00e9..54f10da4ad 100644 --- a/api/src/main/resources/messages.properties +++ b/api/src/main/resources/messages.properties @@ -762,4 +762,7 @@ reporting.chooseBaseDef=Choose base definition reporting.noIterationsYet=No Iterations added yet reporting.addIteration=[+] Add Iteration reporting.createNewLogicDataSet=Create New Logic DataSet -reporting.previewLimitedToRandomCohort=Results have been limited to a random cohort of {0} patients \ No newline at end of file +reporting.previewLimitedToRandomCohort=Results have been limited to a random cohort of {0} patients +reporting.affectedReportDefinitions.label=Affected Reports Definitions +reporting.loadAffectedReportDefinitions.label=Load Affected Report Definitions +reporting.noAffectedReportDefs.label=No Affected Report Defifnitions! \ No newline at end of file diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java index 870ed2046f..2cbecdca8a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java @@ -17,13 +17,19 @@ import org.openmrs.module.reporting.common.ReflectionUtil; import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; import org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionService; +import org.openmrs.module.reporting.definition.DefinitionSummary; import org.openmrs.module.reporting.definition.DefinitionUtil; import org.openmrs.module.reporting.definition.configuration.Property; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; @@ -36,7 +42,7 @@ public class ManageDatasetsController { protected Log log = LogFactory.getLog(this.getClass()); - + /** * Controller for the edit data set page */ @@ -66,7 +72,31 @@ public String editDataSet( model.addAttribute("groupedProperties", groups); return "/module/reporting/datasets/datasetEditor"; - } + } + + /* + * Load Affected Report Definitions. + */ + @RequestMapping("/module/reporting/datasets/loadAffectedDatasetDefs") + @ResponseBody() + public List loadAffectedDatasetDefs(@RequestParam(required=true,value="uuid")String uuid){ + List reportDefinitions = Context.getService(ReportDefinitionService.class).getAllDefinitions(false); + List affectedReportDefs = new ArrayList(); + for (ReportDefinition reportDef : reportDefinitions) { + List> dsds = new + ArrayList>(reportDef.getDataSetDefinitions().values()); + if (!dsds.isEmpty()) { + for (Mapped dataSet : dsds) { + if (uuid.equals(dataSet.getUuidOfMappedOpenmrsObject())) { + DefinitionSummary affectedRep = new DefinitionSummary(dataSet.getParameterizable()); + affectedReportDefs.add(affectedRep); + } + } + } + } + + return affectedReportDefs; + } /** * Save DataSetDefinition @@ -119,4 +149,5 @@ public String saveDataSet( return "redirect:/module/reporting/definition/manageDefinitions.form?type=org.openmrs.module.reporting.dataset.definition.DataSetDefinition"; } + } diff --git a/omod/src/main/webapp/datasets/datasetEditor.jsp b/omod/src/main/webapp/datasets/datasetEditor.jsp index c71709a402..f48a59ea07 100644 --- a/omod/src/main/webapp/datasets/datasetEditor.jsp +++ b/omod/src/main/webapp/datasets/datasetEditor.jsp @@ -3,8 +3,7 @@
@@ -134,7 +163,22 @@ - + + + + +
+
+ +
+
+ +
+
+
+
+ +
From 410063da702f37b54f655eb9cf582f5035b9cc8a Mon Sep 17 00:00:00 2001 From: mseaton Date: Tue, 4 Sep 2018 14:30:06 -0400 Subject: [PATCH 007/143] REPORT-845 - Support data set definition based on a SQL file and configurable connection --- .../SqlFileDataSetEvaluatorTest.java | 90 +++++ .../definition/evaluator/sqlFileNoParams.sql | 4 + .../evaluator/sqlFileWithParams.sql | 6 + .../module/reporting/common/SqlResult.java | 69 ++++ .../module/reporting/common/SqlRunner.java | 322 ++++++++++++++++++ .../definition/SqlFileDataSetDefinition.java | 88 +++++ .../evaluator/SqlFileDataSetEvaluator.java | 192 +++++++++++ 7 files changed, 771 insertions(+) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileNoParams.sql create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql create mode 100644 api/src/main/java/org/openmrs/module/reporting/common/SqlResult.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlFileDataSetDefinition.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java new file mode 100644 index 0000000000..8a8139f754 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java @@ -0,0 +1,90 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.dataset.definition.evaluator; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openmrs.PersonAttributeType; +import org.openmrs.api.PersonService; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.common.TestUtil; +import org.openmrs.module.reporting.dataset.DataSetRow; +import org.openmrs.module.reporting.dataset.SimpleDataSet; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionService; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Properties; + + +public class SqlFileDataSetEvaluatorTest extends BaseModuleContextSensitiveTest { + + protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; + + protected static final String XML_REPORT_TEST_DATASET = "ReportTestDataset"; + + @Autowired + PersonService personService; + + @Before + public void setup() throws Exception { + executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); + } + + @Override + public Properties getRuntimeProperties() { + Properties p = super.getRuntimeProperties(); + p.put("connection.url", p.getProperty("hibernate.connection.url")); + p.put("connection.driver_class", p.getProperty("hibernate.connection.driver_class")); + return p; + } + + /** + * @see {@link SqlDataSetEvaluator#evaluate(DataSetDefinition,EvaluationContext)} + */ + @Test + public void evaluate_shouldEvaluateSqlResource() throws Exception { + SqlFileDataSetDefinition d = new SqlFileDataSetDefinition(); + d.setSqlResource("org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileNoParams.sql"); + SimpleDataSet result = (SimpleDataSet) Context.getService(DataSetDefinitionService.class).evaluate(d, null); + Assert.assertEquals(1, result.getRows().size()); + Assert.assertEquals(3, result.getMetaData().getColumnCount()); + DataSetRow firstRow = result.getRows().get(0); + Assert.assertEquals(2, firstRow.getColumnValue("patient_id")); + Assert.assertEquals("M", firstRow.getColumnValue("gender")); + Assert.assertEquals(DateUtil.getDateTime(1975, 4, 8), firstRow.getColumnValue("birthdate")); + } + + /** + * @see {@link SqlDataSetEvaluator#evaluate(DataSetDefinition,EvaluationContext)} + */ + @Test + public void evaluate_shouldEvaluateSqlResourceWithParams() throws Exception { + SqlFileDataSetDefinition d = new SqlFileDataSetDefinition(); + d.setSqlResource("org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql"); + d.addParameter(new Parameter("birthplace", "birthplace", PersonAttributeType.class)); + + EvaluationContext context = new EvaluationContext(); + context.addParameterValue("birthplace", personService.getPersonAttributeTypeByName("Birthplace")); + + SimpleDataSet result = (SimpleDataSet) Context.getService(DataSetDefinitionService.class).evaluate(d, context); + Assert.assertEquals(4, result.getRows().size()); + Assert.assertEquals(4, result.getMetaData().getColumnCount()); + DataSetRow firstRow = result.getRows().get(0); + Assert.assertEquals(2, firstRow.getColumnValue("patient_id")); + Assert.assertEquals("Mooresville, NC", firstRow.getColumnValue("birthplace")); + } +} diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileNoParams.sql b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileNoParams.sql new file mode 100644 index 0000000000..ae2df30067 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileNoParams.sql @@ -0,0 +1,4 @@ +select t.patient_id, p.gender, p.birthdate +from patient t, person p +where t.patient_id = p.person_id +and t.patient_id = 2; diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql new file mode 100644 index 0000000000..9f584cc512 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql @@ -0,0 +1,6 @@ +select t.patient_id, p.gender, p.birthdate, pa.value as birthplace +from patient t +inner join person p on t.patient_id = p.person_id +left join person_attribute pa on p.person_id = pa.person_id +where pa.person_attribute_type_id = @birthplace +; diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SqlResult.java b/api/src/main/java/org/openmrs/module/reporting/common/SqlResult.java new file mode 100644 index 0000000000..bfa60017e1 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/common/SqlResult.java @@ -0,0 +1,69 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.common; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * Encapsulates the result from executing a script with a SqlRunner + */ +public class SqlResult { + + private List columns; + private List> data; + private List errors; + + public List getColumns() { + if (columns == null) { + columns = new ArrayList(); + } + return columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void addColumn(String column) { + getColumns().add(column); + } + + public List> getData() { + if (data == null) { + data = new ArrayList>(); + } + return data; + } + + public void setData(List> data) { + this.data = data; + } + + public void addData(Map row) { + getData().add(row); + } + + public List getErrors() { + if (errors == null) { + errors = new ArrayList(); + } + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + public void addError(String error) { + getErrors().add(error); + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java new file mode 100644 index 0000000000..c400db030b --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java @@ -0,0 +1,322 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.common; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.OpenmrsObject; +import org.openmrs.module.reporting.report.util.ReportUtil; + +import java.io.File; +import java.io.IOException; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Executes a SQL script + */ +public class SqlRunner { + + private static Log log = LogFactory.getLog(SqlRunner.class); + + // Regular expression to identify a change in the delimiter. This ignores spaces, allows delimiter in comment, allows an equals-sign + private static final Pattern DELIMITER_PATTERN = Pattern.compile("^\\s*(--)?\\s*delimiter\\s*=?\\s*([^\\s]+)+\\s*.*$", Pattern.CASE_INSENSITIVE); + + //*********** INSTANCE PROPERTIES ****************** + + private Connection connection; + private String delimiter = ";"; + + //*********** CONSTRUCTORS ****************** + + public SqlRunner(Connection connection) { + this.connection = connection; + } + + public SqlRunner(Connection connection, String delimiter) { + this(connection); + this.delimiter = delimiter; + } + + /** + * Executes a Sql Script located under resources + */ + public SqlResult executeSqlResource(String resourceName, Map parameterValues) { + String sql = ReportUtil.readStringFromResource(resourceName); + return executeSql(sql, parameterValues); + } + + /** + * Executes a Sql Script located as a file + */ + public SqlResult executeSqlFile(File sqlFile, Map parameterValues) { + try { + String sql = FileUtils.readFileToString(sqlFile, "UTF-8"); + return executeSql(sql, parameterValues); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load file: " + sqlFile, e); + } + } + + /** + * Executes a Sql Script + */ + public SqlResult executeSql(String sql, Map parameterValues) { + + SqlResult result = new SqlResult(); + log.info("Executing SQL..."); + + List sqlStatements = new ArrayList(); + sqlStatements.addAll(parseParametersIntoStatements(parameterValues)); + sqlStatements.addAll(parseSqlIntoStatements(sql)); + + Boolean originalAutoCommit = null; + + try { + originalAutoCommit = connection.getAutoCommit(); + connection.setAutoCommit(false); + + for (String sqlStatement : sqlStatements) { + Statement statement = null; + try { + statement = connection.createStatement(); + log.debug("Executing: " + sqlStatement); + statement.execute(sqlStatement); + ResultSet resultSet = statement.getResultSet(); + + if (resultSet != null) { + ResultSetMetaData rsmd = resultSet.getMetaData(); + int numCols = rsmd.getColumnCount(); + + for (int i = 1; i <= numCols; i++) { + result.addColumn(rsmd.getColumnLabel(i)); + } + + while (resultSet.next()) { + Map row = new HashMap(); + for (int i = 1; i <= numCols; i++) { + String columnName = result.getColumns().get(i - 1); + Object value = resultSet.getObject(i); + row.put(columnName, value); + } + result.addData(row); + } + } + } + catch (Exception e) { + String message = "Error executing statement: " + e.getMessage(); + log.error(message); + result.addError(message); + throw e; + } + finally { + closeStatement(statement); + } + } + rollback(); // Always rollback, as this is only intended to support querying + } + catch (Exception e) { + rollback(); + } + finally { + resetAutocommit(originalAutoCommit); + } + + return result; + } + + protected void closeStatement(Statement statement) { + try { + if (statement != null) { + statement.close(); + } + } + catch (Exception e) { + log.warn("An error occurred while trying to close a statement", e); + } + } + + protected void commit() { + try { + connection.commit(); + } + catch (Exception e) { + log.warn("An error occurred while trying to commit", e); + } + } + + protected void rollback() { + try { + connection.rollback(); + } + catch (Exception e) { + log.warn("An error occurred while trying to rollback a connection", e); + } + } + + protected void resetAutocommit(Boolean autocommit) { + try { + if (autocommit != null) { + connection.setAutoCommit(autocommit); + } + } + catch (Exception e) { + log.warn("An error occurred while trying to reset autocommit to " + autocommit, e); + } + } + + /** + * @return a series of statements to set SQL variables based on the passed parameter values + */ + public List parseParametersIntoStatements(Map parameterValues) { + List statements = new ArrayList(); + if (parameterValues != null) { + for (String paramName : parameterValues.keySet()) { + Object paramValue = parameterValues.get(paramName); + String sqlVal = "null"; + if (paramValue != null) { + if (paramValue instanceof Date) { + sqlVal = "'" + DateUtil.formatDate((Date)paramValue, "yyyy-MM-dd") + "'"; + } + else if (paramValue instanceof Number || paramValue instanceof Boolean) { + sqlVal = paramValue.toString(); + } + else if (paramValue instanceof OpenmrsObject) { + sqlVal = ((OpenmrsObject)paramValue).getId().toString(); + } + else { + sqlVal = "'" + paramValue.toString() + "'"; + } + } + statements.add("set @" + paramName + "=" + sqlVal); + } + } + return statements; + } + + + /** + * @return a List of statements that are parsed out of the passed sql, ignoring comments, and respecting delimiter assignment + */ + public List parseSqlIntoStatements(String sql) { + List statements = new ArrayList(); + StringBuilder currentStatement = new StringBuilder(); + + String currentDelimiter = getDelimiter(); + boolean inMultiLineComment = false; + + for (String line : sql.split("\\r?\\n")) { + + // First, trim the line and remove any trailing comments in the form of "statement; -- Comments here" + int delimiterIndex = line.indexOf(currentDelimiter); + int dashCommentIndex = line.indexOf("--"); + if (delimiterIndex > 0 && delimiterIndex < dashCommentIndex) { + line = line.substring(0, dashCommentIndex); + } + line = line.trim(); + + // Check to see if this line is within a multi-line comment, or if it ends a multi-line comment + if (inMultiLineComment) { + if (isEndOfMultiLineComment(line)) { + inMultiLineComment = false; + } + } + // If we are not within a multi-line comment, then process the line, if it is not a single line comment or empty space + else { + if (!isEmptyLine(line) && !isSingleLineComment(line)) { + + // If this line starts a multi-line comment, then ignore it and mark for next iteration + if (isStartOfMultiLineComment(line)) { + inMultiLineComment = true; + } + else { + // If the line is serving to set a new delimiter, set it and continue + String newDelimiter = getNewDelimiter(line); + if (newDelimiter != null) { + currentDelimiter = newDelimiter; + } + else { + // If we are here, that means that this line is part of an actual sql statement + if (line.endsWith(currentDelimiter)) { + line = line.substring(0, line.lastIndexOf(currentDelimiter)); + currentStatement.append(line); + statements.add(currentStatement.toString()); + currentStatement = new StringBuilder(); + } + else { + currentStatement.append(line).append("\n"); + } + } + } + } + } + } + if (currentStatement.length() > 0) { + statements.add(currentStatement.toString()); + } + return statements; + } + + //********** CONVENIENCE METHODS ************** + + protected boolean isEmptyLine(String line) { + return line == null || StringUtils.isBlank(line); + } + + protected boolean isSingleLineComment(String line) { + return line.startsWith("--") || line.startsWith("//") || (isStartOfMultiLineComment(line) && isEndOfMultiLineComment(line)); + } + + protected boolean isStartOfMultiLineComment(String line) { + return line.startsWith("/*"); + } + + protected boolean isEndOfMultiLineComment(String line) { + return line.endsWith("*/"); + } + + protected String getNewDelimiter(String line) { + Matcher matcher = DELIMITER_PATTERN.matcher(line); + if (matcher.matches()) { + return matcher.group(2); + } + return null; + } + + //************* PROPERTY ACCESS ******************* + + public Connection getConnection() { + return connection; + } + + public void setConnection(Connection connection) { + this.connection = connection; + } + + public String getDelimiter() { + return delimiter; + } + + public void setDelimiter(String delimiter) { + this.delimiter = delimiter; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlFileDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlFileDataSetDefinition.java new file mode 100644 index 0000000000..b37d6cf3a9 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/SqlFileDataSetDefinition.java @@ -0,0 +1,88 @@ +/** + * The contents of this file are subject to the OpenMRS Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://license.openmrs.org + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * Copyright (C) OpenMRS, LLC. All Rights Reserved. + */ +package org.openmrs.module.reporting.dataset.definition; + +import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; + +/** + * Evaluates a sql script found at the configured file path or resource path or with the sql contents specified + * By default, this will utilize the database connection properties in the openmrs runtime properties + * This can use an alternative database connection by specifying the file. Property names follow those in openmrs runtime properties + */ +public class SqlFileDataSetDefinition extends BaseDataSetDefinition { + + public enum MetadataParameterConversion { + ID, UUID, NAME + } + + @ConfigurationProperty + private String sqlFile; + + @ConfigurationProperty + private String sqlResource; + + @ConfigurationProperty + private String sql; + + @ConfigurationProperty + private String connectionPropertyFile; + + @ConfigurationProperty + private MetadataParameterConversion metadataParameterConversion = MetadataParameterConversion.ID; + + /** + * Constructor + */ + public SqlFileDataSetDefinition() {} + + public String getSqlFile() { + return sqlFile; + } + + public void setSqlFile(String sqlFile) { + this.sqlFile = sqlFile; + } + + public String getSqlResource() { + return sqlResource; + } + + public void setSqlResource(String sqlResource) { + this.sqlResource = sqlResource; + } + + public String getSql() { + return sql; + } + + public void setSql(String sql) { + this.sql = sql; + } + + public String getConnectionPropertyFile() { + return connectionPropertyFile; + } + + public void setConnectionPropertyFile(String connectionPropertyFile) { + this.connectionPropertyFile = connectionPropertyFile; + } + + public MetadataParameterConversion getMetadataParameterConversion() { + return metadataParameterConversion; + } + + public void setMetadataParameterConversion(MetadataParameterConversion metadataParameterConversion) { + this.metadataParameterConversion = metadataParameterConversion; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java new file mode 100644 index 0000000000..32f1133001 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java @@ -0,0 +1,192 @@ +/** + * The contents of this file are subject to the OpenMRS Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://license.openmrs.org + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * Copyright (C) OpenMRS, LLC. All Rights Reserved. + */ +package org.openmrs.module.reporting.dataset.definition.evaluator; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.OpenmrsMetadata; +import org.openmrs.annotation.Handler; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.ObjectUtil; +import org.openmrs.module.reporting.common.SqlResult; +import org.openmrs.module.reporting.common.SqlRunner; +import org.openmrs.module.reporting.dataset.DataSet; +import org.openmrs.module.reporting.dataset.DataSetColumn; +import org.openmrs.module.reporting.dataset.DataSetRow; +import org.openmrs.module.reporting.dataset.SimpleDataSet; +import org.openmrs.module.reporting.dataset.SimpleDataSetMetaData; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition.MetadataParameterConversion; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.EvaluationException; +import org.openmrs.util.OpenmrsUtil; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.sql.Connection; +import java.sql.DriverManager; +import java.util.Map; +import java.util.Properties; + +/** + * Evaluates a SqlFileDataSetDefinition and produces results + */ +@Handler(supports={SqlFileDataSetDefinition.class}) +public class SqlFileDataSetEvaluator implements DataSetEvaluator { + + protected Log log = LogFactory.getLog(this.getClass()); + + /** + * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) + */ + public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException { + + context = ObjectUtil.nvl(context, new EvaluationContext()); + SimpleDataSet data = new SimpleDataSet(dataSetDefinition, context); + + SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) dataSetDefinition; + + Properties connectionProperties = getConnectionProperties(dsd.getConnectionPropertyFile()); + Connection connection = null; + try { + connection = createConnection(connectionProperties); + + SqlRunner runner = new SqlRunner(connection); + SqlResult resultData = null; + Map parameterValues = constructParameterValues(dsd, context); + + if (StringUtils.isNotBlank(dsd.getSqlFile())) { + File sqlFile = new File(dsd.getSqlFile()); + if (!sqlFile.exists()) { + throw new EvaluationException("Unable to find Sql File to execute: " + dsd.getSqlFile()); + } + log.info("Executing SQL File at " + sqlFile + " with parameters " + parameterValues); + resultData = runner.executeSqlFile(sqlFile, parameterValues); + } + else if (StringUtils.isNotBlank(dsd.getSqlResource())) { + log.info("Executing SQL Resource at " + dsd.getSqlResource() + " with parameters " + parameterValues); + resultData = runner.executeSqlResource(dsd.getSqlResource(), parameterValues); + } + else if (StringUtils.isNotBlank(dsd.getSql())) { + log.info("Executing SQL with parameters " + parameterValues); + resultData = runner.executeSql(dsd.getSql(), parameterValues); + } + else { + throw new EvaluationException("A SqlFileDataSetDefinition must define either a SQL File or SQL Resource"); + } + + if (!resultData.getErrors().isEmpty()) { + throw new EvaluationException("Errors occurred during mysql execution: " + OpenmrsUtil.join(resultData.getErrors(), "; ")); + } + + SimpleDataSetMetaData metaData = new SimpleDataSetMetaData(); + for (String column : resultData.getColumns()) { + metaData.addColumn(new DataSetColumn(column, column, Object.class)); + } + data.setMetaData(metaData); + + for (Map rowData : resultData.getData()) { + DataSetRow row = new DataSetRow(); + for (DataSetColumn column : metaData.getColumns()) { + row.addColumnValue(column, rowData.get(column.getName())); + } + data.addRow(row); + } + } + catch (EvaluationException ee) { + throw ee; + } + catch (Exception e) { + throw new EvaluationException("An error occurred while evaluating a SqlFileDataSetDefinition", e); + } + finally { + try { + if (connection != null) { + connection.close(); + } + } + catch (Exception e) { + log.warn("Error closing the database connection for SqlFileDataSetEvaluator", e); + } + } + + return data; + } + + /** + * @return the connection properties to use + */ + protected Properties getConnectionProperties(String connectionPropertyFile) throws EvaluationException { + Properties properties = Context.getRuntimeProperties(); + if (StringUtils.isNotBlank(connectionPropertyFile)) { + properties = new Properties(); + InputStream is = null; + try { + File file = new File(OpenmrsUtil.getApplicationDataDirectory(), connectionPropertyFile); + is = new FileInputStream(file); + properties.load(is); + } + catch (Exception e) { + throw new EvaluationException("Unable to load connection properties from file <" + connectionPropertyFile + ">", e); + } + finally { + IOUtils.closeQuietly(is); + } + } + return properties; + } + + /** + * @return a new connection given a set of connection properties + */ + protected Connection createConnection(Properties connectionProperties) throws EvaluationException { + try { + String driver = connectionProperties.getProperty("connection.driver_class", "com.mysql.jdbc.Driver"); + String url = connectionProperties.getProperty("connection.url"); + String user = connectionProperties.getProperty("connection.username"); + String password = connectionProperties.getProperty("connection.password"); + Context.loadClass(driver); + return DriverManager.getConnection(url, user, password); + } + catch (Exception e) { + throw new EvaluationException("Unable to create a new connection to the database", e); + } + } + + /** + * @return parameter values to use within SQL statement, converting object references to metadata to scalar properties, defaulting to keys + */ + protected Map constructParameterValues(SqlFileDataSetDefinition dsd, EvaluationContext context) { + Map ret = context.getParameterValues(); + for (String key : ret.keySet()) { + Object o = ret.get(key); + if (o instanceof OpenmrsMetadata) { + if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.ID) { + ret.put(key, ((OpenmrsMetadata)o).getId()); + } + else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.UUID) { + ret.put(key, ((OpenmrsMetadata)o).getUuid()); + } + else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.NAME) { + ret.put(key, ((OpenmrsMetadata)o).getName()); + } + } + } + return ret; + } +} From 33fb2908d4dac46195d5795e7e13121c8826fe03 Mon Sep 17 00:00:00 2001 From: mseaton Date: Tue, 4 Sep 2018 16:37:29 -0400 Subject: [PATCH 008/143] REPORT-845 - Support data set definition based on a SQL file and configurable connection --- .../evaluator/SqlFileDataSetEvaluatorTest.java | 14 ++++++++++---- .../definition/evaluator/sqlFileWithParams.sql | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java index 8a8139f754..1b28c16b2b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluatorTest.java @@ -9,6 +9,7 @@ */ package org.openmrs.module.reporting.dataset.definition.evaluator; +import org.hibernate.cfg.Environment; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -25,11 +26,12 @@ import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.parameter.Parameter; import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; import org.springframework.beans.factory.annotation.Autowired; import java.util.Properties; - +@SkipBaseSetup public class SqlFileDataSetEvaluatorTest extends BaseModuleContextSensitiveTest { protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; @@ -41,14 +43,18 @@ public class SqlFileDataSetEvaluatorTest extends BaseModuleContextSensitiveTest @Before public void setup() throws Exception { - executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); + initializeInMemoryDatabase(); + executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); + authenticate(); + getConnection().commit(); } @Override public Properties getRuntimeProperties() { Properties p = super.getRuntimeProperties(); - p.put("connection.url", p.getProperty("hibernate.connection.url")); - p.put("connection.driver_class", p.getProperty("hibernate.connection.driver_class")); + p.put("connection.url", p.getProperty(Environment.URL)); + p.put(Environment.URL, p.getProperty(Environment.URL) + ";MVCC=TRUE"); + p.put("connection.driver_class", p.getProperty(Environment.DRIVER)); return p; } diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql index 9f584cc512..a8a1a2fe79 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/dataset/definition/evaluator/sqlFileWithParams.sql @@ -3,4 +3,5 @@ from patient t inner join person p on t.patient_id = p.person_id left join person_attribute pa on p.person_id = pa.person_id where pa.person_attribute_type_id = @birthplace +order by t.patient_id asc ; From 7e7bd3510b48721fabb800ba178a7d012689e2aa Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Sat, 24 Nov 2018 13:33:03 -0500 Subject: [PATCH 009/143] fix for surefire bug --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 43df0d75b8..707f3b9cdb 100644 --- a/pom.xml +++ b/pom.xml @@ -421,7 +421,7 @@ 2.5 - -Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=US + -Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true ${java.io.tmpdir} From c57d5b694988ee42982a70f4c9add2335a3a13ed Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Thu, 29 Nov 2018 15:39:31 +0000 Subject: [PATCH 010/143] [maven-release-plugin] prepare release 1.17.0 --- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 3411187f7e..f7ea6657e7 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 34dfd450a4..ad73a3b095 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 reporting-api-2.0 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index a84731f49a..f606f169db 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index d0252d4c2f..c8b1e8ccfe 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 432ff74c0b..c32af2387c 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 707f3b9cdb..f172e0544b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0-SNAPSHOT + 1.17.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.17.0 From 4a6c1ffb6e90a9f99ea1617a7f08e81593d6ba10 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Thu, 29 Nov 2018 15:39:37 +0000 Subject: [PATCH 011/143] [maven-release-plugin] prepare for next development iteration --- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index f7ea6657e7..e1cb003e3c 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index ad73a3b095..18bbfd43f1 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT reporting-api-2.0 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index f606f169db..6a6152b75b 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index c8b1e8ccfe..92a5aa957f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index c32af2387c..1e6abf061b 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index f172e0544b..97f9afca2e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.17.0 + 1.18.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.17.0 + HEAD From 331fe70b9a96e5855ccc3bffe18a6fcbfbceb710 Mon Sep 17 00:00:00 2001 From: mseaton Date: Sat, 12 Jan 2019 07:56:59 -0500 Subject: [PATCH 012/143] REPORT-849 PatientIdentifierDataEvaluator should return all identifiers if no identifier type specified --- .../PatientIdentifierDataEvaluatorTest.java | 20 +- .../PatientIdentifierDataEvaluator.java | 220 +++++++++--------- 2 files changed, 131 insertions(+), 109 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java index d79c1537c1..a543dc9649 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluatorTest.java @@ -76,7 +76,7 @@ public void evaluate_shouldReturnAllIdentifiersOfTheSpecifiedTypesInOrderForEach /** * @verifies return all identifiers in groups according to preferred list order - * @see PatientIdentifierDataEvaluator#evaluate(org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition, org.openmrs.module.reporting.evaluation.EvaluationContext) + * @see PatientIdentifierDataEvaluator#evaluate(PatientDataDefinition, EvaluationContext) */ @Test public void evaluate_shouldReturnAllIdentifiersInGroupsAccordingToPreferredListOrder() throws Exception { @@ -100,6 +100,24 @@ public void evaluate_shouldReturnAllIdentifiersInGroupsAccordingToPreferredListO Assert.assertEquals(pi1, identifiers.get(2).getIdentifierType()); } + /** + * @verifies return all identifiers in groups according to preferred list order + * @see PatientIdentifierDataEvaluator#evaluate(PatientDataDefinition, EvaluationContext) + */ + @Test + public void evaluate_shouldReturnAllIdentifiersIfNoTypeSpecified() throws Exception { + EvaluationContext context = new EvaluationContext(); + context.setBaseCohort(new Cohort("2")); + + PatientIdentifierDataDefinition d = new PatientIdentifierDataDefinition(); + + EvaluatedPatientData pd = Context.getService(PatientDataService.class).evaluate(d, context); + + Object o = pd.getData().get(2); + List identifiers = (List) o; + Assert.assertEquals(3, identifiers.size()); + } + /** * @verifies place all preferred identifiers first within type groups * @see PatientIdentifierDataEvaluator#evaluate(org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition, org.openmrs.module.reporting.evaluation.EvaluationContext) diff --git a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java index a30a63e112..a3f7936335 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/patient/evaluator/PatientIdentifierDataEvaluator.java @@ -1,108 +1,112 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.data.patient.evaluator; - -import org.openmrs.PatientIdentifier; -import org.openmrs.PatientIdentifierType; -import org.openmrs.annotation.Handler; -import org.openmrs.module.reporting.common.ListMap; -import org.openmrs.module.reporting.data.patient.EvaluatedPatientData; -import org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition; -import org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition; -import org.openmrs.module.reporting.evaluation.EvaluationContext; -import org.openmrs.module.reporting.evaluation.EvaluationException; -import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; -import org.openmrs.module.reporting.evaluation.service.EvaluationService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -/** - * Evaluates a PatientIdentifierDataDefinition to produce a PatientData - */ -@Handler(supports=PatientIdentifierDataDefinition.class, order=50) -public class PatientIdentifierDataEvaluator implements PatientDataEvaluator { - - @Autowired - EvaluationService evaluationService; - - /** - * @see PatientDataEvaluator#evaluate(PatientDataDefinition, EvaluationContext) - * - * @should return all identifiers of the specified types in order for each patient - * @should return all identifiers in groups according to preferred list order - * @should place all preferred identifiers first within type groups - */ - public EvaluatedPatientData evaluate(PatientDataDefinition definition, EvaluationContext context) throws EvaluationException { - - PatientIdentifierDataDefinition def = (PatientIdentifierDataDefinition) definition; - EvaluatedPatientData c = new EvaluatedPatientData(def, context); - - if ((context.getBaseCohort() != null && context.getBaseCohort().isEmpty()) || def.getTypes() == null || def.getTypes().isEmpty()) { - return c; - } - - HqlQueryBuilder q = new HqlQueryBuilder(); - q.select("pi.patient.patientId", "pi"); - q.from(PatientIdentifier.class, "pi"); - q.wherePatientIn("pi.patient.patientId", context); - q.whereIn("pi.identifierType", def.getTypes()); - q.orderDesc("pi.preferred"); - - List queryResult = evaluationService.evaluateToList(q, context); - - ListMap patIds = new ListMap(); - for (Object[] row : queryResult) { - patIds.putInList((Integer) row[0], (PatientIdentifier) row[1]); - } - - // Order the resulting patient identifiers by the type of identifiers passed in, followed by preferred/non-preferred - PatientIdentifierComparator comparator = new PatientIdentifierComparator(def.getTypes()); - for (Integer pId : patIds.keySet()) { - List l = patIds.get(pId); - Collections.sort(l, comparator); - if (def.getIncludeFirstNonNullOnly() == Boolean.TRUE) { - c.addData(pId, l.get(0)); - } - else { - c.addData(pId, l); - } - } - - return c; - } - - /** - * Helper comparator class for sorting patient identifiers in each List - */ - protected class PatientIdentifierComparator implements Comparator { - - private List idTypes; - - public PatientIdentifierComparator(List idTypes) { - this.idTypes = idTypes; - } - - /** - * @see Comparator#compare(Object, Object) - */ - public int compare(PatientIdentifier pi1, PatientIdentifier pi2) { - int c1 = idTypes.indexOf(pi1.getIdentifierType()); - int c2 = idTypes.indexOf(pi2.getIdentifierType()); - if (c1 == c2) { - c1 = pi1.getPreferred() == Boolean.TRUE ? 0 : 1; - c2 = pi2.getPreferred() == Boolean.TRUE ? 0 : 1; - } - return c1-c2; - } - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.data.patient.evaluator; + +import org.openmrs.PatientIdentifier; +import org.openmrs.PatientIdentifierType; +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.common.ListMap; +import org.openmrs.module.reporting.data.patient.EvaluatedPatientData; +import org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition; +import org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.EvaluationException; +import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +/** + * Evaluates a PatientIdentifierDataDefinition to produce a PatientData + */ +@Handler(supports=PatientIdentifierDataDefinition.class, order=50) +public class PatientIdentifierDataEvaluator implements PatientDataEvaluator { + + @Autowired + EvaluationService evaluationService; + + /** + * @see PatientDataEvaluator#evaluate(PatientDataDefinition, EvaluationContext) + * + * @should return all identifiers of the specified types in order for each patient + * @should return all identifiers in groups according to preferred list order + * @should place all preferred identifiers first within type groups + */ + public EvaluatedPatientData evaluate(PatientDataDefinition definition, EvaluationContext context) throws EvaluationException { + + PatientIdentifierDataDefinition def = (PatientIdentifierDataDefinition) definition; + EvaluatedPatientData c = new EvaluatedPatientData(def, context); + + if (context.getBaseCohort() != null && context.getBaseCohort().isEmpty()) { + return c; + } + + HqlQueryBuilder q = new HqlQueryBuilder(); + q.select("pi.patient.patientId", "pi"); + q.from(PatientIdentifier.class, "pi"); + q.wherePatientIn("pi.patient.patientId", context); + q.whereIn("pi.identifierType", def.getTypes()); + q.orderDesc("pi.preferred"); + + List queryResult = evaluationService.evaluateToList(q, context); + + ListMap patIds = new ListMap(); + for (Object[] row : queryResult) { + patIds.putInList((Integer) row[0], (PatientIdentifier) row[1]); + } + + // Order the resulting patient identifiers by the type of identifiers passed in, followed by preferred/non-preferred + PatientIdentifierComparator comparator = new PatientIdentifierComparator(def.getTypes()); + for (Integer pId : patIds.keySet()) { + List l = patIds.get(pId); + Collections.sort(l, comparator); + if (def.getIncludeFirstNonNullOnly() == Boolean.TRUE) { + c.addData(pId, l.get(0)); + } + else { + c.addData(pId, l); + } + } + + return c; + } + + /** + * Helper comparator class for sorting patient identifiers in each List + */ + protected class PatientIdentifierComparator implements Comparator { + + private List idTypes; + + public PatientIdentifierComparator(List idTypes) { + this.idTypes = idTypes; + } + + /** + * @see Comparator#compare(Object, Object) + */ + public int compare(PatientIdentifier pi1, PatientIdentifier pi2) { + int c1 = 0; + int c2 = 0; + if (idTypes != null && idTypes.size() > 0) { + c1 = idTypes.indexOf(pi1.getIdentifierType()); + c2 = idTypes.indexOf(pi2.getIdentifierType()); + } + if (c1 == c2) { + c1 = pi1.getPreferred() == Boolean.TRUE ? 0 : 1; + c2 = pi2.getPreferred() == Boolean.TRUE ? 0 : 1; + } + return c1-c2; + } + } +} From 5a7f8609854df64b39355dea1f9ddd6201264c3f Mon Sep 17 00:00:00 2001 From: ruhanga Date: Thu, 27 Dec 2018 21:38:39 +0300 Subject: [PATCH 013/143] REPORT-838 : Update Drug Order Filter --- api-1.10/.gitignore | 4 + api-1.10/pom.xml | 88 ++++++ .../definition/DrugOrderCohortDefinition.java | 194 +++++++++++++ .../DrugOrderCohortDefinitionEvaluator.java | 121 ++++++++ .../BuiltInCohortDefinitionLibrary1_10.java | 49 ++++ ...rugOrderCohortDefinitionEvaluatorTest.java | 263 ++++++++++++++++++ ...uiltInCohortDefinitionLibrary1_10Test.java | 57 ++++ .../include/DrugOrderCohortEvaluationData.xml | 116 ++++++++ .../module/reporting/common/Match.java | 18 ++ .../querybuilder/HqlQueryBuilder.java | 11 + omod/src/main/resources/config.xml | 4 + pom.xml | 1 + 12 files changed, 926 insertions(+) create mode 100644 api-1.10/.gitignore create mode 100644 api-1.10/pom.xml create mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java create mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java create mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java create mode 100644 api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java create mode 100644 api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java create mode 100644 api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml create mode 100644 api/src/main/java/org/openmrs/module/reporting/common/Match.java diff --git a/api-1.10/.gitignore b/api-1.10/.gitignore new file mode 100644 index 0000000000..c277ec4914 --- /dev/null +++ b/api-1.10/.gitignore @@ -0,0 +1,4 @@ +/.settings +/.classpath +/.project +/target diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml new file mode 100644 index 0000000000..b449676ce2 --- /dev/null +++ b/api-1.10/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.18.0-SNAPSHOT + + + reporting-api-1.10 + jar + reporting Module api 1.10 + 1.10 api project for reporting + + + 1.10.6 + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api-tests + ${project.parent.version} + test-jar + test + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java new file mode 100644 index 0000000000..f73c89cc84 --- /dev/null +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java @@ -0,0 +1,194 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ + +package org.openmrs.module.reporting.cohort.definition; + +import org.openmrs.Concept; +import org.openmrs.CareSetting; +import org.openmrs.Drug; + +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.common.Localized; +import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; +import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; +import org.openmrs.module.reporting.evaluation.caching.Caching; + +import java.util.Date; +import java.util.List; + +@Caching(strategy = ConfigurationPropertyCachingStrategy.class) +@Localized("reporting.DrugOrderCohortDefinition") +public class DrugOrderCohortDefinition extends BaseCohortDefinition { + + public static final long serialVersionUID = 1L; + + @ConfigurationProperty(group = "which") + private Match which; + + @ConfigurationProperty(value = "drugConcepts") + private List drugConcepts; + + @ConfigurationProperty(value = "drugSets") + private List drugSets; + + @ConfigurationProperty(value = "activatedOnOrBefore") + private Date activatedOnOrBefore; + + @ConfigurationProperty(value = "activatedOnOrAfter") + private Date activatedOnOrAfter; + + @ConfigurationProperty(value = "activeOnOrBefore") + private Date activeOnOrBefore; + + @ConfigurationProperty(value = "activeOnOrAfter") + private Date activeOnOrAfter; + + @ConfigurationProperty(value = "activeOnDate") + private Date activeOnDate; + + @ConfigurationProperty(value = "careSetting") + private CareSetting careSetting; + + @ConfigurationProperty(value = "drugs") + private List drugs; + + public DrugOrderCohortDefinition() { + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Patients "); + + if (this.which != null) { + builder.append(" taking " + this.which.toString() + " of the drugs "); + } + + if (this.getDrugConcepts() != null && this.getDrugConcepts().size() > 0) { + builder.append("taking generic drugs, or drugs with ingredients "); + for (Concept concept : this.getDrugConcepts()) { + builder.append(concept.getDisplayString() + " "); + } + } + if (this.getDrugSets() != null && this.getDrugSets().size() > 0) { + for (Concept concept : this.getDrugSets()) { + builder.append(concept.getDisplayString() + " "); + } + } + + if (this.getDrugs() != null && this.getDrugs().size() > 0) { + for (Drug drug : this.getDrugs()) { + builder.append(drug.getDisplayName() + " "); + } + + } + + if (this.getActivatedOnOrBefore() != null) { + builder.append("activated on or before " + this.getActivatedOnOrBefore() + " "); + } + if (this.getActivatedOnOrAfter() != null) { + builder.append("activated on or after " + this.getActivatedOnOrAfter() + " "); + } + + if (this.getActiveOnOrBefore() != null) { + builder.append("been active on or before " + this.getActiveOnOrBefore() + " "); + } + if (this.getActiveOnOrAfter() != null) { + builder.append("been active on or before " + this.getActiveOnOrAfter() + " "); + } + if (this.getActiveOnDate() != null) { + builder.append("active by " + this.getActiveOnDate() + " "); + } + if (this.careSetting != null) { + builder.append("with care setting of " + this.careSetting + " "); + } + return builder.toString(); + } + + public Match getWhich() { + return this.which; + } + + public void setWhich(Match which) { + this.which = which; + } + + public List getDrugConcepts() { + return drugConcepts; + } + + public void setDrugConcepts(List drugConcepts) { + this.drugConcepts = drugConcepts; + } + + public List getDrugSets() { + return drugSets; + } + + public void setDrugSets(List drugSets) { + this.drugSets = drugSets; + } + + public List getDrugs() { + return drugs; + } + + public void setDrugs(List drugs) { + this.drugs = drugs; + } + + public Date getActivatedOnOrBefore() { + return activatedOnOrBefore; + } + + public void setActivatedOnOrBefore(Date activatedOnOrBefore) { + this.activatedOnOrBefore = activatedOnOrBefore; + } + + public Date getActivatedOnOrAfter() { + return activatedOnOrAfter; + } + + public void setActivatedOnOrAfter(Date activatedOnOrAfter) { + this.activatedOnOrAfter = activatedOnOrAfter; + } + + public Date getActiveOnOrBefore() { + return activeOnOrBefore; + } + + public void setActiveOnOrBefore(Date activeOnOrBefore) { + this.activeOnOrBefore = activeOnOrBefore; + } + + public Date getActiveOnOrAfter() { + return activeOnOrAfter; + } + + public void setActiveOnOrAfter(Date activeOnOrAfter) { + this.activeOnOrAfter = activeOnOrAfter; + } + + public Date getActiveOnDate() { + return activeOnDate; + } + + public void setActiveOnDate(Date activeOnDate) { + this.activeOnDate = activeOnDate; + } + + public CareSetting getCareSetting() { + return careSetting; + } + + public void setCareSetting(CareSetting careSetting) { + this.careSetting = careSetting; + } + +} \ No newline at end of file diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java new file mode 100644 index 0000000000..58b7a19fc8 --- /dev/null +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java @@ -0,0 +1,121 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ + +package org.openmrs.module.reporting.cohort.definition.evaluator; + +import org.apache.commons.lang3.time.DateUtils; +import org.openmrs.Cohort; +import org.openmrs.DrugOrder; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.openmrs.module.reporting.cohort.EvaluatedCohort; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.common.ObjectUtil; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.annotation.Handler; + +import org.springframework.beans.factory.annotation.Autowired; +import java.util.List; +import java.util.Date; + +@Handler(supports = { DrugOrderCohortDefinition.class }) +public class DrugOrderCohortDefinitionEvaluator implements CohortDefinitionEvaluator { + + @Autowired + EvaluationService evaluationService; + + public DrugOrderCohortDefinitionEvaluator() { + } + + public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationContext context) { + DrugOrderCohortDefinition drugOrderCohortDefinition = (DrugOrderCohortDefinition) cohortDefinition; + context = ObjectUtil.nvl(context, new EvaluationContext()); + + HqlQueryBuilder query = new HqlQueryBuilder(); + query.select("drugOrder.patient.patientId"); + query.from(DrugOrder.class, "drugOrder"); + + query.wherePatientIn("drugOrder.patient.patientId", context); + + if (drugOrderCohortDefinition.getWhich() == null) drugOrderCohortDefinition.setWhich(Match.ANY); + + if (drugOrderCohortDefinition.getDrugSets() != null) { + + if (drugOrderCohortDefinition.getWhich() == Match.ANY) { + query.whereInAny("drugOrder.concept", drugOrderCohortDefinition.getDrugSets().toArray()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.ALL) { + query.whereIn("drugOrder.concept", drugOrderCohortDefinition.getDrugSets()); + query.groupBy( + "drugOrder.patient.patientId" + " having count(distinct drugOrder.concept.conceptId) = " + drugOrderCohortDefinition.getDrugSets().size()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.NONE) { + query.whereNotInAny("drugOrder.concept", drugOrderCohortDefinition.getDrugSets()); + } + } + + if (drugOrderCohortDefinition.getDrugConcepts() != null) { + if (drugOrderCohortDefinition.getWhich() == Match.ANY) { + query.whereInAny("drugOrder.concept", drugOrderCohortDefinition.getDrugConcepts().toArray()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.ALL) { + query.whereIn("drugOrder.concept", drugOrderCohortDefinition.getDrugConcepts()); + query.groupBy( + "drugOrder.patient.patientId" + " having count(distinct drugOrder.concept.conceptId) = " + drugOrderCohortDefinition.getDrugSets().size()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.NONE) { + query.whereNotInAny("drugOrder.concept", drugOrderCohortDefinition.getDrugConcepts()); + } + } + + if (drugOrderCohortDefinition.getDrugs() != null) { + if (drugOrderCohortDefinition.getWhich() == Match.ANY) { + query.whereInAny("drugOrder.drug", drugOrderCohortDefinition.getDrugs().toArray()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.ALL) { + query.whereIn("drugOrder.drug", drugOrderCohortDefinition.getDrugs()); + query.groupBy( + "drugOrder.patient.patientId" + " having count(distinct drugOrder.drug.drugId) = " + drugOrderCohortDefinition.getDrugs().size()); + } + else if (drugOrderCohortDefinition.getWhich() == Match.NONE) { + query.whereNotInAny("drugOrder.drug", drugOrderCohortDefinition.getDrugs()); + } + } + + query.whereLessOrEqualTo("drugOrder.dateActivated", drugOrderCohortDefinition.getActivatedOnOrBefore()); + query.whereGreaterOrEqualTo("drugOrder.dateActivated", drugOrderCohortDefinition.getActivatedOnOrAfter()); + query.whereEqual("drugOrder.careSetting", drugOrderCohortDefinition.getCareSetting()); + + if (drugOrderCohortDefinition.getActiveOnOrBefore() != null) { + query.whereNotNull("drugOrder.dateActivated").and() + .whereLessOrEqualTo("drugOrder.dateStopped", drugOrderCohortDefinition.getActiveOnOrBefore()) + .or() + .whereLessOrEqualTo("drugOrder.autoExpireDate", drugOrderCohortDefinition.getActiveOnOrBefore()); + } + + query.whereNotNull("drugOrder.dateActivated").and() + .whereGreaterEqualOrNull("drugOrder.dateStopped", drugOrderCohortDefinition.getActiveOnOrAfter()) + .and() + .whereGreaterEqualOrNull("drugOrder.autoExpireDate", drugOrderCohortDefinition.getActiveOnOrAfter()); + + query.whereNotNull("drugOrder.dateActivated").and() + .whereLessOrEqualTo("drugOrder.dateActivated", drugOrderCohortDefinition.getActiveOnDate()) + .whereGreaterOrNull("drugOrder.dateStopped", drugOrderCohortDefinition.getActiveOnDate()) + .and() + .whereGreaterOrNull("drugOrder.autoExpireDate", drugOrderCohortDefinition.getActiveOnDate()); + + List patientIds = evaluationService.evaluateToList(query, Integer.class, context); + Cohort cohort = new Cohort(patientIds); + + return new EvaluatedCohort(cohort, drugOrderCohortDefinition, context); + } +} \ No newline at end of file diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java new file mode 100644 index 0000000000..6efb85e780 --- /dev/null +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java @@ -0,0 +1,49 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; + +import org.openmrs.Concept; +import org.openmrs.CareSetting; +import org.openmrs.Drug; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; +import org.openmrs.module.reporting.definition.library.DocumentedDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.springframework.stereotype.Component; + +import java.util.Date; +import java.util.List; + +/** + * Basic set of cohort definitions + */ +@Component +public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { + + + + @DocumentedDefinition("drugOrderSearch") + public CohortDefinition getDrugOrderSearch() { + CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); + drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); + drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); + drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); + drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); + return drugOrderCohortDefinition; + } +} diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java new file mode 100644 index 0000000000..ec30196cdf --- /dev/null +++ b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java @@ -0,0 +1,263 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ + +package org.openmrs.module.reporting.cohort.definition.evaluator; + +import java.util.ArrayList; +import java.util.List; +import java.util.Date; +import org.junit.After; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openmrs.Cohort; +import org.openmrs.Concept; +import org.openmrs.CareSetting; +import org.openmrs.Drug; +import org.openmrs.api.OrderService; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionService; +import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.apache.commons.lang3.time.DateUtils; + + +public class DrugOrderCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest { + + protected static final String TEST_DATA = "org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml"; + private DrugOrderCohortDefinition cohortDefinition; + + @Before + public void setup() throws Exception { + cohortDefinition = new DrugOrderCohortDefinition(); + executeDataSet(TEST_DATA); + } + + @After + public void tearDown() { + cohortDefinition = null; + } + + @Test + public void evaluateShouldReturnAllPatients() throws Exception { + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(5, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsCurrentlyActiveOnDrugs() throws Exception { + cohortDefinition.setActiveOnOrAfter(new Date()); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertEquals(3, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsCurrentlyNotActiveOnDrugs() throws Exception { + + cohortDefinition.setActiveOnOrBefore(DateUtils.addDays(new Date(2013, 12, 2), -1)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertEquals(3, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveTakenAnyofListedDrugs() throws Exception { + List drugSetList = new ArrayList(); + drugSetList.add(new Concept(88)); + drugSetList.add(new Concept(792)); + cohortDefinition.setDrugSets(drugSetList); + cohortDefinition.setWhich(Match.ANY); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertEquals(2, cohort.size()); + + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveTakenAnyListedDrugByDefault() throws Exception { + List drugSetList = new ArrayList(); + drugSetList.add(new Concept(3)); + drugSetList.add(new Concept(792)); + cohortDefinition.setDrugSets(drugSetList); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(4, cohort.size()); + + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveTakenAnyofDrugs() throws Exception { + List drugs = new ArrayList(); + drugs.add(new Drug(3)); + drugs.add(new Drug(2)); + cohortDefinition.setDrugs(drugs); + cohortDefinition.setWhich(Match.ANY); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertEquals(2, cohort.size()); + + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveTakenAnyDrugByDefault() throws Exception { + List drugs = new ArrayList(); + drugs.add(new Drug(11)); + drugs.add(new Drug(2)); + cohortDefinition.setDrugs(drugs); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(4, cohort.size()); + + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveNeverTakenDrugs() throws Exception { + List drugs = new ArrayList(); + drugs.add(new Drug(3)); + drugs.add(new Drug(2)); + cohortDefinition.setDrugs(drugs); + cohortDefinition.setWhich(Match.NONE); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(3, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveNeverTakenListedDrugs() throws Exception { + List drugSetList = new ArrayList(); + drugSetList.add(new Concept(88)); + drugSetList.add(new Concept(792)); + cohortDefinition.setDrugSets(drugSetList); + cohortDefinition.setWhich(Match.NONE); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(3, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsThatHaveTakenAllListedDrugs() throws Exception { + List drugSetList = new ArrayList(); + drugSetList.add(new Concept(88)); + drugSetList.add(new Concept(792)); + cohortDefinition.setDrugSets(drugSetList); + cohortDefinition.setWhich(Match.ALL); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertEquals(1, cohort.size()); + Assert.assertTrue(cohort.contains(2)); + } + + @Test + public void evaluateShouldReturnAllPatientsNotActiveOnDrugsAfterDate() throws Exception { + cohortDefinition.setActiveOnOrBefore(DateUtil.getDateTime(2013, 12, 2)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(2)); + Assert.assertEquals(2, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsCurrentlyActiveOnDrugsFromDate() throws Exception { + cohortDefinition.setActiveOnOrAfter(DateUtil.getDateTime(2013, 12, 7)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(22)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertEquals(4, cohort.size()); + } + @Test + public void evaluateShouldReturnAllPatientsWhoStartedTakingDrugsBeforeSpecifiedDate() throws Exception { + cohortDefinition.setActivatedOnOrBefore(DateUtil.getDateTime(2008, 8, 2)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(2, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsWhoStartedTakingDrugsAfterSpecifiedDate() throws Exception { + cohortDefinition.setActivatedOnOrAfter(DateUtil.getDateTime(2008, 8, 10)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertEquals(2, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsOnDrugsOnSpecifiedDate() throws Exception { + cohortDefinition.setActiveOnDate(DateUtil.getDateTime(2007, 12, 3)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertEquals(1, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsTakingAnyDrugWithinADateRange() throws Exception { + cohortDefinition.setActivatedOnOrAfter(DateUtil.getDateTime(2008, 8, 1)); + cohortDefinition.setActivatedOnOrBefore(DateUtil.getDateTime(2008, 8, 8)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(5, cohort.size()); + } + + @Test + public void evaluateShouldReturnAllPatientsTakingSpecifiedDrugBeforeDate() throws Exception { + List drugSetList = new ArrayList(); + drugSetList.add(new Concept(88)); + cohortDefinition.setDrugSets(drugSetList); + cohortDefinition.setActivatedOnOrBefore(DateUtil.getDateTime(2008, 8, 2)); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + } + + @Test + public void evaluateShouldReturnAllInSpecifiedCareSetting() throws Exception { + CareSetting careSetting = Context.getService(OrderService.class).getCareSetting(1); + cohortDefinition.setCareSetting(careSetting); + Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cohortDefinition, null); + Assert.assertTrue(cohort.contains(2)); + Assert.assertTrue(cohort.contains(7)); + Assert.assertTrue(cohort.contains(8)); + Assert.assertTrue(cohort.contains(21)); + Assert.assertTrue(cohort.contains(22)); + Assert.assertEquals(5, cohort.size()); + + } +} \ No newline at end of file diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java new file mode 100644 index 0000000000..f975d8e06e --- /dev/null +++ b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java @@ -0,0 +1,57 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; + +import org.junit.Before; +import org.junit.Test; +import org.openmrs.CareSetting; +import org.openmrs.Concept; +import org.openmrs.Drug; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; + +import java.util.Date; +import java.util.List; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; + +/** + * + */ +public class BuiltInCohortDefinitionLibrary1_10Test { + + private BuiltInCohortDefinitionLibrary1_10 library; + + @Before + public void setUp() throws Exception { + library = new BuiltInCohortDefinitionLibrary1_10(); + } + + @Test + public void testgetDrugOrderSearch() throws Exception { + CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch(); + assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass())); + assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class)); + } + +} diff --git a/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml b/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml new file mode 100644 index 0000000000..4bf9879a5f --- /dev/null +++ b/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/common/Match.java b/api/src/main/java/org/openmrs/module/reporting/common/Match.java new file mode 100644 index 0000000000..2db7548c3b --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/common/Match.java @@ -0,0 +1,18 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.common; + +/** + * This enum is meant to represent the conditions which can be used to specify + * matching requirements + */ +public enum Match { + ANY, ALL, NONE +} diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java index 3069bcf594..92d27e0b2b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java @@ -227,6 +227,17 @@ public HqlQueryBuilder whereInAny(String propertyName, Object... values) { return this; } + public HqlQueryBuilder whereNotInAny(String propertyName, Collection values) { + if (values != null) { + if (values.isEmpty()) { + where("1=1"); + } else { + where(propertyName + " not in (:" + nextPositionIndex() + ")").withValue(values); + } + } + return this; + } + public HqlQueryBuilder wherePatientIn(String propertyName, EvaluationContext context) { if (context != null) { if (context.getBaseCohort() != null) { diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index e4fca0c2c9..fb1b28b210 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -173,6 +173,10 @@ /lib/reporting-api-1.9.* 1.9.9 - 1.12.* + + /lib/reporting-api-1.10.* + 1.10.6 - 2.2.* + /lib/reporting-api-2.0.* 2.* diff --git a/pom.xml b/pom.xml index 97f9afca2e..d2edd9e4bf 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ api api-1.9 + api-1.10 api-2.0 api-tests omod From 6386a70bd2b1a4397431392c1d4bf03d3803d645 Mon Sep 17 00:00:00 2001 From: Cosmin Ioan Date: Mon, 17 Jun 2019 08:51:44 -0400 Subject: [PATCH 014/143] REPORT-852, implement ObsOnSameDateEncounterDataDefinition --- ...sOnSameDateEncounterDataEvaluatorTest.java | 120 ++++++++++++++++++ .../ObsOnSameDateEncounterDataDefinition.java | 69 ++++++++++ .../ObsOnSameDateEncounterDataEvaluator.java | 113 +++++++++++++++++ 3 files changed, 302 insertions(+) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java new file mode 100644 index 0000000000..eb045b18ba --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java @@ -0,0 +1,120 @@ +package org.openmrs.module.reporting.data.encounter.evaluator; + +import org.junit.Before; +import org.junit.Test; +import org.openmrs.*; +import org.openmrs.api.ConceptService; +import org.openmrs.api.EncounterService; +import org.openmrs.api.context.Context; +import org.openmrs.contrib.testdata.TestDataManager; +import org.openmrs.contrib.testdata.builder.EncounterBuilder; +import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.common.TestUtil; +import org.openmrs.module.reporting.data.encounter.EvaluatedEncounterData; +import org.openmrs.module.reporting.data.encounter.definition.ObsForEncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.definition.ObsOnSameDateEncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.service.EncounterDataService; +import org.openmrs.module.reporting.evaluation.context.EncounterEvaluationContext; +import org.openmrs.module.reporting.query.encounter.EncounterIdSet; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +import java.util.Date; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; + +public class ObsOnSameDateEncounterDataEvaluatorTest extends BaseModuleContextSensitiveTest { + + protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; + + protected static final String XML_REPORT_TEST_DATASET = "ReportTestDataset"; + + @Autowired + private TestDataManager data; + + @Autowired + @Qualifier("conceptService") + private ConceptService conceptService; + + @Autowired + @Qualifier("encounterService") + private EncounterService encounterService; + + @Autowired + private EncounterDataService encounterDataService; + + /** + * Run this before each unit test in this class. The "@Before" method in + * {@link org.openmrs.test.BaseContextSensitiveTest} is run right before this method. + * + * @throws Exception + */ + @Before + public void setup() throws Exception { + executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); + } + + @Test + public void testEvaluateForObsOnSameEncounter() throws Exception { + + Concept weight = conceptService.getConcept(5089); + Concept cd4 = conceptService.getConcept(5497); + + // create an obs with a few members + Patient patient = data.randomPatient().save(); + Encounter enc1 = data.randomEncounter().patient(patient).save(); + Obs obs1 = data.obs().concept(weight).value(60).encounter(enc1).save(); + Obs obs2 = data.obs().concept(cd4).value(350).encounter(enc1).save(); + + EncounterEvaluationContext context = new EncounterEvaluationContext(); + context.setBaseEncounters(new EncounterIdSet(enc1.getId())); + + ObsOnSameDateEncounterDataDefinition def = new ObsOnSameDateEncounterDataDefinition(); + def.setQuestion(weight); + def.setSingleObs(true); + EvaluatedEncounterData results = encounterDataService.evaluate(def, context); + + assertThat(results.getData().size(), is(1)); + assertThat((Obs) results.getData().get(enc1.getId()), is(obs1)); + } + + @Test + public void testEvaluateForObsOnDifferentEncounters() throws Exception { + + Concept weight = conceptService.getConcept(5089); + Concept cd4 = conceptService.getConcept(5497); + + EncounterType vitalsEncounter = new EncounterType("VITALS", "Vitals encounter type"); + EncounterType artEncounter = new EncounterType("ART_FOLLOWUP", "ART visit encounter"); + encounterService.saveEncounterType(vitalsEncounter); + encounterService.saveEncounterType(artEncounter); + + // create an obs with a few members + Patient patient = data.randomPatient().save(); + Encounter enc1 = data.randomEncounter().patient(patient).save(); + enc1.setEncounterType(vitalsEncounter); + enc1.setEncounterDatetime(DateUtil.getDateTime(2017, 10, 1, 9, 30, 0, 0)); + Obs obs1 = data.obs().concept(weight).value(60).encounter(enc1).save(); + + + Encounter enc2 = data.randomEncounter().patient(patient).save(); + enc2.setEncounterType(artEncounter); + enc2.setEncounterDatetime(DateUtil.getDateTime(2017, 10, 1, 10, 30, 0, 0)); + Obs obs2 = data.obs().concept(cd4).value(350).encounter(enc2).save(); + + EncounterEvaluationContext context = new EncounterEvaluationContext(); + context.setBaseEncounters(new EncounterIdSet(enc2.getId())); + + ObsOnSameDateEncounterDataDefinition def = new ObsOnSameDateEncounterDataDefinition(); + def.setQuestion(weight); + def.setSingleObs(true); + EvaluatedEncounterData results = encounterDataService.evaluate(def, context); + + assertThat(results.getData().size(), is(1)); + // it should return the Weight obs captured on the same date but in different encounter than the context encounter + assertThat((Obs) results.getData().get(enc2.getId()), is(obs1)); + } + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java new file mode 100644 index 0000000000..30f83a7ee1 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java @@ -0,0 +1,69 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.data.encounter.definition; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.module.reporting.data.BaseDataDefinition; +import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; +import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; +import org.openmrs.module.reporting.evaluation.caching.Caching; + +import java.util.List; + +/** + * Column of a specific obs or set of obs associated with an encounter based on the question concept + * associated with the obs + */ +@Caching(strategy=ConfigurationPropertyCachingStrategy.class) +public class ObsOnSameDateEncounterDataDefinition extends BaseDataDefinition implements EncounterDataDefinition { + + public static final long serialVersionUID = 1L; + + @ConfigurationProperty + private Concept question; + + @ConfigurationProperty + private boolean singleObs = true; + + public ObsOnSameDateEncounterDataDefinition() { + super(); + } + + public ObsOnSameDateEncounterDataDefinition(String name) { + super(name); + } + + public Concept getQuestion() { + return question; + } + + public void setQuestion(Concept question) { + this.question = question; + } + + public boolean isSingleObs() { + return singleObs; + } + + public boolean getSingleObs() { + return isSingleObs(); + } + + public void setSingleObs(boolean singleObs) { + this.singleObs = singleObs; + } + + @Override + public Class getDataType() { + return singleObs ? Obs.class : List.class; + } + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java new file mode 100644 index 0000000000..5cfd87b46f --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java @@ -0,0 +1,113 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.data.encounter.evaluator; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.Encounter; +import org.openmrs.Obs; +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.data.encounter.EvaluatedEncounterData; +import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.definition.ObsOnSameDateEncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.service.EncounterDataService; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.EvaluationException; +import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Evaluates a ObsOnSameDateEncounterDataDefinition to produce EncounterData + */ +@Handler(supports= ObsOnSameDateEncounterDataDefinition.class, order=50) +public class ObsOnSameDateEncounterDataEvaluator implements EncounterDataEvaluator { + + protected final Log log = LogFactory.getLog(getClass()); + + @Autowired + EncounterDataService encounterDataService; + + @Autowired + EvaluationService evaluationService; + + @Override + public EvaluatedEncounterData evaluate(EncounterDataDefinition definition, EvaluationContext context) throws EvaluationException { + + ObsOnSameDateEncounterDataDefinition def = (ObsOnSameDateEncounterDataDefinition) definition; + EvaluatedEncounterData data = new EvaluatedEncounterData(); + + // First get a Map from encounterId to patient:date + + HqlQueryBuilder encQuery = new HqlQueryBuilder(); + encQuery.select("encounter.encounterId, encounter.patient.patientId, encounter.encounterDatetime"); + encQuery.from(Encounter.class, "encounter"); + encQuery.whereEncounterIn("encounter.encounterId", context); + List encounterData = evaluationService.evaluateToList(encQuery, context); + + Map encounterToDateMap = new HashMap(); + Set pIds = new HashSet(); + for (Object[] enc : encounterData) { + Integer encId = (Integer)enc[0]; + Integer pId = (Integer)enc[1]; + String encDate = DateUtil.formatDate((Date)enc[2], "yyyyMMdd"); + encounterToDateMap.put(encId, pId + ":" + encDate); + pIds.add(pId); + } + + // Next get a Map from patient:date to List + + HqlQueryBuilder obsQuery = new HqlQueryBuilder(); + obsQuery.select("obs.encounter.patient.patientId, obs.encounter.encounterDatetime, obs"); + obsQuery.from(Obs.class, "obs"); + obsQuery.whereEqual("obs.concept", def.getQuestion()); + obsQuery.whereIdIn("obs.encounter.patient.patientId", pIds); + obsQuery.orderDesc("obs.obsDatetime"); + List obsData = evaluationService.evaluateToList(obsQuery, context); + + Map> dateToObsMap = new HashMap>(); + for (Object[] obs : obsData) { + Integer pId = (Integer)obs[0]; + String encDate = DateUtil.formatDate((Date)obs[1], "yyyyMMdd"); + String dateKey = pId + ":" + encDate; + List l = dateToObsMap.get(dateKey); + if (l == null) { + l = new ArrayList(); + dateToObsMap.put(dateKey, l); + } + l.add((Obs)obs[2]); + } + + // Finally, join those together to get a Map from encounterId to List + + for (Integer encId : encounterToDateMap.keySet()) { + String dateKey = encounterToDateMap.get(encId); + List obsList = dateToObsMap.get(dateKey); + + if (def.isSingleObs() && (obsList != null)) { + // return only the most recent Obs + data.addData(encId, obsList.get(0)); + } else { + data.addData(encId, obsList); + } + } + + return data; + } +} From 2f011cbe3a23a2d6ae8b170cd71769113944ccda Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 2 Jul 2019 18:59:10 -0400 Subject: [PATCH 015/143] REPORT-852 - Implement Obs on same day EncounterDataDefinition Additional enhancements to include ability to filter on coded answers --- .../ObsForEncounterEvaluatorTest.java | 38 +++ ...sOnSameDateEncounterDataEvaluatorTest.java | 48 +++- .../ObsForEncounterDataDefinition.java | 19 ++ .../ObsOnSameDateEncounterDataDefinition.java | 91 ++----- .../ObsForEncounterDataEvaluator.java | 1 + .../ObsOnSameDateEncounterDataEvaluator.java | 227 +++++++++--------- 6 files changed, 238 insertions(+), 186 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java index 72f6bce10e..e756e717cf 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterEvaluatorTest.java @@ -30,8 +30,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertNull; @@ -216,5 +219,40 @@ public void testShouldReturnEmptySetWhenInputSetIsEmpty() throws Exception { } + @Test + public void testEvaluateForObsWithAnswer() throws Exception { + + Concept civilStatus = conceptService.getConcept(4); + Concept single = conceptService.getConcept(5); + Concept married = conceptService.getConcept(6); + + // create an obs with a few members + Patient patient = data.randomPatient().save(); + Encounter enc1 = data.randomEncounter().patient(patient).save(); + Obs obs1 = data.obs().concept(civilStatus).value(single).encounter(enc1).save(); + Obs obs2 = data.obs().concept(civilStatus).value(married).encounter(enc1).save(); + EncounterEvaluationContext context = new EncounterEvaluationContext(); + context.setBaseEncounters(new EncounterIdSet(enc1.getId())); + + ObsForEncounterDataDefinition def = new ObsForEncounterDataDefinition(); + def.setQuestion(civilStatus); + def.setSingleObs(false); + + def.addAnswer(single); + EvaluatedEncounterData results = encounterDataService.evaluate(def, context); + + assertThat(results.getData().size(), is(1)); + List obsList = (List)results.getData().get(enc1.getId()); + assertThat(obsList.size(), is(1)); + assertThat(obsList, contains(obs1)); + + def.addAnswer(married); + results = encounterDataService.evaluate(def, context); + + assertThat(results.getData().size(), is(1)); + obsList = (List)results.getData().get(enc1.getId()); + assertThat(obsList.size(), is(2)); + assertThat(obsList, contains(obs1, obs2)); + } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java index eb045b18ba..e79f620c26 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluatorTest.java @@ -2,12 +2,14 @@ import org.junit.Before; import org.junit.Test; -import org.openmrs.*; +import org.openmrs.Concept; +import org.openmrs.Encounter; +import org.openmrs.EncounterType; +import org.openmrs.Obs; +import org.openmrs.Patient; import org.openmrs.api.ConceptService; import org.openmrs.api.EncounterService; -import org.openmrs.api.context.Context; import org.openmrs.contrib.testdata.TestDataManager; -import org.openmrs.contrib.testdata.builder.EncounterBuilder; import org.openmrs.module.reporting.common.DateUtil; import org.openmrs.module.reporting.common.TestUtil; import org.openmrs.module.reporting.data.encounter.EvaluatedEncounterData; @@ -20,8 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import java.util.Date; +import java.util.List; +import static org.hamcrest.Matchers.contains; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; @@ -117,4 +120,41 @@ public void testEvaluateForObsOnDifferentEncounters() throws Exception { assertThat((Obs) results.getData().get(enc2.getId()), is(obs1)); } + @Test + public void testEvaluateForObsWithAnswer() throws Exception { + + Concept civilStatus = conceptService.getConcept(4); + Concept single = conceptService.getConcept(5); + Concept married = conceptService.getConcept(6); + + // create an obs with a few members + Patient patient = data.randomPatient().save(); + Encounter enc1 = data.randomEncounter().patient(patient).save(); + Encounter enc2 = data.randomEncounter().encounterDatetime(enc1.getEncounterDatetime()).patient(patient).save(); + Obs obs2 = data.obs().concept(civilStatus).value(married).encounter(enc2).save(); + + EncounterEvaluationContext context = new EncounterEvaluationContext(); + context.setBaseEncounters(new EncounterIdSet(enc1.getId())); + + // First show that a normal ObsForEncounterDataDefinition would not include the obs from different encounter on same date + ObsForEncounterDataDefinition def = new ObsForEncounterDataDefinition(); + def.setQuestion(civilStatus); + def.setSingleObs(false); + def.addAnswer(married); + + EvaluatedEncounterData results = encounterDataService.evaluate(def, context); + assertThat(results.getData().size(), is(0)); + + def = new ObsOnSameDateEncounterDataDefinition(); + def.setQuestion(civilStatus); + def.setSingleObs(false); + def.addAnswer(married); + + results = encounterDataService.evaluate(def, context); + assertThat(results.getData().size(), is(1)); + List obsList = (List)results.getData().get(enc1.getId()); + assertThat(obsList.size(), is(1)); + assertThat(obsList, contains(obs2)); + } + } diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java index 78be23a3e4..408cf217a1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsForEncounterDataDefinition.java @@ -16,6 +16,7 @@ import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; +import java.util.ArrayList; import java.util.List; /** @@ -30,6 +31,9 @@ public class ObsForEncounterDataDefinition extends BaseDataDefinition implements @ConfigurationProperty private Concept question; + @ConfigurationProperty + private List answers; // Only returns Obs with the following coded answer values + @ConfigurationProperty private boolean singleObs = true; @@ -49,6 +53,21 @@ public void setQuestion(Concept question) { this.question = question; } + public List getAnswers() { + return answers; + } + + public void setAnswers(List answers) { + this.answers = answers; + } + + public void addAnswer(Concept answer) { + if (answers == null) { + answers = new ArrayList(); + } + answers.add(answer); + } + public boolean isSingleObs() { return singleObs; } diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java index 30f83a7ee1..8ac7383b17 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/definition/ObsOnSameDateEncounterDataDefinition.java @@ -1,69 +1,22 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.data.encounter.definition; - -import org.openmrs.Concept; -import org.openmrs.Obs; -import org.openmrs.module.reporting.data.BaseDataDefinition; -import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; -import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; -import org.openmrs.module.reporting.evaluation.caching.Caching; - -import java.util.List; - -/** - * Column of a specific obs or set of obs associated with an encounter based on the question concept - * associated with the obs - */ -@Caching(strategy=ConfigurationPropertyCachingStrategy.class) -public class ObsOnSameDateEncounterDataDefinition extends BaseDataDefinition implements EncounterDataDefinition { - - public static final long serialVersionUID = 1L; - - @ConfigurationProperty - private Concept question; - - @ConfigurationProperty - private boolean singleObs = true; - - public ObsOnSameDateEncounterDataDefinition() { - super(); - } - - public ObsOnSameDateEncounterDataDefinition(String name) { - super(name); - } - - public Concept getQuestion() { - return question; - } - - public void setQuestion(Concept question) { - this.question = question; - } - - public boolean isSingleObs() { - return singleObs; - } - - public boolean getSingleObs() { - return isSingleObs(); - } - - public void setSingleObs(boolean singleObs) { - this.singleObs = singleObs; - } - - @Override - public Class getDataType() { - return singleObs ? Obs.class : List.class; - } - -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.data.encounter.definition; + +import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; +import org.openmrs.module.reporting.evaluation.caching.Caching; + +/** + * Column of a specific obs or set of obs associated with an encounter based on the question concept + * associated with the obs + */ +@Caching(strategy=ConfigurationPropertyCachingStrategy.class) +public class ObsOnSameDateEncounterDataDefinition extends ObsForEncounterDataDefinition { + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java index c571e73dfb..e7b627da0c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsForEncounterDataEvaluator.java @@ -43,6 +43,7 @@ public EvaluatedEncounterData evaluate(EncounterDataDefinition definition, Evalu q.select("obs.encounter.encounterId, obs"); q.from(Obs.class, "obs"); q.whereEqual("obs.concept", def.getQuestion()); + q.whereIn("obs.valueCoded", def.getAnswers()); q.whereEncounterIn("obs.encounter.encounterId", context); List result = Context.getService(EvaluationService.class).evaluateToList(q, context); diff --git a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java index 5cfd87b46f..9824520c46 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/encounter/evaluator/ObsOnSameDateEncounterDataEvaluator.java @@ -1,113 +1,114 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.data.encounter.evaluator; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.openmrs.Encounter; -import org.openmrs.Obs; -import org.openmrs.annotation.Handler; -import org.openmrs.module.reporting.common.DateUtil; -import org.openmrs.module.reporting.data.encounter.EvaluatedEncounterData; -import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; -import org.openmrs.module.reporting.data.encounter.definition.ObsOnSameDateEncounterDataDefinition; -import org.openmrs.module.reporting.data.encounter.service.EncounterDataService; -import org.openmrs.module.reporting.evaluation.EvaluationContext; -import org.openmrs.module.reporting.evaluation.EvaluationException; -import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; -import org.openmrs.module.reporting.evaluation.service.EvaluationService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * Evaluates a ObsOnSameDateEncounterDataDefinition to produce EncounterData - */ -@Handler(supports= ObsOnSameDateEncounterDataDefinition.class, order=50) -public class ObsOnSameDateEncounterDataEvaluator implements EncounterDataEvaluator { - - protected final Log log = LogFactory.getLog(getClass()); - - @Autowired - EncounterDataService encounterDataService; - - @Autowired - EvaluationService evaluationService; - - @Override - public EvaluatedEncounterData evaluate(EncounterDataDefinition definition, EvaluationContext context) throws EvaluationException { - - ObsOnSameDateEncounterDataDefinition def = (ObsOnSameDateEncounterDataDefinition) definition; - EvaluatedEncounterData data = new EvaluatedEncounterData(); - - // First get a Map from encounterId to patient:date - - HqlQueryBuilder encQuery = new HqlQueryBuilder(); - encQuery.select("encounter.encounterId, encounter.patient.patientId, encounter.encounterDatetime"); - encQuery.from(Encounter.class, "encounter"); - encQuery.whereEncounterIn("encounter.encounterId", context); - List encounterData = evaluationService.evaluateToList(encQuery, context); - - Map encounterToDateMap = new HashMap(); - Set pIds = new HashSet(); - for (Object[] enc : encounterData) { - Integer encId = (Integer)enc[0]; - Integer pId = (Integer)enc[1]; - String encDate = DateUtil.formatDate((Date)enc[2], "yyyyMMdd"); - encounterToDateMap.put(encId, pId + ":" + encDate); - pIds.add(pId); - } - - // Next get a Map from patient:date to List - - HqlQueryBuilder obsQuery = new HqlQueryBuilder(); - obsQuery.select("obs.encounter.patient.patientId, obs.encounter.encounterDatetime, obs"); - obsQuery.from(Obs.class, "obs"); - obsQuery.whereEqual("obs.concept", def.getQuestion()); - obsQuery.whereIdIn("obs.encounter.patient.patientId", pIds); - obsQuery.orderDesc("obs.obsDatetime"); - List obsData = evaluationService.evaluateToList(obsQuery, context); - - Map> dateToObsMap = new HashMap>(); - for (Object[] obs : obsData) { - Integer pId = (Integer)obs[0]; - String encDate = DateUtil.formatDate((Date)obs[1], "yyyyMMdd"); - String dateKey = pId + ":" + encDate; - List l = dateToObsMap.get(dateKey); - if (l == null) { - l = new ArrayList(); - dateToObsMap.put(dateKey, l); - } - l.add((Obs)obs[2]); - } - - // Finally, join those together to get a Map from encounterId to List - - for (Integer encId : encounterToDateMap.keySet()) { - String dateKey = encounterToDateMap.get(encId); - List obsList = dateToObsMap.get(dateKey); - - if (def.isSingleObs() && (obsList != null)) { - // return only the most recent Obs - data.addData(encId, obsList.get(0)); - } else { - data.addData(encId, obsList); - } - } - - return data; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.data.encounter.evaluator; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.Encounter; +import org.openmrs.Obs; +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.data.encounter.EvaluatedEncounterData; +import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.definition.ObsOnSameDateEncounterDataDefinition; +import org.openmrs.module.reporting.data.encounter.service.EncounterDataService; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.EvaluationException; +import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Evaluates a ObsOnSameDateEncounterDataDefinition to produce EncounterData + */ +@Handler(supports=ObsOnSameDateEncounterDataDefinition.class, order=40) +public class ObsOnSameDateEncounterDataEvaluator implements EncounterDataEvaluator { + + protected final Log log = LogFactory.getLog(getClass()); + + @Autowired + EncounterDataService encounterDataService; + + @Autowired + EvaluationService evaluationService; + + @Override + public EvaluatedEncounterData evaluate(EncounterDataDefinition definition, EvaluationContext context) throws EvaluationException { + + ObsOnSameDateEncounterDataDefinition def = (ObsOnSameDateEncounterDataDefinition) definition; + EvaluatedEncounterData data = new EvaluatedEncounterData(); + + // First get a Map from encounterId to patient:date + + HqlQueryBuilder encQuery = new HqlQueryBuilder(); + encQuery.select("encounter.encounterId, encounter.patient.patientId, encounter.encounterDatetime"); + encQuery.from(Encounter.class, "encounter"); + encQuery.whereEncounterIn("encounter.encounterId", context); + List encounterData = evaluationService.evaluateToList(encQuery, context); + + Map encounterToDateMap = new HashMap(); + Set pIds = new HashSet(); + for (Object[] enc : encounterData) { + Integer encId = (Integer)enc[0]; + Integer pId = (Integer)enc[1]; + String encDate = DateUtil.formatDate((Date)enc[2], "yyyyMMdd"); + encounterToDateMap.put(encId, pId + ":" + encDate); + pIds.add(pId); + } + + // Next get a Map from patient:date to List + + HqlQueryBuilder obsQuery = new HqlQueryBuilder(); + obsQuery.select("obs.encounter.patient.patientId, obs.encounter.encounterDatetime, obs"); + obsQuery.from(Obs.class, "obs"); + obsQuery.whereEqual("obs.concept", def.getQuestion()); + obsQuery.whereIn("obs.valueCoded", def.getAnswers()); + obsQuery.whereIdIn("obs.encounter.patient.patientId", pIds); + obsQuery.orderDesc("obs.obsDatetime"); + List obsData = evaluationService.evaluateToList(obsQuery, context); + + Map> dateToObsMap = new HashMap>(); + for (Object[] obs : obsData) { + Integer pId = (Integer)obs[0]; + String encDate = DateUtil.formatDate((Date)obs[1], "yyyyMMdd"); + String dateKey = pId + ":" + encDate; + List l = dateToObsMap.get(dateKey); + if (l == null) { + l = new ArrayList(); + dateToObsMap.put(dateKey, l); + } + l.add((Obs)obs[2]); + } + + // Finally, join those together to get a Map from encounterId to List + + for (Integer encId : encounterToDateMap.keySet()) { + String dateKey = encounterToDateMap.get(encId); + List obsList = dateToObsMap.get(dateKey); + + if (def.isSingleObs() && (obsList != null)) { + // return only the most recent Obs + data.addData(encId, obsList.get(0)); + } else { + data.addData(encId, obsList); + } + } + + return data; + } +} From b9709727cc1f4003845bfeb5fc31fd0220e4f4c2 Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Wed, 31 Jul 2019 17:34:56 -0400 Subject: [PATCH 016/143] REPORT-853: Add no-args constructors to all converters --- .../data/converter/ConceptCodeFromConceptConverter.java | 2 ++ .../reporting/data/converter/EarliestCreatedConverter.java | 4 ++++ .../data/converter/MostRecentlyCreatedConverter.java | 4 ++++ .../reporting/data/converter/ObsFromObsGroupConverter.java | 2 ++ 4 files changed, 12 insertions(+) diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java index bc4bab3571..eafed53769 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ConceptCodeFromConceptConverter.java @@ -17,6 +17,8 @@ public class ConceptCodeFromConceptConverter implements DataConverter { private String conceptSourceName; + public ConceptCodeFromConceptConverter() {}; + public ConceptCodeFromConceptConverter(String conceptSourceName) { this.conceptSourceName = conceptSourceName; } diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java index 2829c7a0a6..fa9e498860 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/EarliestCreatedConverter.java @@ -22,6 +22,10 @@ public class EarliestCreatedConverter implements DataConverter { private Class typeOfItem; + public EarliestCreatedConverter() { + + } + public EarliestCreatedConverter(Class typeOfItem) { this.typeOfItem = typeOfItem; } diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java index 42af0bd813..7bc3ebbd56 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/MostRecentlyCreatedConverter.java @@ -21,6 +21,10 @@ public class MostRecentlyCreatedConverter implements DataConverter { private Class typeOfItem; + public MostRecentlyCreatedConverter() { + + }; + public MostRecentlyCreatedConverter(Class typeOfItem) { this.typeOfItem = typeOfItem; } diff --git a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java index 848f487085..02e90ae685 100644 --- a/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java +++ b/api/src/main/java/org/openmrs/module/reporting/data/converter/ObsFromObsGroupConverter.java @@ -16,6 +16,8 @@ public class ObsFromObsGroupConverter implements DataConverter { private Concept concept; + public ObsFromObsGroupConverter() {}; + public ObsFromObsGroupConverter(Concept concept) { this.concept = concept; } From cda9399cd2de8d0d08dc2a966cdeaaa6b76e5cab Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Wed, 31 Jul 2019 17:37:10 -0400 Subject: [PATCH 017/143] REPORT-854: Make SortCriteria SortElement inner class static --- .../java/org/openmrs/module/reporting/common/SortCriteria.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java index b480817659..1f7be1c8dc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java @@ -92,7 +92,7 @@ public enum SortDirection { //***** INNER CLASSES ***** - public class SortElement { + static public class SortElement { //***** PROPERTIES ***** From c5a95ed6eb5664d62047aec24fde799756d34c5e Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Wed, 31 Jul 2019 18:51:39 -0400 Subject: [PATCH 018/143] REPORT-854: Make inner classes static --- ...IndicatorAndDimensionDataSetDefinition.java | 14 +++++++------- .../CohortIndicatorDataSetDefinition.java | 16 ++++++++-------- ...imensionSpecificationPortletController.java | 17 ++++++++--------- ...hortIndicatorAndDimensionDataSetEditor.java | 18 +++++++++--------- .../PeriodIndicatorReportController.java | 17 ++++++++--------- 5 files changed, 40 insertions(+), 42 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java index bb2ab80d1c..2a0961f5b5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java @@ -9,12 +9,6 @@ */ package org.openmrs.module.reporting.dataset.definition; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - import org.openmrs.module.reporting.common.Localized; import org.openmrs.module.reporting.dataset.DataSetColumn; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; @@ -23,6 +17,12 @@ import org.openmrs.module.reporting.indicator.dimension.CohortDefinitionDimension; import org.openmrs.module.reporting.indicator.util.IndicatorUtil; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + /** *
  * This represents a data set which contains indicators and optional dimension combinations
@@ -172,7 +172,7 @@ public void addSpecification(String indicatorNumber, String label, Mapped
  * This represents a data set where each column is an Indicator plus (optionally) dimension options
@@ -163,7 +163,7 @@ public void addColumn(String name, String label, Mapped mod
 			specification = cidsd.getSpecifications().get(Integer.parseInt(index));
 		}
 		else {
-			specification = cidsd.new CohortIndicatorAndDimensionSpecification();
+			specification = new CohortIndicatorAndDimensionDataSetDefinition.CohortIndicatorAndDimensionSpecification();
 		}
 		model.put("specification", specification);
 		
diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
index 91a405ff8d..9b1b48fbfd 100644
--- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
+++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
@@ -9,14 +9,6 @@
  */
 package org.openmrs.module.reporting.web.datasets;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.commons.lang.StringUtils;
 import org.openmrs.module.htmlwidgets.web.WidgetUtil;
 import org.openmrs.module.reporting.common.DelimitedKeyComparator;
@@ -40,6 +32,14 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.context.request.WebRequest;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
 @Controller
 public class CohortIndicatorAndDimensionDataSetEditor {
 
@@ -71,7 +71,7 @@ public String addSpecification(@RequestParam("dsdUuid") String dsdUuid,
 		
 		CohortIndicatorAndDimensionSpecification spec = null;
 		if (index == null) {
-			spec = cidsd.new CohortIndicatorAndDimensionSpecification();
+			spec = new CohortIndicatorAndDimensionDataSetDefinition.CohortIndicatorAndDimensionSpecification();
 			cidsd.addSpecification(spec);
 		}
 		else {
diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
index 650c5f5ba7..401a874f4a 100644
--- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
+++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
@@ -9,13 +9,6 @@
  */
 package org.openmrs.module.reporting.web.reports;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.openmrs.Location;
 import org.openmrs.api.context.Context;
 import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
@@ -28,7 +21,6 @@
 import org.openmrs.module.reporting.evaluation.parameter.Parameter;
 import org.openmrs.module.reporting.indicator.CohortIndicator;
 import org.openmrs.module.reporting.indicator.Indicator;
-import org.openmrs.module.reporting.indicator.service.IndicatorService;
 import org.openmrs.module.reporting.indicator.util.IndicatorUtil;
 import org.openmrs.module.reporting.propertyeditor.CohortDefinitionEditor;
 import org.openmrs.module.reporting.propertyeditor.IndicatorEditor;
@@ -46,6 +38,13 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.context.request.WebRequest;
 
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 @Controller
 public class PeriodIndicatorReportController {
 
@@ -108,7 +107,7 @@ public String addColumn(@RequestParam("uuid") String uuid,
 			column = cidsd.getColumns().get(index);
 		}
 		else {
-			column = cidsd.new CohortIndicatorAndDimensionColumn();
+			column = new CohortIndicatorDataSetDefinition.CohortIndicatorAndDimensionColumn();
 			cidsd.addColumn(column);
 		}
 		column.setName(key);

From 15cad2bbd800f7e110ef16ce391dc14c9b18d51d Mon Sep 17 00:00:00 2001
From: Michael Seaton 
Date: Wed, 31 Jul 2019 21:23:13 -0400
Subject: [PATCH 019/143] REPORT-854: Add custom converter for SortCriteria in
 order to property deserialize before and after change to convert non-static
 inner class to static inner-class

---
 .../serializer/SortCriteriaConverterTest.java | 61 ++++++++++++
 .../serializer/non-static-sort-elements.xml   |  9 ++
 .../serializer/static-sort-elements.xml       | 12 +++
 .../serializer/ReportingSerializer.java       |  1 +
 .../serializer/SortCriteriaConverter.java     | 93 +++++++++++++++++++
 5 files changed, 176 insertions(+)
 create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
 create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
 create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
 create mode 100644 api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java

diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
new file mode 100644
index 0000000000..5001505bd2
--- /dev/null
+++ b/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
@@ -0,0 +1,61 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.serializer;
+
+import org.apache.commons.lang.StringUtils;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openmrs.module.reporting.common.SortCriteria;
+import org.openmrs.module.reporting.report.util.ReportUtil;
+import org.openmrs.test.BaseModuleContextSensitiveTest;
+
+public class SortCriteriaConverterTest extends BaseModuleContextSensitiveTest {
+
+	@Test
+	public void shouldDeserializeLegacyNonStaticSortCriteriaElementClass() throws Exception {
+		ReportingSerializer rs = new ReportingSerializer();
+		String src = ReportUtil.readStringFromResource("org/openmrs/module/reporting/serializer/non-static-sort-elements.xml");;
+		SortCriteria sortCriteria = rs.deserialize(src, SortCriteria.class);
+		Assert.assertEquals(1, sortCriteria.getSortElements().size());
+		SortCriteria.SortElement sortElement = sortCriteria.getSortElements().get(0);
+		Assert.assertEquals("encounterDate", sortElement.getElementName());
+		Assert.assertEquals(SortCriteria.SortDirection.ASC, sortElement.getDirection());
+	}
+
+	@Test
+	public void shouldSerializeStaticSortCriteriaElement() throws Exception {
+		ReportingSerializer rs = new ReportingSerializer();
+		SortCriteria sc = new SortCriteria();
+		sc.addSortElement("element1", SortCriteria.SortDirection.DESC);
+		sc.addSortElement("element2", SortCriteria.SortDirection.ASC);
+		String xml = rs.serialize(sc);
+		String expected = ReportUtil.readStringFromResource("org/openmrs/module/reporting/serializer/static-sort-elements.xml");
+		xml = StringUtils.deleteWhitespace(xml);
+		expected = StringUtils.deleteWhitespace(xml);
+		Assert.assertEquals(expected, xml);
+	}
+
+	@Test
+	public void shouldDeserializeStaticSortCriteriaElement() throws Exception {
+		ReportingSerializer rs = new ReportingSerializer();
+		SortCriteria sc = new SortCriteria();
+		sc.addSortElement("element1", SortCriteria.SortDirection.DESC);
+		sc.addSortElement("element2", SortCriteria.SortDirection.ASC);
+		String xml = rs.serialize(sc);
+
+		SortCriteria fromXml = rs.deserialize(xml, SortCriteria.class);
+		Assert.assertEquals(sc.getSortElements().size(), fromXml.getSortElements().size());
+		for (SortCriteria.SortElement e1 : sc.getSortElements()) {
+			SortCriteria.SortElement e2 = fromXml.getSortElement(e1.getElementName());
+			Assert.assertEquals(e1.getElementName(), e2.getElementName());
+			Assert.assertEquals(e1.getDirection(), e2.getDirection());
+		}
+	}
+}
diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
new file mode 100644
index 0000000000..bce5969ba1
--- /dev/null
+++ b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
@@ -0,0 +1,9 @@
+
+    
+        
+            encounterDate
+            ASC
+            
+        
+    
+
diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
new file mode 100644
index 0000000000..96d4596365
--- /dev/null
+++ b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
@@ -0,0 +1,12 @@
+
+    
+        
+            element1
+            DESC
+        
+        
+            element2
+            ASC
+        
+    
+
diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
index 4e1a248cb8..7045d89823 100644
--- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
+++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
@@ -64,6 +64,7 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) {
 	    Mapper mapper = xstream.getMapper();
 	    ConverterLookup converterLookup = xstream.getConverterLookup();
 
+		xstream.registerConverter(new SortCriteriaConverter());
 	    xstream.registerConverter(new PersonQueryConverter(mapper, converterLookup));
 	    xstream.registerConverter(new CohortDefinitionConverter(mapper, converterLookup));
 	    xstream.registerConverter(new EncounterQueryConverter(mapper, converterLookup));
diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java
new file mode 100644
index 0000000000..0e1212ef29
--- /dev/null
+++ b/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java
@@ -0,0 +1,93 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.serializer;
+
+import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import org.openmrs.module.reporting.common.SortCriteria;
+
+/**
+ * Defines how SortCriteria can be converted.
+ * This requires a custom convertor because SortElements used to be implemented as a non-static inner class
+ * and this is no longer supported by Java
+ * This serialiazer is designed to match the legacy format, but ignore elements within the SortElement
+ * that are unrecognized - eg. 
+ *
+ * Example:
+ *
+ * 		
+ * 			
+ * 				
+ * 					encounterDate
+ * 					ASC
+ * 				
+ * 			
+ * 		
+ *
+ */
+public class SortCriteriaConverter implements Converter {
+
+	public boolean canConvert(Class clazz) {
+		return clazz == SortCriteria.class;
+	}
+
+	public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) {
+		SortCriteria sc = (SortCriteria) value;
+		writer.startNode("sortElements");
+		for (SortCriteria.SortElement element : sc.getSortElements()) {
+			writer.startNode("org.openmrs.module.reporting.common.SortCriteria$SortElement");
+
+			// Element Name
+			writer.startNode("elementName");
+			writer.setValue(element.getElementName());
+			writer.endNode();
+
+			// Element Direction
+			writer.startNode("direction");
+			writer.setValue(element.getDirection().toString());
+			writer.endNode();
+
+			writer.endNode(); // sortElement
+		}
+		writer.endNode(); // sortElements
+	}
+
+	public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
+		SortCriteria sc = new SortCriteria();
+		while (reader.hasMoreChildren()) {
+			reader.moveDown();
+			if ("sortElements".equals(reader.getNodeName())) {
+				while (reader.hasMoreChildren()) {
+					reader.moveDown();
+					if (reader.getNodeName().toLowerCase().contains("sortelement")) {
+						SortCriteria.SortElement element = new SortCriteria.SortElement();
+						while (reader.hasMoreChildren()) {
+							reader.moveDown();
+							if ("elementName".equals(reader.getNodeName())) {
+								element.setElementName(reader.getValue());
+							}
+							else if ("direction".equals(reader.getNodeName())) {
+								element.setDirection(SortCriteria.SortDirection.valueOf(reader.getValue()));
+							}
+							reader.moveUp();
+						}
+						sc.getSortElements().add(element);
+					}
+					reader.moveUp();
+				}
+			}
+			reader.moveUp();
+		}
+		return sc;
+	}
+}

From ea842ace1958df33baba4277129f51d1a07fc53d Mon Sep 17 00:00:00 2001
From: Michael Seaton 
Date: Wed, 31 Jul 2019 21:26:12 -0400
Subject: [PATCH 020/143] Attempt to fix travis builds by moving to OpenJDK

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index e9b981efd4..b5ffed3f27 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,3 @@
 language: java
 jdk:
- - oraclejdk8
\ No newline at end of file
+ - openjdk8

From 107f3f5bc74b3e83beec1d9b7e9501329fe2bdd9 Mon Sep 17 00:00:00 2001
From: mgoodrich 
Date: Mon, 5 Aug 2019 12:51:43 -0400
Subject: [PATCH 021/143] Revert: REPORT-854: Add custom converter for
 SortCriteria in order to property deserialize before and after change to
 convert non-static inner class to static inner-class

---
 .../serializer/SortCriteriaConverterTest.java | 61 ------------
 .../serializer/non-static-sort-elements.xml   |  9 --
 .../serializer/static-sort-elements.xml       | 12 ---
 .../serializer/ReportingSerializer.java       |  1 -
 .../serializer/SortCriteriaConverter.java     | 93 -------------------
 5 files changed, 176 deletions(-)
 delete mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
 delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
 delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
 delete mode 100644 api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java

diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
deleted file mode 100644
index 5001505bd2..0000000000
--- a/api-tests/src/test/java/org/openmrs/module/reporting/serializer/SortCriteriaConverterTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.serializer;
-
-import org.apache.commons.lang.StringUtils;
-import org.junit.Assert;
-import org.junit.Test;
-import org.openmrs.module.reporting.common.SortCriteria;
-import org.openmrs.module.reporting.report.util.ReportUtil;
-import org.openmrs.test.BaseModuleContextSensitiveTest;
-
-public class SortCriteriaConverterTest extends BaseModuleContextSensitiveTest {
-
-	@Test
-	public void shouldDeserializeLegacyNonStaticSortCriteriaElementClass() throws Exception {
-		ReportingSerializer rs = new ReportingSerializer();
-		String src = ReportUtil.readStringFromResource("org/openmrs/module/reporting/serializer/non-static-sort-elements.xml");;
-		SortCriteria sortCriteria = rs.deserialize(src, SortCriteria.class);
-		Assert.assertEquals(1, sortCriteria.getSortElements().size());
-		SortCriteria.SortElement sortElement = sortCriteria.getSortElements().get(0);
-		Assert.assertEquals("encounterDate", sortElement.getElementName());
-		Assert.assertEquals(SortCriteria.SortDirection.ASC, sortElement.getDirection());
-	}
-
-	@Test
-	public void shouldSerializeStaticSortCriteriaElement() throws Exception {
-		ReportingSerializer rs = new ReportingSerializer();
-		SortCriteria sc = new SortCriteria();
-		sc.addSortElement("element1", SortCriteria.SortDirection.DESC);
-		sc.addSortElement("element2", SortCriteria.SortDirection.ASC);
-		String xml = rs.serialize(sc);
-		String expected = ReportUtil.readStringFromResource("org/openmrs/module/reporting/serializer/static-sort-elements.xml");
-		xml = StringUtils.deleteWhitespace(xml);
-		expected = StringUtils.deleteWhitespace(xml);
-		Assert.assertEquals(expected, xml);
-	}
-
-	@Test
-	public void shouldDeserializeStaticSortCriteriaElement() throws Exception {
-		ReportingSerializer rs = new ReportingSerializer();
-		SortCriteria sc = new SortCriteria();
-		sc.addSortElement("element1", SortCriteria.SortDirection.DESC);
-		sc.addSortElement("element2", SortCriteria.SortDirection.ASC);
-		String xml = rs.serialize(sc);
-
-		SortCriteria fromXml = rs.deserialize(xml, SortCriteria.class);
-		Assert.assertEquals(sc.getSortElements().size(), fromXml.getSortElements().size());
-		for (SortCriteria.SortElement e1 : sc.getSortElements()) {
-			SortCriteria.SortElement e2 = fromXml.getSortElement(e1.getElementName());
-			Assert.assertEquals(e1.getElementName(), e2.getElementName());
-			Assert.assertEquals(e1.getDirection(), e2.getDirection());
-		}
-	}
-}
diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
deleted file mode 100644
index bce5969ba1..0000000000
--- a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/non-static-sort-elements.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-    
-        
-            encounterDate
-            ASC
-            
-        
-    
-
diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
deleted file mode 100644
index 96d4596365..0000000000
--- a/api-tests/src/test/resources/org/openmrs/module/reporting/serializer/static-sort-elements.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-    
-        
-            element1
-            DESC
-        
-        
-            element2
-            ASC
-        
-    
-
diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
index 7045d89823..4e1a248cb8 100644
--- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
+++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java
@@ -64,7 +64,6 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) {
 	    Mapper mapper = xstream.getMapper();
 	    ConverterLookup converterLookup = xstream.getConverterLookup();
 
-		xstream.registerConverter(new SortCriteriaConverter());
 	    xstream.registerConverter(new PersonQueryConverter(mapper, converterLookup));
 	    xstream.registerConverter(new CohortDefinitionConverter(mapper, converterLookup));
 	    xstream.registerConverter(new EncounterQueryConverter(mapper, converterLookup));
diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java b/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java
deleted file mode 100644
index 0e1212ef29..0000000000
--- a/api/src/main/java/org/openmrs/module/reporting/serializer/SortCriteriaConverter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.serializer;
-
-import com.thoughtworks.xstream.converters.Converter;
-import com.thoughtworks.xstream.converters.MarshallingContext;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import org.openmrs.module.reporting.common.SortCriteria;
-
-/**
- * Defines how SortCriteria can be converted.
- * This requires a custom convertor because SortElements used to be implemented as a non-static inner class
- * and this is no longer supported by Java
- * This serialiazer is designed to match the legacy format, but ignore elements within the SortElement
- * that are unrecognized - eg. 
- *
- * Example:
- *
- * 		
- * 			
- * 				
- * 					encounterDate
- * 					ASC
- * 				
- * 			
- * 		
- *
- */
-public class SortCriteriaConverter implements Converter {
-
-	public boolean canConvert(Class clazz) {
-		return clazz == SortCriteria.class;
-	}
-
-	public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) {
-		SortCriteria sc = (SortCriteria) value;
-		writer.startNode("sortElements");
-		for (SortCriteria.SortElement element : sc.getSortElements()) {
-			writer.startNode("org.openmrs.module.reporting.common.SortCriteria$SortElement");
-
-			// Element Name
-			writer.startNode("elementName");
-			writer.setValue(element.getElementName());
-			writer.endNode();
-
-			// Element Direction
-			writer.startNode("direction");
-			writer.setValue(element.getDirection().toString());
-			writer.endNode();
-
-			writer.endNode(); // sortElement
-		}
-		writer.endNode(); // sortElements
-	}
-
-	public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
-		SortCriteria sc = new SortCriteria();
-		while (reader.hasMoreChildren()) {
-			reader.moveDown();
-			if ("sortElements".equals(reader.getNodeName())) {
-				while (reader.hasMoreChildren()) {
-					reader.moveDown();
-					if (reader.getNodeName().toLowerCase().contains("sortelement")) {
-						SortCriteria.SortElement element = new SortCriteria.SortElement();
-						while (reader.hasMoreChildren()) {
-							reader.moveDown();
-							if ("elementName".equals(reader.getNodeName())) {
-								element.setElementName(reader.getValue());
-							}
-							else if ("direction".equals(reader.getNodeName())) {
-								element.setDirection(SortCriteria.SortDirection.valueOf(reader.getValue()));
-							}
-							reader.moveUp();
-						}
-						sc.getSortElements().add(element);
-					}
-					reader.moveUp();
-				}
-			}
-			reader.moveUp();
-		}
-		return sc;
-	}
-}

From 58fa536ce7679f85addc09f0ea1d32efbc590516 Mon Sep 17 00:00:00 2001
From: mgoodrich 
Date: Mon, 5 Aug 2019 12:52:04 -0400
Subject: [PATCH 022/143] Revert: REPORT-854: Make inner classes static

---
 ...IndicatorAndDimensionDataSetDefinition.java |  2 +-
 .../CohortIndicatorDataSetDefinition.java      |  2 +-
 ...imensionSpecificationPortletController.java | 17 +++++++++--------
 ...hortIndicatorAndDimensionDataSetEditor.java | 18 +++++++++---------
 .../PeriodIndicatorReportController.java       | 17 +++++++++--------
 5 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
index 2a0961f5b5..624ea4c151 100644
--- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
+++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
@@ -172,7 +172,7 @@ public void addSpecification(String indicatorNumber, String label, Mapped mod
 			specification = cidsd.getSpecifications().get(Integer.parseInt(index));
 		}
 		else {
-			specification = new CohortIndicatorAndDimensionDataSetDefinition.CohortIndicatorAndDimensionSpecification();
+			specification = cidsd.new CohortIndicatorAndDimensionSpecification();
 		}
 		model.put("specification", specification);
 		
diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
index 9b1b48fbfd..91a405ff8d 100644
--- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
+++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java
@@ -9,6 +9,14 @@
  */
 package org.openmrs.module.reporting.web.datasets;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.commons.lang.StringUtils;
 import org.openmrs.module.htmlwidgets.web.WidgetUtil;
 import org.openmrs.module.reporting.common.DelimitedKeyComparator;
@@ -32,14 +40,6 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.context.request.WebRequest;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
 @Controller
 public class CohortIndicatorAndDimensionDataSetEditor {
 
@@ -71,7 +71,7 @@ public String addSpecification(@RequestParam("dsdUuid") String dsdUuid,
 		
 		CohortIndicatorAndDimensionSpecification spec = null;
 		if (index == null) {
-			spec = new CohortIndicatorAndDimensionDataSetDefinition.CohortIndicatorAndDimensionSpecification();
+			spec = cidsd.new CohortIndicatorAndDimensionSpecification();
 			cidsd.addSpecification(spec);
 		}
 		else {
diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
index 401a874f4a..650c5f5ba7 100644
--- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
+++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java
@@ -9,6 +9,13 @@
  */
 package org.openmrs.module.reporting.web.reports;
 
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.openmrs.Location;
 import org.openmrs.api.context.Context;
 import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
@@ -21,6 +28,7 @@
 import org.openmrs.module.reporting.evaluation.parameter.Parameter;
 import org.openmrs.module.reporting.indicator.CohortIndicator;
 import org.openmrs.module.reporting.indicator.Indicator;
+import org.openmrs.module.reporting.indicator.service.IndicatorService;
 import org.openmrs.module.reporting.indicator.util.IndicatorUtil;
 import org.openmrs.module.reporting.propertyeditor.CohortDefinitionEditor;
 import org.openmrs.module.reporting.propertyeditor.IndicatorEditor;
@@ -38,13 +46,6 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.context.request.WebRequest;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 @Controller
 public class PeriodIndicatorReportController {
 
@@ -107,7 +108,7 @@ public String addColumn(@RequestParam("uuid") String uuid,
 			column = cidsd.getColumns().get(index);
 		}
 		else {
-			column = new CohortIndicatorDataSetDefinition.CohortIndicatorAndDimensionColumn();
+			column = cidsd.new CohortIndicatorAndDimensionColumn();
 			cidsd.addColumn(column);
 		}
 		column.setName(key);

From d8e84f8f688ce92e67edbf1834b41d9210e85849 Mon Sep 17 00:00:00 2001
From: mgoodrich 
Date: Mon, 5 Aug 2019 13:03:16 -0400
Subject: [PATCH 023/143] REPORT-854: Make inner classes serializable

---
 .../openmrs/module/reporting/common/SortCriteria.java    | 9 ++++++---
 .../CohortIndicatorAndDimensionDataSetDefinition.java    | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java
index 1f7be1c8dc..77588ade44 100644
--- a/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java
+++ b/api/src/main/java/org/openmrs/module/reporting/common/SortCriteria.java
@@ -9,6 +9,7 @@
  */
 package org.openmrs.module.reporting.common;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -92,10 +93,12 @@ public enum SortDirection {
 	
 	//***** INNER CLASSES *****
 	
-	static public class SortElement {
-		
+	public class SortElement implements Serializable {
+
+		public static final long serialVersionUID = 1L;
+
 		//***** PROPERTIES *****
-		
+
 		private String elementName;
 		private SortDirection direction;
 		
diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
index 624ea4c151..f95dde8cf2 100644
--- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
+++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortIndicatorAndDimensionDataSetDefinition.java
@@ -17,6 +17,7 @@
 import org.openmrs.module.reporting.indicator.dimension.CohortDefinitionDimension;
 import org.openmrs.module.reporting.indicator.util.IndicatorUtil;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;

From 335384bf4c80ccadc69cc07af3b51980ccac6395 Mon Sep 17 00:00:00 2001
From: openmrs-bot 
Date: Wed, 7 Aug 2019 18:42:35 +0000
Subject: [PATCH 024/143] [maven-release-plugin] prepare release 1.18.0

---
 api-1.10/pom.xml  | 2 +-
 api-1.9/pom.xml   | 2 +-
 api-2.0/pom.xml   | 2 +-
 api-tests/pom.xml | 2 +-
 api/pom.xml       | 2 +-
 omod/pom.xml      | 2 +-
 pom.xml           | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml
index b449676ce2..5070ad70c2 100644
--- a/api-1.10/pom.xml
+++ b/api-1.10/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0-SNAPSHOT
+        1.18.0
     
 
     reporting-api-1.10
diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml
index e1cb003e3c..74fe310e4a 100644
--- a/api-1.9/pom.xml
+++ b/api-1.9/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0-SNAPSHOT
+        1.18.0
     
 
     reporting-api-1.9
diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml
index 18bbfd43f1..6e1e54cd61 100644
--- a/api-2.0/pom.xml
+++ b/api-2.0/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0-SNAPSHOT
+        1.18.0
     
 
     reporting-api-2.0
diff --git a/api-tests/pom.xml b/api-tests/pom.xml
index 6a6152b75b..f05c12ed26 100644
--- a/api-tests/pom.xml
+++ b/api-tests/pom.xml
@@ -4,7 +4,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0-SNAPSHOT
+		1.18.0
 	
 
 	reporting-api-tests
diff --git a/api/pom.xml b/api/pom.xml
index 92a5aa957f..ec275d4889 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -3,7 +3,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0-SNAPSHOT
+		1.18.0
 	
 	reporting-api
 	jar
diff --git a/omod/pom.xml b/omod/pom.xml
index 1e6abf061b..4fc11e6c8a 100644
--- a/omod/pom.xml
+++ b/omod/pom.xml
@@ -3,7 +3,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0-SNAPSHOT
+		1.18.0
 	
 	reporting-omod
 	jar
diff --git a/pom.xml b/pom.xml
index d2edd9e4bf..b0caa408d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
 
 	org.openmrs.module
 	reporting
-	1.18.0-SNAPSHOT
+	1.18.0
 	pom
 	Reporting
 	Parent project for Reporting
@@ -14,7 +14,7 @@
 		scm:git:git@github.com:openmrs/openmrs-module-reporting.git
 		scm:git:git@github.com:openmrs/openmrs-module-reporting.git
 		https://github.com/openmrs/openmrs-module-reporting/
-        HEAD
+        1.18.0
     
 	
 	

From f3bdf130c8240d253402a028440932002df5f250 Mon Sep 17 00:00:00 2001
From: openmrs-bot 
Date: Wed, 7 Aug 2019 18:42:41 +0000
Subject: [PATCH 025/143] [maven-release-plugin] prepare for next development
 iteration

---
 api-1.10/pom.xml  | 2 +-
 api-1.9/pom.xml   | 2 +-
 api-2.0/pom.xml   | 2 +-
 api-tests/pom.xml | 2 +-
 api/pom.xml       | 2 +-
 omod/pom.xml      | 2 +-
 pom.xml           | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml
index 5070ad70c2..a400991f3f 100644
--- a/api-1.10/pom.xml
+++ b/api-1.10/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0
+        1.19.0-SNAPSHOT
     
 
     reporting-api-1.10
diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml
index 74fe310e4a..03a60069c1 100644
--- a/api-1.9/pom.xml
+++ b/api-1.9/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0
+        1.19.0-SNAPSHOT
     
 
     reporting-api-1.9
diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml
index 6e1e54cd61..fab467aad3 100644
--- a/api-2.0/pom.xml
+++ b/api-2.0/pom.xml
@@ -4,7 +4,7 @@
     
         org.openmrs.module
         reporting
-        1.18.0
+        1.19.0-SNAPSHOT
     
 
     reporting-api-2.0
diff --git a/api-tests/pom.xml b/api-tests/pom.xml
index f05c12ed26..ec44529646 100644
--- a/api-tests/pom.xml
+++ b/api-tests/pom.xml
@@ -4,7 +4,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0
+		1.19.0-SNAPSHOT
 	
 
 	reporting-api-tests
diff --git a/api/pom.xml b/api/pom.xml
index ec275d4889..15c17511da 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -3,7 +3,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0
+		1.19.0-SNAPSHOT
 	
 	reporting-api
 	jar
diff --git a/omod/pom.xml b/omod/pom.xml
index 4fc11e6c8a..53bec3e881 100644
--- a/omod/pom.xml
+++ b/omod/pom.xml
@@ -3,7 +3,7 @@
 	
 		org.openmrs.module
 		reporting
-		1.18.0
+		1.19.0-SNAPSHOT
 	
 	reporting-omod
 	jar
diff --git a/pom.xml b/pom.xml
index b0caa408d0..be352a33ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
 
 	org.openmrs.module
 	reporting
-	1.18.0
+	1.19.0-SNAPSHOT
 	pom
 	Reporting
 	Parent project for Reporting
@@ -14,7 +14,7 @@
 		scm:git:git@github.com:openmrs/openmrs-module-reporting.git
 		scm:git:git@github.com:openmrs/openmrs-module-reporting.git
 		https://github.com/openmrs/openmrs-module-reporting/
-        1.18.0
+        HEAD
     
 	
 	

From 8e54802975ef910af01477a8f76a7370f469e62f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= 
Date: Mon, 9 Sep 2019 03:23:51 -0300
Subject: [PATCH 026/143] Minor formatting (proposals) (#181)

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index abf4878952..6458b1858b 100644
--- a/README.md
+++ b/README.md
@@ -18,12 +18,12 @@ Requirements
 ================
 OpenMRS 1.5.2 or higher
 
-###Required Modules:
+### Required Modules:
 1. HTML Widgets 1.5.5
 2. Serialization XStream 0.1.8.1
 3. Calculation 1.2
 
-###Recommended modules:
+### Recommended modules:
 1. Reporting Compatibility 1.5.0.3
 
 View, download or fork source code: on GitHub

From ecb73fb2ecdbcd39498e64a06c33e89937b05289 Mon Sep 17 00:00:00 2001
From: mozzy11 
Date: Mon, 9 Sep 2019 22:10:22 +0300
Subject: [PATCH 027/143] REPORT-855 : Improved the
 BuiltInCohortDefinitionLibrary For Coded_obs and text_obs

---
 .../definition/library/BuiltInCohortDefinitionLibrary.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java
index 27564e8918..248830b7e9 100644
--- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java
+++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java
@@ -37,7 +37,7 @@
 import org.openmrs.module.reporting.cohort.definition.TextObsCohortDefinition;
 import org.openmrs.module.reporting.cohort.definition.DateObsCohortDefinition;
 import org.openmrs.module.reporting.common.RangeComparator;
-
+import org.openmrs.module.reporting.common.SetComparator;
 
 import java.util.Date;
 import java.util.List;
@@ -122,6 +122,7 @@ public CohortDefinition getCodedObsSearchAdvanced() {
         cd.addParameter(new Parameter("values", "reporting.parameter.valueList", Concept.class, List.class, null));
         cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
         cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
+        cd.addParameter(new Parameter("operator", "reporting.parameter.operator", SetComparator.class));
         return cd;
     }
 
@@ -161,6 +162,7 @@ public CohortDefinition getTextObsSearchAdvanced() {
         cd.addParameter(new Parameter("values", "reporting.parameter.valueList", Concept.class, List.class, null));
         cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
         cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
+        cd.addParameter(new Parameter("operator", "reporting.parameter.operator", SetComparator.class));
         return cd;
     }
 

From 7ce451871d841a476d3333a998e7871f2d0912bd Mon Sep 17 00:00:00 2001
From: mozzy11 
Date: Wed, 18 Sep 2019 16:40:12 +0300
Subject: [PATCH 028/143] REPORT-856: Create ConditonCohortDefinition class and
 add Tests

---
 api-1.9/pom.xml                               |   2 +-
 api-2.2/.gitignore                            |   5 +
 api-2.2/pom.xml                               | 104 ++++++++++
 .../definition/ConditionCohortDefinition.java | 142 ++++++++++++++
 .../ConditionCohortDefinitionEvaluator.java   |  55 ++++++
 .../BuiltInCohortDefinitionLibrary2_2.java    |  43 +++++
 ...onditionCohortDefinitionEvaluatorTest.java | 180 ++++++++++++++++++
 ...BuiltInCohortDefinitionLibrary2_2Test.java |  57 ++++++
 ...onCohortDefinitionEvaluatorTestDataSet.xml | 125 ++++++++++++
 api-tests/pom.xml                             |   2 +-
 api/pom.xml                                   |   4 +-
 omod/src/main/resources/config.xml            |   4 +
 pom.xml                                       |  13 +-
 13 files changed, 731 insertions(+), 5 deletions(-)
 create mode 100644 api-2.2/.gitignore
 create mode 100644 api-2.2/pom.xml
 create mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java
 create mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
 create mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java
 create mode 100644 api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java
 create mode 100644 api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java
 create mode 100644 api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml

diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml
index 03a60069c1..24d3021564 100644
--- a/api-1.9/pom.xml
+++ b/api-1.9/pom.xml
@@ -77,4 +77,4 @@
         
     
 
-
+
\ No newline at end of file
diff --git a/api-2.2/.gitignore b/api-2.2/.gitignore
new file mode 100644
index 0000000000..0b40cb3336
--- /dev/null
+++ b/api-2.2/.gitignore
@@ -0,0 +1,5 @@
+/.settings
+/.classpath
+/.project
+/target
+/bin/
diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml
new file mode 100644
index 0000000000..b8a4369089
--- /dev/null
+++ b/api-2.2/pom.xml
@@ -0,0 +1,104 @@
+
+	4.0.0
+
+	
+		org.openmrs.module
+		reporting
+		1.19.0-SNAPSHOT
+	 
+
+	reporting-api-2.2
+	jar
+	reporting Module api 2.2
+	2.2 api project for reporting
+	
+	
+		2.2.0
+	
+
+	
+		
+			${project.parent.groupId}
+			${project.parent.artifactId}-api
+			${project.parent.version}
+			provided
+			
+		
+			${project.parent.groupId}
+			${project.parent.artifactId}-api-tests
+			${project.parent.version}
+			test-jar
+			test
+		  
+ 
+          
+			org.openmrs.test
+			openmrs-test
+			pom
+			test
+			${openMRSVersion} 
+		    
+		
+			org.openmrs.api
+			openmrs-api
+			${openMRSVersion}
+		
+		
+		
+			org.openmrs.api
+			openmrs-api
+			test-jar
+			test
+			${openMRSVersion}
+		
+
+         
+			org.openmrs.module
+			reportingcompatibility-api
+			${reportingCompatibilityVersion}
+			test
+			 
+			
+				cglib
+				cglib-nodep
+				2.2
+				test
+			 
+			
+    		    org.codehaus.jackson
+    			jackson-core-asl
+    			1.9.13
+    			test
+			  
+	
+
+	
+		
+			
+				src/main/resources
+				true
+			
+		
+
+		
+			
+				src/test/resources
+				
+					**/*.properties
+					**/*.xml
+				
+				true
+			
+			
+				src/test/resources
+				
+					**/*.properties
+					**/*.xml
+				
+				false
+			
+		
+	
+
+
diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java
new file mode 100644
index 0000000000..252ea4eba2
--- /dev/null
+++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java
@@ -0,0 +1,142 @@
+
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.cohort.definition;
+
+import java.util.Date;
+
+import org.openmrs.Concept;
+import org.openmrs.module.reporting.cohort.definition.BaseCohortDefinition;
+import org.openmrs.module.reporting.common.Localized;
+import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty;
+import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy;
+import org.openmrs.module.reporting.evaluation.caching.Caching;
+
+@Caching(strategy = ConfigurationPropertyCachingStrategy.class)
+@Localized("reporting.ConditionCohortDefinition")
+public class ConditionCohortDefinition extends BaseCohortDefinition {
+	
+	public static final long serialVersionUID = 1L;
+	
+	@ConfigurationProperty(value = "conditionCoded")
+	private Concept conditionCoded;
+	
+	@ConfigurationProperty(value = "conditionNonCoded")
+	private String conditionNonCoded;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date onsetDateOnOrBefore;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date onsetDateOnOrAfter;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date endDateOnOrBefore;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date endDateOnOrAfter;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date createdOnOrBefore;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date createdOnOrAfter;
+	
+	@ConfigurationProperty(group = "obsDatetimeGroup")
+	private Date activeOnDate;
+	
+	public Concept getConditionCoded() {
+		return conditionCoded;
+	}
+	
+	public void setConditionCoded(Concept conditionCoded) {
+		this.conditionCoded = conditionCoded;
+	}
+	
+	public String getConditionNonCoded() {
+		return conditionNonCoded;
+	}
+	
+	public void setConditionNonCoded(String conditionNonCoded) {
+		this.conditionNonCoded = conditionNonCoded;
+	}
+
+	
+	public Date getOnsetDateOnOrBefore() {
+		return onsetDateOnOrBefore;
+	}
+
+	
+	public void setOnsetDateOnOrBefore(Date onsetDateOnOrBefore) {
+		this.onsetDateOnOrBefore = onsetDateOnOrBefore;
+	}
+
+	
+	public Date getOnsetDateOnOrAfter() {
+		return onsetDateOnOrAfter;
+	}
+
+	
+	public void setOnsetDateOnOrAfter(Date onsetDateOnOrAfter) {
+		this.onsetDateOnOrAfter = onsetDateOnOrAfter;
+	}
+
+	
+	public Date getEndDateOnOrBefore() {
+		return endDateOnOrBefore;
+	}
+
+	
+	public void setEndDateOnOrBefore(Date endDateOnOrBefore) {
+		this.endDateOnOrBefore = endDateOnOrBefore;
+	}
+
+	
+	public Date getEndDateOnOrAfter() {
+		return endDateOnOrAfter;
+	}
+
+	
+	public void setEndDateOnOrAfter(Date endDateOnOrAfter) {
+		this.endDateOnOrAfter = endDateOnOrAfter;
+	}
+
+	
+	public Date getCreatedOnOrBefore() {
+		return createdOnOrBefore;
+	}
+
+	
+	public void setCreatedOnOrBefore(Date createdOnOrBefore) {
+		this.createdOnOrBefore = createdOnOrBefore;
+	}
+
+	
+	public Date getCreatedOnOrAfter() {
+		return createdOnOrAfter;
+	}
+
+	
+	public void setCreatedOnOrAfter(Date createdOnOrAfter) {
+		this.createdOnOrAfter = createdOnOrAfter;
+	}
+
+	
+	public Date getActiveOnDate() {
+		return activeOnDate;
+	}
+
+	
+	public void setActiveOnDate(Date activeOnDate) {
+		this.activeOnDate = activeOnDate;
+	}
+	
+	
+}
diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
new file mode 100644
index 0000000000..f27d09ae4a
--- /dev/null
+++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
@@ -0,0 +1,55 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.cohort.definition.evaluator;
+
+import java.util.List;
+
+import org.openmrs.Cohort;
+import org.openmrs.Condition;
+import org.openmrs.annotation.Handler;
+import org.openmrs.module.reporting.cohort.EvaluatedCohort;
+import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.evaluator.CohortDefinitionEvaluator;
+import org.openmrs.module.reporting.evaluation.EvaluationContext;
+import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder;
+import org.openmrs.module.reporting.evaluation.service.EvaluationService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+@Handler(supports = { ConditionCohortDefinition.class })
+public class ConditionCohortDefinitionEvaluator implements CohortDefinitionEvaluator {
+	
+	@Autowired
+	EvaluationService evaluationService;
+	
+	@Override
+	public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationContext context) {
+		
+		ConditionCohortDefinition cd = (ConditionCohortDefinition) cohortDefinition;
+		
+		HqlQueryBuilder query = new HqlQueryBuilder();
+		query.select("c.patient.patientId")
+				.from(Condition.class, "c")
+				.wherePatientIn("c.patient.patientId", context)
+		        .whereEqual("c.condition.coded", cd.getConditionCoded())
+		        .whereEqual("c.condition.nonCoded", cd.getConditionNonCoded())
+		        .whereGreaterOrEqualTo("c.dateCreated", cd.getCreatedOnOrAfter())
+		        .whereLessOrEqualTo("c.dateCreated", cd.getCreatedOnOrBefore())
+		        .whereGreaterOrEqualTo("c.onsetDate", cd.getOnsetDateOnOrAfter())
+		        .whereLessOrEqualTo("c.onsetDate", cd.getOnsetDateOnOrBefore())
+		        .whereGreaterOrEqualTo("c.endDate", cd.getEndDateOnOrAfter())
+		        .whereLessOrEqualTo("c.endDate", cd.getEndDateOnOrBefore())
+				.whereGreater("c.endDate", cd.getActiveOnDate())
+				.whereLess("c.onsetDate", cd.getActiveOnDate());	
+		List patientIds = evaluationService.evaluateToList(query, Integer.class, context);
+		Cohort cohort = new Cohort(patientIds);
+		return new EvaluatedCohort(cohort, cd, context);
+	}
+}
diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java
new file mode 100644
index 0000000000..c742ed349a
--- /dev/null
+++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java
@@ -0,0 +1,43 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.cohort.definition.library;
+
+import org.openmrs.Concept;
+import org.openmrs.CareSetting;
+import org.openmrs.Drug;
+import org.openmrs.module.reporting.common.Match;
+import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2;
+import org.openmrs.module.reporting.definition.library.DocumentedDefinition;
+import org.openmrs.module.reporting.evaluation.parameter.Parameter;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+public class BuiltInCohortDefinitionLibrary2_2 extends BuiltInCohortDefinitionLibrary {
+	
+	@DocumentedDefinition("conditonSearchAdvanced")
+	public CohortDefinition getConditonSearchAdvanced() {
+		ConditionCohortDefinition cd = new ConditionCohortDefinition();
+		cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class));
+		cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class));
+		cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class));
+		cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class));
+		cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class));
+		cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class));
+		cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class));
+		cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class));
+		cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class));
+		return cd;
+	}
+}
diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java
new file mode 100644
index 0000000000..c782a9e15e
--- /dev/null
+++ b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java
@@ -0,0 +1,180 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.cohort.definition.evaluator;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.openmrs.Cohort;
+import org.openmrs.Concept;
+import org.openmrs.api.context.Context;
+import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionService;
+import org.openmrs.module.reporting.common.DateUtil;
+import org.openmrs.test.BaseModuleContextSensitiveTest;
+
+public class ConditionCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest {
+	
+	protected static final String CONDITION_TEST_DATASET = "org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml";
+	
+	private ConditionCohortDefinition cd;
+	
+	@Before
+	public void setup() throws Exception {
+		initializeInMemoryDatabase();
+		cd = new ConditionCohortDefinition();
+		executeDataSet(CONDITION_TEST_DATASET);
+	}
+	
+	@After
+	public void tearDown() {
+		cd = null;
+	}
+	
+	@Test
+	public void evaluateShouldReturnAllPatients() throws Exception {
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertTrue(cohort.contains(5));
+		Assert.assertEquals(5, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithConcept() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(4, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithConceptAndNonCodedValue() throws Exception {
+		cd.setConditionNonCoded("NON-CODED-CONDITION");
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(2, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithCreatedOnOrAfter() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setCreatedOnOrAfter(DateUtil.getDateTime(2014, 03, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertEquals(3, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithOnSetDateOnOrAfter() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setOnsetDateOnOrAfter(DateUtil.getDateTime(2014, 03, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertEquals(3, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithEndDateOnOrAfter() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setEndDateOnOrAfter(DateUtil.getDateTime(2016, 05, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertEquals(3, cohort.size());
+	}
+	
+	
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithCreatedOnOrBefore() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setCreatedOnOrBefore(DateUtil.getDateTime(2014, 03, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(2, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithOnSetDateOnOrBefore() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setOnsetDateOnOrBefore(DateUtil.getDateTime(2014, 03, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(2, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithEndDateOnOrBefore() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setEndDateOnOrBefore(DateUtil.getDateTime(2016, 05, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(1, cohort.size());
+	}
+	
+	
+	
+	@Test
+	public void evaluateShouldFilterPatientsBetweenDateRanges() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setCreatedOnOrAfter(DateUtil.getDateTime(2014, 02, 12));
+		cd.setCreatedOnOrBefore(DateUtil.getDateTime(2014, 04, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertEquals(1, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithActiveOnDate() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setConditionCoded(concept);
+		cd.setActiveOnDate(DateUtil.getDateTime(2014, 04, 12));
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(3));
+		Assert.assertTrue(cohort.contains(4));
+		Assert.assertEquals(2, cohort.size());
+	}
+	
+	@Test
+	public void evaluateShouldFilterPatientsWithAllParams() throws Exception {
+		Concept concept = Context.getConceptService().getConcept(409);
+		cd.setCreatedOnOrAfter(DateUtil.getDateTime(2015, 01, 10));
+		cd.setCreatedOnOrBefore(DateUtil.getDateTime(2015, 01, 14));
+		cd.setConditionCoded(concept);
+		cd.setConditionNonCoded("NON-CODED-CONDITION2");
+		Cohort cohort = Context.getService(CohortDefinitionService.class).evaluate(cd, null);
+		Assert.assertTrue(cohort.contains(1));
+		Assert.assertTrue(cohort.contains(2));
+		Assert.assertEquals(2, cohort.size());
+	}
+}
diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java
new file mode 100644
index 0000000000..60000944db
--- /dev/null
+++ b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java
@@ -0,0 +1,57 @@
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+package org.openmrs.module.reporting.cohort.definition.library;
+/**
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
+ *
+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
+ * graphic logo is a trademark of OpenMRS Inc.
+ */
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import java.util.Date;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openmrs.Concept;
+import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition;
+import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2;
+
+import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter;
+
+
+public class BuiltInCohortDefinitionLibrary2_2Test {
+
+    private BuiltInCohortDefinitionLibrary2_2 library;
+
+    @Before
+    public void setUp() throws Exception {
+        library = new BuiltInCohortDefinitionLibrary2_2();
+    }
+
+    @Test
+	public void testGetConditonSearchAdavanced() throws Exception {
+		CohortDefinition cd = library.getConditonSearchAdvanced();
+		assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass()));
+		assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class));
+	    assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class));
+	    assertThat(cd, hasParameter("endDateOnOrBefore", Date.class));
+	    assertThat(cd, hasParameter("endDateOnOrAfter", Date.class));
+	    assertThat(cd, hasParameter("createdOnOrBefore", Date.class));
+	    assertThat(cd, hasParameter("createdOnOrAfter", Date.class));
+	    assertThat(cd, hasParameter("activeOnDate", Date.class));
+	    assertThat(cd, hasParameter("conditionNonCoded", String.class));
+	    assertThat(cd, hasParameter("conditionCoded", Concept.class));
+	}  
+}
diff --git a/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml b/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml
new file mode 100644
index 0000000000..c395f69bc8
--- /dev/null
+++ b/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml
@@ -0,0 +1,125 @@
+
+
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+	
+	
+	
+
+	
+	
+
+	
+	
+	
+	
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+
+	
+
+	
+
+	
+
+	
+ 
\ No newline at end of file
diff --git a/api-tests/pom.xml b/api-tests/pom.xml
index ec44529646..047ea2566f 100644
--- a/api-tests/pom.xml
+++ b/api-tests/pom.xml
@@ -114,4 +114,4 @@
 		${project.parent.groupId}.${project.parent.artifactId}
 	
 
-
+
\ No newline at end of file
diff --git a/api/pom.xml b/api/pom.xml
index 15c17511da..acc83df9d9 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -15,9 +15,9 @@
 		
 			org.openmrs.module
 			reportingcompatibility-api
-			1.5.8
+			${reportingCompatibilityVersion}
 			provided
 		
     
 	
-
+
\ No newline at end of file
diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml
index fb1b28b210..be18045ceb 100644
--- a/omod/src/main/resources/config.xml
+++ b/omod/src/main/resources/config.xml
@@ -181,6 +181,10 @@
 			/lib/reporting-api-2.0.*
 			2.*
 		
+		
+			/lib/reporting-api-2.2.*
+			2.2.*
+		
 	
 	
 
diff --git a/pom.xml b/pom.xml
index be352a33ca..8855b2a3f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,12 +35,14 @@
 		api-1.9
 		api-1.10
 		api-2.0
+		api-2.2
 		api-tests
 		omod
     
 
 	
 		1.9.9
+		2.0.6
 		1.9
 		1.7.2
 		0.2.12
@@ -337,6 +339,15 @@
                 reporting-api-2.0
             
         
+        
+            2.2
+            
+                2.2.0
+                2.2
+                1.9.13
+                reporting-api-2.0
+            
+        
 	
 
 	
@@ -563,4 +574,4 @@
 		
 	
 
-
+
\ No newline at end of file

From a2bf349b534e753541199c4e85544155154925eb Mon Sep 17 00:00:00 2001
From: mozzy11 
Date: Mon, 7 Oct 2019 14:44:15 +0300
Subject: [PATCH 029/143] REPORT-856: ActiveOnDate should Include onset and End
 dates

---
 .../evaluator/ConditionCohortDefinitionEvaluator.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
index f27d09ae4a..297132acd4 100644
--- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
+++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java
@@ -46,8 +46,8 @@ public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationCon
 		        .whereLessOrEqualTo("c.onsetDate", cd.getOnsetDateOnOrBefore())
 		        .whereGreaterOrEqualTo("c.endDate", cd.getEndDateOnOrAfter())
 		        .whereLessOrEqualTo("c.endDate", cd.getEndDateOnOrBefore())
-				.whereGreater("c.endDate", cd.getActiveOnDate())
-				.whereLess("c.onsetDate", cd.getActiveOnDate());	
+				.whereGreaterOrEqualTo("c.endDate", cd.getActiveOnDate())
+				.whereLessOrEqualTo("c.onsetDate", cd.getActiveOnDate());	
 		List patientIds = evaluationService.evaluateToList(query, Integer.class, context);
 		Cohort cohort = new Cohort(patientIds);
 		return new EvaluatedCohort(cohort, cd, context);

From b1168f82ce6f65360eb06971203ede2c9ad27a9c Mon Sep 17 00:00:00 2001
From: Michael Seaton 
Date: Tue, 22 Oct 2019 12:01:49 -0400
Subject: [PATCH 030/143] REPORT-858: Follow-up commit to fix test errors when
 adding the 2.2 profile

---
 api-tests/src/test/resources/log4j.xml        |  12 +-
 .../include/ReportTestDataset-openmrs-2.2.xml | 564 ++++++++++++++++++
 pom.xml                                       |   6 +-
 3 files changed, 573 insertions(+), 9 deletions(-)
 create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml

diff --git a/api-tests/src/test/resources/log4j.xml b/api-tests/src/test/resources/log4j.xml
index cb08faef73..b32c0a5a63 100644
--- a/api-tests/src/test/resources/log4j.xml
+++ b/api-tests/src/test/resources/log4j.xml
@@ -9,13 +9,13 @@
 				value="%p - %C{1}.%M(%L) |%d{ISO8601}| %m%n" />
 		
 	
- 
- 	
-		
+
+	
+		
 		
- 	
- 	
- 	
+	
+
+	
 	
 		
 		
diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml
new file mode 100644
index 0000000000..bb308ce0b9
--- /dev/null
+++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml
@@ -0,0 +1,564 @@
+
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+
+  
+  
+  
+  
+  
+
+  
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 8855b2a3f8..4e7880ea26 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 2.0.6 1.9 1.7.2 - 0.2.12 + 0.2.14 1.2 1.5.0 2.1.1 @@ -53,7 +53,7 @@ 1.8.7 2.3 1.1.2 - 1.2 + 1.7.0-SNAPSHOT UTF-8 ${project.parent.artifactId} Reporting @@ -574,4 +574,4 @@ - \ No newline at end of file + From 0f5ee05d15bf54ad1b8df0057f5668994179628e Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 15:56:56 -0400 Subject: [PATCH 031/143] REPORT-856 - follow-up fix required due to new Serialization Xstream dependency that has broken unit tests around ImplementerConfigured definitions. --- .../BaseImplementerConfiguredLibraryTest.java | 41 ++++++++ ...ConfiguredCohortDefinitionLibraryTest.java | 94 +++++-------------- ...DataSetDefinitionLibraryComponentTest.java | 57 ----------- ...onfiguredDataSetDefinitionLibraryTest.java | 81 ++++++---------- ...redEncounterDataDefinitionLibraryTest.java | 69 ++++---------- ...guredPatientDataDefinitionLibraryTest.java | 71 ++++---------- ...figuredVisitDataDefinitionLibraryTest.java | 68 ++++---------- .../cohort/femalesGroovy.groovy | 16 ++++ .../cohort/femalesSql.sql | 1 + .../cohort/femalesXml.reportingserializerxml | 3 + .../dataset/patientIdSql.sql | 1 + .../patientIdXml.reportingserializerxml | 4 + .../testGroovy.groovy} | 4 +- ...ncounterDatetimeXml.reportingserializerxml | 1 + .../encounterData/patientIdSql.sql | 1 + .../patientData/patientIdSql.sql | 1 + .../patientIdXml.reportingserializerxml | 1 + .../visitData/patientIdSql.sql | 1 + .../visitIdXml.reportingserializerxml | 1 + ...mplementerConfiguredDefinitionLibrary.java | 4 +- 20 files changed, 180 insertions(+), 340 deletions(-) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java delete mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java create mode 100644 api-tests/src/test/resources/implementerconfigured/cohort/femalesGroovy.groovy create mode 100644 api-tests/src/test/resources/implementerconfigured/cohort/femalesSql.sql create mode 100644 api-tests/src/test/resources/implementerconfigured/cohort/femalesXml.reportingserializerxml create mode 100644 api-tests/src/test/resources/implementerconfigured/dataset/patientIdSql.sql create mode 100644 api-tests/src/test/resources/implementerconfigured/dataset/patientIdXml.reportingserializerxml rename api-tests/src/test/resources/implementerconfigured/{dataSet.groovy => dataset/testGroovy.groovy} (95%) create mode 100644 api-tests/src/test/resources/implementerconfigured/encounterData/encounterDatetimeXml.reportingserializerxml create mode 100644 api-tests/src/test/resources/implementerconfigured/encounterData/patientIdSql.sql create mode 100644 api-tests/src/test/resources/implementerconfigured/patientData/patientIdSql.sql create mode 100644 api-tests/src/test/resources/implementerconfigured/patientData/patientIdXml.reportingserializerxml create mode 100644 api-tests/src/test/resources/implementerconfigured/visitData/patientIdSql.sql create mode 100644 api-tests/src/test/resources/implementerconfigured/visitData/visitIdXml.reportingserializerxml diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java new file mode 100644 index 0000000000..f596e2f7b6 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java @@ -0,0 +1,41 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.definition.library.implementerconfigured; + +import org.openmrs.module.reporting.report.util.ReportUtil; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.util.OpenmrsUtil; + +import java.io.File; + +public abstract class BaseImplementerConfiguredLibraryTest extends BaseModuleContextSensitiveTest { + + protected File baseDir; + + protected void copyResource(String type, String name) throws Exception { + String sqlQuery = getContents(type, name); + ReportUtil.writeStringToFile(new File(getConfigDir(type), name), sqlQuery); + } + + protected String getContents(String type, String name) { + return ReportUtil.readStringFromResource("implementerconfigured/" + type + "/" + name).trim(); + } + + protected File getConfigDir(String type) { + if (baseDir != null) { + baseDir = new File(OpenmrsUtil.getApplicationDataDirectory(), BaseImplementerConfiguredDefinitionLibrary.BASE_DIR); + } + File configDir = new File(baseDir, type); + if (!configDir.exists()) { + configDir.mkdirs(); + } + return configDir; + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java index b2b1081683..7505a83aa8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java @@ -9,100 +9,54 @@ */ package org.openmrs.module.reporting.definition.library.implementerconfigured; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.*; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.powermock.api.mockito.PowerMockito.mockStatic; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.File; - import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.openmrs.api.SerializationService; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.EvaluatableCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.SqlCohortDefinition; -import org.openmrs.module.reporting.serializer.ReportingSerializer; -import org.openmrs.util.OpenmrsUtil; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.beans.factory.config.AutowireCapableBeanFactory; - -@RunWith(PowerMockRunner.class) -@PrepareForTest(OpenmrsUtil.class) -public class ImplementerConfiguredCohortDefinitionLibraryTest { +import org.springframework.beans.factory.annotation.Autowired; - public static final String SQL_QUERY = "select person_id from person where gender = 'F'"; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; - private File directory; +public class ImplementerConfiguredCohortDefinitionLibraryTest extends BaseImplementerConfiguredLibraryTest { - private ImplementerConfiguredCohortDefinitionLibrary library; + @Autowired + ImplementerConfiguredCohortDefinitionLibrary library; @Before public void setUp() throws Exception { - directory = mock(File.class); - when(directory.exists()).thenReturn(true); - when(directory.isDirectory()).thenReturn(true); - - library = new ImplementerConfiguredCohortDefinitionLibrary(); - library.setDirectory(directory); + copyResource("cohort", "femalesSql.sql"); + copyResource("cohort", "femalesXml.reportingserializerxml"); + copyResource("cohort", "femalesGroovy.groovy"); + library.setDirectory(getConfigDir("cohort")); + library.loadDefinitions(); } @Test public void testSqlDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("females.sql") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn(SQL_QUERY); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.cohort.females")); - - CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.females"); + CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.femalesSql"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(SqlCohortDefinition.class)); - assertThat(((SqlCohortDefinition) definition).getQuery(), is(SQL_QUERY)); + assertThat(((SqlCohortDefinition) definition).getQuery().trim(), is("select person_id from person where gender = 'F'")); } @Test public void testSerializedDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("females.reportingserializerxml") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn( - "" - + "true" - + ""); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.cohort.females")); - - CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.females"); + CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.femalesXml"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(GenderCohortDefinition.class)); assertThat(((GenderCohortDefinition) definition).getFemaleIncluded(), is(true)); + assertThat(((GenderCohortDefinition) definition).getMaleIncluded(), is(false)); } @Test public void testGroovyDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("females.groovy") }); - library.setAutowireCapableBeanFactory(mock(AutowireCapableBeanFactory.class)); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.cohort.females")); - - CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.females"); - assertThat(definition, instanceOf(GenderCohortDefinition.class)); - assertThat(definition.getClass().getName(), is("FemalesCohortDefinition")); + CohortDefinition definition = library.getDefinition("configuration.definitionlibrary.cohort.femalesGroovy"); + assertThat(definition, notNullValue()); + assertThat(definition, instanceOf(EvaluatableCohortDefinition.class)); } - - @Test(expected = ClassCastException.class) - public void testInvalidGroovyDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("invalidCohortDefinition.groovy") }); - library.setAutowireCapableBeanFactory(mock(AutowireCapableBeanFactory.class)); - library.getDefinitionSummaries(); - } - -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java deleted file mode 100644 index fb9aac7fb5..0000000000 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryComponentTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.definition.library.implementerconfigured; - -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.InputStream; -import java.io.PrintWriter; -import java.net.URL; - -import org.hamcrest.core.Is; -import org.junit.Before; -import org.junit.Test; -import org.openmrs.module.reporting.dataset.DataSet; -import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.EvaluatableDataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionService; -import org.openmrs.module.reporting.evaluation.EvaluationContext; -import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.openmrs.util.OpenmrsUtil; -import org.springframework.beans.factory.annotation.Autowired; - -public class ImplementerConfiguredDataSetDefinitionLibraryComponentTest extends BaseModuleContextSensitiveTest { - - @Autowired - DataSetDefinitionService service; - - @Autowired - ImplementerConfiguredDataSetDefinitionLibrary library; - - @Before - public void setUp() throws Exception { - File dir = new File(getClass().getClassLoader().getResource("implementerconfigured/dataSet.groovy").toURI() - .getPath()).getParentFile(); - library.setDirectory(dir); - } - - @Test - public void testGroovyWithAutowired() throws Exception { - DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.dataSet"); - DataSet dataSet = service.evaluate(definition, new EvaluationContext()); - assertThat(dataSet.getMetaData().getColumnCount(), is(1)); - assertThat(dataSet.iterator().next().getColumnValue("groovy"), Is.is("Xanadu")); - } -} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java index d522dbdcd0..efc621e9a6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredDataSetDefinitionLibraryTest.java @@ -9,79 +9,52 @@ */ package org.openmrs.module.reporting.definition.library.implementerconfigured; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.powermock.api.mockito.PowerMockito.mockStatic; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.File; - import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.openmrs.module.reporting.data.visit.definition.SqlVisitDataDefinition; -import org.openmrs.module.reporting.data.visit.definition.VisitDataDefinition; -import org.openmrs.module.reporting.data.visit.definition.VisitIdDataDefinition; import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.EvaluatableDataSetDefinition; import org.openmrs.module.reporting.dataset.definition.SqlDataSetDefinition; -import org.openmrs.util.OpenmrsUtil; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; +import org.springframework.beans.factory.annotation.Autowired; -@RunWith(PowerMockRunner.class) -@PrepareForTest(OpenmrsUtil.class) -public class ImplementerConfiguredDataSetDefinitionLibraryTest { - - public static final String SQL_QUERY = "select patient_id from patient"; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; - private File directory; +public class ImplementerConfiguredDataSetDefinitionLibraryTest extends BaseImplementerConfiguredLibraryTest { - private ImplementerConfiguredDataSetDefinitionLibrary library; + @Autowired + ImplementerConfiguredDataSetDefinitionLibrary library; @Before public void setUp() throws Exception { - directory = mock(File.class); - when(directory.exists()).thenReturn(true); - when(directory.isDirectory()).thenReturn(true); - - library = new ImplementerConfiguredDataSetDefinitionLibrary(); - library.setDirectory(directory); + copyResource("dataset", "patientIdSql.sql"); + copyResource("dataset", "patientIdXml.reportingserializerxml"); + copyResource("dataset", "testGroovy.groovy"); + library.setDirectory(getConfigDir("dataset")); + library.loadDefinitions(); } @Test public void testSqlDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.sql") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn(SQL_QUERY); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.dataset.patientId")); - - DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.patientId"); + DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.patientIdSql"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(SqlDataSetDefinition.class)); - assertThat(((SqlDataSetDefinition) definition).getSqlQuery(), is(SQL_QUERY)); + assertThat(((SqlDataSetDefinition) definition).getSqlQuery().trim(), is("select patient_id from patient")); } @Test public void testSerializedDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.reportingserializerxml") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))). - thenReturn("" + - "" + - "select patient_id from patient" + - ""); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.dataset.patientId")); - - DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.patientId"); - assertThat(definition, instanceOf(DataSetDefinition.class)); + DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.patientIdXml"); + assertThat(definition, notNullValue()); + assertThat(definition, instanceOf(SqlDataSetDefinition.class)); + assertThat(((SqlDataSetDefinition) definition).getSqlQuery().trim(), is("select patient_id from patient")); } + @Test + public void testGroovyDefinition() throws Exception { + DataSetDefinition definition = library.getDefinition("configuration.definitionlibrary.dataset.testGroovy"); + assertThat(definition, notNullValue()); + assertThat(definition, instanceOf(EvaluatableDataSetDefinition.class)); + } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java index f5cef2f82e..e947620a11 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredEncounterDataDefinitionLibraryTest.java @@ -9,77 +9,44 @@ */ package org.openmrs.module.reporting.definition.library.implementerconfigured; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.*; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.powermock.api.mockito.PowerMockito.mockStatic; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.File; - import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; import org.openmrs.module.reporting.data.encounter.definition.EncounterDatetimeDataDefinition; import org.openmrs.module.reporting.data.encounter.definition.SqlEncounterDataDefinition; -import org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition; -import org.openmrs.module.reporting.data.patient.definition.PatientIdDataDefinition; -import org.openmrs.module.reporting.data.patient.definition.SqlPatientDataDefinition; -import org.openmrs.util.OpenmrsUtil; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; +import org.springframework.beans.factory.annotation.Autowired; -@RunWith(PowerMockRunner.class) -@PrepareForTest(OpenmrsUtil.class) -public class ImplementerConfiguredEncounterDataDefinitionLibraryTest { - - public static final String SQL_QUERY = "select encounter_id, patient_id from encounter"; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; - private File directory; +public class ImplementerConfiguredEncounterDataDefinitionLibraryTest extends BaseImplementerConfiguredLibraryTest { - private ImplementerConfiguredEncounterDataDefinitionLibrary library; + @Autowired + ImplementerConfiguredEncounterDataDefinitionLibrary library; @Before public void setUp() throws Exception { - directory = mock(File.class); - when(directory.exists()).thenReturn(true); - when(directory.isDirectory()).thenReturn(true); - - library = new ImplementerConfiguredEncounterDataDefinitionLibrary(); - library.setDirectory(directory); + copyResource("encounterData", "patientIdSql.sql"); + copyResource("encounterData", "encounterDatetimeXml.reportingserializerxml"); + library.setDirectory(getConfigDir("encounterData")); + library.loadDefinitions(); } @Test public void testSqlDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.sql") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn(SQL_QUERY); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.encounterData.patientId")); - - EncounterDataDefinition definition = library.getDefinition("configuration.definitionlibrary.encounterData.patientId"); + EncounterDataDefinition definition = library.getDefinition("configuration.definitionlibrary.encounterData.patientIdSql"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(SqlEncounterDataDefinition.class)); - assertThat(((SqlEncounterDataDefinition) definition).getSql(), is(SQL_QUERY)); + assertThat(((SqlEncounterDataDefinition) definition).getSql().trim(), is("select encounter_id, patient_id from encounter")); } @Test public void testSerializedDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("encounterDatetime.reportingserializerxml") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))). - thenReturn(""); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.encounterData.encounterDatetime")); - - EncounterDataDefinition definition = library.getDefinition("configuration.definitionlibrary.encounterData.encounterDatetime"); + EncounterDataDefinition definition = library.getDefinition("configuration.definitionlibrary.encounterData.encounterDatetimeXml"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(EncounterDatetimeDataDefinition.class)); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java index 907dd52052..8f7ff52728 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredPatientDataDefinitionLibraryTest.java @@ -9,79 +9,44 @@ */ package org.openmrs.module.reporting.definition.library.implementerconfigured; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.*; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.powermock.api.mockito.PowerMockito.mockStatic; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.File; - import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.openmrs.api.SerializationService; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.SqlCohortDefinition; import org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition; import org.openmrs.module.reporting.data.patient.definition.PatientIdDataDefinition; import org.openmrs.module.reporting.data.patient.definition.SqlPatientDataDefinition; -import org.openmrs.module.reporting.serializer.ReportingSerializer; -import org.openmrs.util.OpenmrsUtil; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; +import org.springframework.beans.factory.annotation.Autowired; -@RunWith(PowerMockRunner.class) -@PrepareForTest(OpenmrsUtil.class) -public class ImplementerConfiguredPatientDataDefinitionLibraryTest { - - public static final String SQL_QUERY = "select patient_id, patient_id from patient"; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; - private File directory; +public class ImplementerConfiguredPatientDataDefinitionLibraryTest extends BaseImplementerConfiguredLibraryTest { - private ImplementerConfiguredPatientDataDefinitionLibrary library; + @Autowired + ImplementerConfiguredPatientDataDefinitionLibrary library; @Before public void setUp() throws Exception { - directory = mock(File.class); - when(directory.exists()).thenReturn(true); - when(directory.isDirectory()).thenReturn(true); - - library = new ImplementerConfiguredPatientDataDefinitionLibrary(); - library.setDirectory(directory); + copyResource("patientData", "patientIdSql.sql"); + copyResource("patientData", "patientIdXml.reportingserializerxml"); + library.setDirectory(getConfigDir("patientData")); + library.loadDefinitions(); } @Test public void testSqlDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.sql") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn(SQL_QUERY); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.patientData.patientId")); - - PatientDataDefinition definition = library.getDefinition("configuration.definitionlibrary.patientData.patientId"); + PatientDataDefinition definition = library.getDefinition("configuration.definitionlibrary.patientData.patientIdSql"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(SqlPatientDataDefinition.class)); - assertThat(((SqlPatientDataDefinition) definition).getSql(), is(SQL_QUERY)); + assertThat(((SqlPatientDataDefinition) definition).getSql().trim(), is("select patient_id, patient_id from patient")); } @Test public void testSerializedDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.reportingserializerxml") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))). - thenReturn(""); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.patientData.patientId")); - - PatientDataDefinition definition = library.getDefinition("configuration.definitionlibrary.patientData.patientId"); + PatientDataDefinition definition = library.getDefinition("configuration.definitionlibrary.patientData.patientIdXml"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(PatientIdDataDefinition.class)); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java index 3501dde203..0d874a81f6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredVisitDataDefinitionLibraryTest.java @@ -9,77 +9,43 @@ */ package org.openmrs.module.reporting.definition.library.implementerconfigured; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.powermock.api.mockito.PowerMockito.mockStatic; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.File; - import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.openmrs.module.reporting.data.encounter.definition.EncounterDataDefinition; -import org.openmrs.module.reporting.data.encounter.definition.EncounterDatetimeDataDefinition; -import org.openmrs.module.reporting.data.encounter.definition.SqlEncounterDataDefinition; import org.openmrs.module.reporting.data.visit.definition.SqlVisitDataDefinition; import org.openmrs.module.reporting.data.visit.definition.VisitDataDefinition; import org.openmrs.module.reporting.data.visit.definition.VisitIdDataDefinition; -import org.openmrs.util.OpenmrsUtil; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; +import org.springframework.beans.factory.annotation.Autowired; -@RunWith(PowerMockRunner.class) -@PrepareForTest(OpenmrsUtil.class) -public class ImplementerConfiguredVisitDataDefinitionLibraryTest { - - public static final String SQL_QUERY = "select visit_id, patient_id from visit"; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; - private File directory; +public class ImplementerConfiguredVisitDataDefinitionLibraryTest extends BaseImplementerConfiguredLibraryTest { - private ImplementerConfiguredVisitDataDefinitionLibrary library; + @Autowired + ImplementerConfiguredVisitDataDefinitionLibrary library; @Before public void setUp() throws Exception { - directory = mock(File.class); - when(directory.exists()).thenReturn(true); - when(directory.isDirectory()).thenReturn(true); - - library = new ImplementerConfiguredVisitDataDefinitionLibrary(); - library.setDirectory(directory); + copyResource("visitData", "patientIdSql.sql"); + copyResource("visitData", "visitIdXml.reportingserializerxml"); + library.setDirectory(getConfigDir("visitData")); + library.loadDefinitions(); } @Test public void testSqlDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("patientId.sql") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))).thenReturn(SQL_QUERY); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.visitData.patientId")); - - VisitDataDefinition definition = library.getDefinition("configuration.definitionlibrary.visitData.patientId"); + VisitDataDefinition definition = library.getDefinition("configuration.definitionlibrary.visitData.patientIdSql"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(SqlVisitDataDefinition.class)); - assertThat(((SqlVisitDataDefinition) definition).getSql(), is(SQL_QUERY)); + assertThat(((SqlVisitDataDefinition) definition).getSql().trim(), is("select visit_id, patient_id from visit")); } @Test public void testSerializedDefinition() throws Exception { - when(directory.listFiles()).thenReturn(new File[] { new File("visitId.reportingserializerxml") }); - - mockStatic(OpenmrsUtil.class); - when(OpenmrsUtil.getFileAsString(any(File.class))). - thenReturn(""); - - assertThat(library.getDefinitionSummaries().size(), is(1)); - assertThat(library.getDefinitionSummaries().get(0).getKey(), is("configuration.definitionlibrary.visitData.visitId")); - - VisitDataDefinition definition = library.getDefinition("configuration.definitionlibrary.visitData.visitId"); + VisitDataDefinition definition = library.getDefinition("configuration.definitionlibrary.visitData.visitIdXml"); + assertThat(definition, notNullValue()); assertThat(definition, instanceOf(VisitIdDataDefinition.class)); } - } diff --git a/api-tests/src/test/resources/implementerconfigured/cohort/femalesGroovy.groovy b/api-tests/src/test/resources/implementerconfigured/cohort/femalesGroovy.groovy new file mode 100644 index 0000000000..9432703162 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/cohort/femalesGroovy.groovy @@ -0,0 +1,16 @@ +package implementerconfigured.cohort + + +import org.openmrs.module.reporting.cohort.EvaluatedCohort +import org.openmrs.module.reporting.cohort.definition.EvaluatableCohortDefinition +import org.openmrs.module.reporting.evaluation.EvaluationContext + +class FemaleCohortDefinition extends EvaluatableCohortDefinition { + + @Override + EvaluatedCohort evaluate(EvaluationContext evalContext) { + def cohort = new EvaluatedCohort(this, evalContext) + return cohort + } + +} diff --git a/api-tests/src/test/resources/implementerconfigured/cohort/femalesSql.sql b/api-tests/src/test/resources/implementerconfigured/cohort/femalesSql.sql new file mode 100644 index 0000000000..1494fb6cf4 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/cohort/femalesSql.sql @@ -0,0 +1 @@ +select person_id from person where gender = 'F' diff --git a/api-tests/src/test/resources/implementerconfigured/cohort/femalesXml.reportingserializerxml b/api-tests/src/test/resources/implementerconfigured/cohort/femalesXml.reportingserializerxml new file mode 100644 index 0000000000..6735d2c8d2 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/cohort/femalesXml.reportingserializerxml @@ -0,0 +1,3 @@ + + true + diff --git a/api-tests/src/test/resources/implementerconfigured/dataset/patientIdSql.sql b/api-tests/src/test/resources/implementerconfigured/dataset/patientIdSql.sql new file mode 100644 index 0000000000..7579391f27 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/dataset/patientIdSql.sql @@ -0,0 +1 @@ +select patient_id from patient diff --git a/api-tests/src/test/resources/implementerconfigured/dataset/patientIdXml.reportingserializerxml b/api-tests/src/test/resources/implementerconfigured/dataset/patientIdXml.reportingserializerxml new file mode 100644 index 0000000000..d5b37756ed --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/dataset/patientIdXml.reportingserializerxml @@ -0,0 +1,4 @@ + + + select patient_id from patient + diff --git a/api-tests/src/test/resources/implementerconfigured/dataSet.groovy b/api-tests/src/test/resources/implementerconfigured/dataset/testGroovy.groovy similarity index 95% rename from api-tests/src/test/resources/implementerconfigured/dataSet.groovy rename to api-tests/src/test/resources/implementerconfigured/dataset/testGroovy.groovy index 7258afa64a..0835bcb498 100644 --- a/api-tests/src/test/resources/implementerconfigured/dataSet.groovy +++ b/api-tests/src/test/resources/implementerconfigured/dataset/testGroovy.groovy @@ -1,4 +1,4 @@ -package implementerconfigured +package implementerconfigured.dataset import org.openmrs.api.LocationService import org.openmrs.module.reporting.dataset.DataSet @@ -22,4 +22,4 @@ class MyDataSetDefinition extends EvaluatableDataSetDefinition { return dataSet } -} \ No newline at end of file +} diff --git a/api-tests/src/test/resources/implementerconfigured/encounterData/encounterDatetimeXml.reportingserializerxml b/api-tests/src/test/resources/implementerconfigured/encounterData/encounterDatetimeXml.reportingserializerxml new file mode 100644 index 0000000000..dac6994853 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/encounterData/encounterDatetimeXml.reportingserializerxml @@ -0,0 +1 @@ + diff --git a/api-tests/src/test/resources/implementerconfigured/encounterData/patientIdSql.sql b/api-tests/src/test/resources/implementerconfigured/encounterData/patientIdSql.sql new file mode 100644 index 0000000000..196dbf1600 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/encounterData/patientIdSql.sql @@ -0,0 +1 @@ +select encounter_id, patient_id from encounter diff --git a/api-tests/src/test/resources/implementerconfigured/patientData/patientIdSql.sql b/api-tests/src/test/resources/implementerconfigured/patientData/patientIdSql.sql new file mode 100644 index 0000000000..f29aced3ca --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/patientData/patientIdSql.sql @@ -0,0 +1 @@ +select patient_id, patient_id from patient diff --git a/api-tests/src/test/resources/implementerconfigured/patientData/patientIdXml.reportingserializerxml b/api-tests/src/test/resources/implementerconfigured/patientData/patientIdXml.reportingserializerxml new file mode 100644 index 0000000000..07e41db293 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/patientData/patientIdXml.reportingserializerxml @@ -0,0 +1 @@ + diff --git a/api-tests/src/test/resources/implementerconfigured/visitData/patientIdSql.sql b/api-tests/src/test/resources/implementerconfigured/visitData/patientIdSql.sql new file mode 100644 index 0000000000..3e3ae01f52 --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/visitData/patientIdSql.sql @@ -0,0 +1 @@ +select visit_id, patient_id from visit diff --git a/api-tests/src/test/resources/implementerconfigured/visitData/visitIdXml.reportingserializerxml b/api-tests/src/test/resources/implementerconfigured/visitData/visitIdXml.reportingserializerxml new file mode 100644 index 0000000000..422845729f --- /dev/null +++ b/api-tests/src/test/resources/implementerconfigured/visitData/visitIdXml.reportingserializerxml @@ -0,0 +1 @@ + diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java index fdfc0e7f33..81c220832c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredDefinitionLibrary.java @@ -105,7 +105,7 @@ private void ensureDefinitions() { } } - private void loadDefinitions() { + public void loadDefinitions() { Map newDefinitions = new HashMap(); List newSummaries = new ArrayList(); @@ -228,4 +228,4 @@ public void setAutowireCapableBeanFactory(AutowireCapableBeanFactory autowireCap this.autowireCapableBeanFactory = autowireCapableBeanFactory; } -} \ No newline at end of file +} From db3caa2531b734aa7bc882961faf24aa7bf12233 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 20:30:06 -0400 Subject: [PATCH 032/143] REPORT-856 - Follow-up commit to resolve remaining 2.2 compatibility issues. --- .../AgeCohortDefinitionEvaluatorTest.java | 13 +++++++++++ ...entifierCohortDefinitionEvaluatorTest.java | 12 +++++----- .../VisitCohortDefinitionEvaluatorTest.java | 20 ++++++++--------- .../MultiParameterDataSetEvaluatorTest.java | 17 +++++++++++++- ...tiPeriodIndicatorDataSetEvaluatorTest.java | 17 +++++++++++++- .../renderer/TextTemplateRendererTest.java | 22 ++++++++++++++++--- 6 files changed, 80 insertions(+), 21 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java index e419e97dc3..99eab544d9 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/AgeCohortDefinitionEvaluatorTest.java @@ -10,9 +10,11 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.openmrs.Cohort; import org.openmrs.Patient; +import org.openmrs.api.PatientService; import org.openmrs.api.context.Context; import org.openmrs.contrib.testdata.TestDataManager; import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; @@ -40,6 +42,17 @@ public class AgeCohortDefinitionEvaluatorTest extends BaseModuleContextSensitive @Autowired TestDataManager tdf; + + @Autowired + PatientService patientService; + + @Before + // This is needed due to a change to standardTestDataset in the OpenMRS 2.2 release that changed person 6 birth year from 2007 to 1975 + public void setup() { + Patient p = patientService.getPatient(6); + p.setBirthdate(DateUtil.getDateTime(2007, 5, 27)); + patientService.savePatient(p); + } @Test public void evaluate_shouldReturnOnlyPatientsBornOnOrBeforeTheEvaluationDate() throws Exception { diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java index 7c902382f6..518044d419 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/PatientIdentifierCohortDefinitionEvaluatorTest.java @@ -54,20 +54,20 @@ public void evaluate_shouldReturnPatientsWhoHaveIdentifiersOfThePassedTypes() th PatientIdentifierCohortDefinition picd = new PatientIdentifierCohortDefinition(); picd.addTypeToMatch(new PatientIdentifierType(2)); EvaluatedCohort c = Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()); - Assert.assertEquals(8, c.getSize()); + Assert.assertEquals(8, c.getMemberIds().size()); } { PatientIdentifierCohortDefinition picd = new PatientIdentifierCohortDefinition(); picd.addTypeToMatch(new PatientIdentifierType(1)); EvaluatedCohort c = Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()); - Assert.assertEquals(3, c.getSize()); + Assert.assertEquals(3, c.getMemberIds().size()); } { PatientIdentifierCohortDefinition picd = new PatientIdentifierCohortDefinition(); picd.addTypeToMatch(new PatientIdentifierType(1)); picd.addTypeToMatch(new PatientIdentifierType(2)); EvaluatedCohort c = Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()); - Assert.assertEquals(10, c.getSize()); + Assert.assertEquals(10, c.getMemberIds().size()); } } @@ -79,9 +79,9 @@ public void evaluate_shouldReturnPatientsWhoHaveIdentifiersOfThePassedTypes() th public void evaluate_shouldReturnPatientsWhoHaveIdentifiersMatchingThePassedLocations() throws Exception { PatientIdentifierCohortDefinition picd = new PatientIdentifierCohortDefinition(); picd.addTypeToMatch(new PatientIdentifierType(2)); - Assert.assertEquals(8, Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()).size()); + Assert.assertEquals(8, Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()).getMemberIds().size()); picd.addLocationToMatch(new Location(3)); - Assert.assertEquals(1, Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()).size()); + Assert.assertEquals(1, Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()).getMemberIds().size()); } /** @@ -131,4 +131,4 @@ public void evaluate_shouldReturnPatientsWhoHaveIdentifiersMatchingThePassedRegu EvaluatedCohort c = Context.getService(CohortDefinitionService.class).evaluate(picd, new EvaluationContext()); Assert.assertEquals(4, c.size()); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java index 296a0d48d3..87d3dc7669 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java @@ -93,7 +93,7 @@ public void testEvaluateInverse() throws Exception { @Test public void shouldIncludeVisit_ifActiveVisitRangeWithinVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -114,7 +114,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeWithinVisit() throws Exception @Test public void shouldIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndDuringVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -135,7 +135,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndDuri @Test public void shouldIncludeVisit_ifActiveVisitRangeStartDuringVisitAndRangeEndAfterVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -156,7 +156,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartDuringVisitAndRangeEndAfte @Test public void shouldIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndAfterVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -177,7 +177,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndAfte @Test public void shouldIncludeVisit_ifActiveVisitRangeEndSameAsVisitStart() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -198,7 +198,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeEndSameAsVisitStart() throws Ex @Test public void shouldIncludeVisit_ifActiveVisitRangeStartSameAsVisitEnd() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -220,7 +220,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartSameAsVisitEnd() throws Ex @Test public void shouldNotIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndBeforeVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -239,7 +239,7 @@ public void shouldNotIncludeVisit_ifActiveVisitRangeStartBeforeVisitAndRangeEndB @Test public void shouldIncludeVisit_ifActiveVisitRangeStartAfterVisitAndRangeEndAfterVisit() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -258,7 +258,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartAfterVisitAndRangeEndAfter @Test public void shouldIncludeVisit_ifActiveVisitRangeStartAfterVisitStartAndVisitCurrentlyActive() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") @@ -277,7 +277,7 @@ public void shouldIncludeVisit_ifActiveVisitRangeStartAfterVisitStartAndVisitCur @Test public void shouldNotIncludeVisit_ifActiveVisitRangeEndBeforeVisitStartAndVisitCurrentlyActive() throws Exception { - Patient patient = data.randomPatient().save(); + Patient patient = data.randomPatient().birthdate("1975-05-27").save(); // early dates to avoid active visits in standard test dataset Visit visit = data.visit() .started("1999-01-01") diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java index 20835efb60..079a7b7d30 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiParameterDataSetEvaluatorTest.java @@ -10,7 +10,11 @@ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; +import org.openmrs.Patient; +import org.openmrs.api.PatientService; +import org.openmrs.module.reporting.common.DateUtil; import org.openmrs.module.reporting.dataset.SimpleDataSet; import org.openmrs.module.reporting.dataset.definition.MultiParameterDataSetDefinition; import org.openmrs.module.reporting.dataset.definition.SqlDataSetDefinition; @@ -34,6 +38,17 @@ public class MultiParameterDataSetEvaluatorTest extends BaseModuleContextSensiti @Autowired DataSetDefinitionService dataSetDefinitionService; + @Autowired + PatientService patientService; + + @Before + // This is needed due to a change to standardTestDataset in the OpenMRS 2.2 release that changed person 6 birth year from 2007 to 1975 + public void setup() { + Patient p = patientService.getPatient(6); + p.setBirthdate(DateUtil.getDateTime(2007, 5, 27)); + patientService.savePatient(p); + } + /** * @see {@link org.openmrs.module.reporting.dataset.definition.evaluator.MultiParameterDataSetEvaluator#evaluate(org.openmrs.module.reporting.dataset.definition.DataSetDefinition, org.openmrs.module.reporting.evaluation.EvaluationContext)} */ @@ -104,4 +119,4 @@ public void evaluate_shouldEvaluateAMultiParameterDataSetDefinition() throws Exc Assert.assertTrue(thirdDateResult.before(secondIterationParameter)); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java index eabc956409..9dec6a2c12 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/MultiPeriodIndicatorDataSetEvaluatorTest.java @@ -19,8 +19,11 @@ import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.openmrs.Location; +import org.openmrs.Patient; +import org.openmrs.api.PatientService; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.ReportingConstants; import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; @@ -39,9 +42,21 @@ import org.openmrs.module.reporting.indicator.dimension.CohortIndicatorAndDimensionResult; import org.openmrs.test.BaseModuleContextSensitiveTest; import org.openmrs.test.Verifies; +import org.springframework.beans.factory.annotation.Autowired; public class MultiPeriodIndicatorDataSetEvaluatorTest extends BaseModuleContextSensitiveTest { + @Autowired + PatientService patientService; + + @Before + // This is needed due to a change to standardTestDataset in the OpenMRS 2.2 release that changed person 6 birth year from 2007 to 1975 + public void setup() { + Patient p = patientService.getPatient(6); + p.setBirthdate(DateUtil.getDateTime(2007, 5, 27)); + patientService.savePatient(p); + } + /** * @see {@link MultiPeriodIndicatorDataSetEvaluator#evaluate(DataSetDefinition,EvaluationContext)} */ @@ -94,4 +109,4 @@ public void evaluate_shouldEvaluateAMultiPeriodIndicatorDataSetDefinition() thro } } } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java index ae4e3f43a0..03996d84fe 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java @@ -9,15 +9,16 @@ */ package org.openmrs.module.reporting.report.renderer; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; - import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; +import org.openmrs.Patient; +import org.openmrs.api.PatientService; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; +import org.openmrs.module.reporting.common.DateUtil; import org.openmrs.module.reporting.dataset.definition.CohortCrossTabDataSetDefinition; import org.openmrs.module.reporting.dataset.definition.SimplePatientDataSetDefinition; import org.openmrs.module.reporting.evaluation.EvaluationContext; @@ -28,11 +29,26 @@ import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; import org.openmrs.test.BaseModuleContextSensitiveTest; import org.openmrs.util.OpenmrsClassLoader; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; /** * Tests the TextTemplateRenderer */ public class TextTemplateRendererTest extends BaseModuleContextSensitiveTest { + + @Autowired + PatientService patientService; + + @Before + // This is needed due to a change to standardTestDataset in the OpenMRS 2.2 release that changed person 6 birth year from 2007 to 1975 + public void setup() { + Patient p = patientService.getPatient(6); + p.setBirthdate(DateUtil.getDateTime(2007, 5, 27)); + patientService.savePatient(p); + } @Test public void shouldRenderVariableReplacementTemplate() throws Exception { From 925e2e2de2a5825937d4d6b007ff191ca891c799 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 20:46:48 -0400 Subject: [PATCH 033/143] REPORT-856 - Follow-up commit to resolve remaining 2.2 compatibility issues. --- .../visit/evaluator/ActiveVisitQueryEvaluatorTest.java | 6 +++--- .../query/visit/evaluator/BasicVisitQueryEvaluatorTest.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java index b42867324e..4c7b12ca68 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java @@ -67,8 +67,8 @@ public void testEvaluate() throws Exception { activeVisits.add(5); // now we will create a couple inactive visits, and two active ones - Patient patient1 = data.randomPatient().save(); - Patient patient2 = data.randomPatient().save(); + Patient patient1 = data.randomPatient().birthdate("1975-05-27").save(); + Patient patient2 = data.randomPatient().birthdate("1975-05-27").save(); data.visit().patient(patient1).visitType(1).location(1).started("2013-04-05").stopped("2013-04-06").save(); data.visit().patient(patient2).visitType(1).location(1).started("2013-04-05").stopped("2013-04-06").save(); Visit active1 = data.visit().patient(patient1).visitType(1).location(1).started(startOfYesterday).stopped(endOfYesterday).save(); @@ -83,4 +83,4 @@ public void testEvaluate() throws Exception { assertThat(result.getMemberIds(), containsInAnyOrder(activeVisits.toArray())); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java index 89cb8a84a6..41aeb43005 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/BasicVisitQueryEvaluatorTest.java @@ -74,8 +74,8 @@ public void testEvaluate() throws Exception { activeVisits.add(5); // now we will create a couple inactive visits, and two active ones - Patient patient1 = data.randomPatient().save(); - Patient patient2 = data.randomPatient().save(); + Patient patient1 = data.randomPatient().birthdate("1975-05-27").save(); + Patient patient2 = data.randomPatient().birthdate("1975-05-27").save(); Visit inactive1 = data.visit().patient(patient1).visitType(1).location(1).started("2013-04-01").stopped("2013-04-06").save(); Visit inactive2 = data.visit().patient(patient2).visitType(1).location(1).started("2013-04-01").stopped("2013-04-15").save(); activeVisits.add(inactive1.getId()); From 3c633bfaf565ac78bf1d70b9d91d9a48ac7fb65c Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 20:49:29 -0400 Subject: [PATCH 034/143] REPORT-856 - Follow-up commit to resolve remaining 2.2 compatibility issues. --- api-tests/females.groovy | 9 --------- api-tests/invalidCohortDefinition.groovy | 5 ----- 2 files changed, 14 deletions(-) delete mode 100644 api-tests/females.groovy delete mode 100644 api-tests/invalidCohortDefinition.groovy diff --git a/api-tests/females.groovy b/api-tests/females.groovy deleted file mode 100644 index 301adda98f..0000000000 --- a/api-tests/females.groovy +++ /dev/null @@ -1,9 +0,0 @@ -import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; - -class FemalesCohortDefinition extends GenderCohortDefinition { - - public FemalesCohortDefinition() { - setFemaleIncluded(true); - } - -} \ No newline at end of file diff --git a/api-tests/invalidCohortDefinition.groovy b/api-tests/invalidCohortDefinition.groovy deleted file mode 100644 index 9cc900580b..0000000000 --- a/api-tests/invalidCohortDefinition.groovy +++ /dev/null @@ -1,5 +0,0 @@ -class ThisDoesNotImplementCohortDefinition { - - String foobar; - -} \ No newline at end of file From a335f392e17c153b9d82c092723faeb9c8d8ff19 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 20:55:57 -0400 Subject: [PATCH 035/143] REPORT-856 - Follow-up commit to resolve remaining 2.2 compatibility issues. --- .../BaseImplementerConfiguredLibraryTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java index f596e2f7b6..9b8b1008e4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/BaseImplementerConfiguredLibraryTest.java @@ -29,7 +29,7 @@ protected String getContents(String type, String name) { } protected File getConfigDir(String type) { - if (baseDir != null) { + if (baseDir == null) { baseDir = new File(OpenmrsUtil.getApplicationDataDirectory(), BaseImplementerConfiguredDefinitionLibrary.BASE_DIR); } File configDir = new File(baseDir, type); From 476b38ae6ee9a6099583cfd43b58a09bfa1f85c1 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 24 Oct 2019 22:15:10 -0400 Subject: [PATCH 036/143] REPORT-856 - Follow-up commit to resolve remaining 2.2 compatibility issues. --- .../ImplementerConfiguredCohortDefinitionLibraryTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java index 7505a83aa8..e44ab8e040 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/definition/library/implementerconfigured/ImplementerConfiguredCohortDefinitionLibraryTest.java @@ -50,7 +50,6 @@ public void testSerializedDefinition() throws Exception { assertThat(definition, notNullValue()); assertThat(definition, instanceOf(GenderCohortDefinition.class)); assertThat(((GenderCohortDefinition) definition).getFemaleIncluded(), is(true)); - assertThat(((GenderCohortDefinition) definition).getMaleIncluded(), is(false)); } @Test From 9a5cfab0a5ed32dc3cf4467955785cf3052fa71f Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 25 Oct 2019 18:27:54 -0400 Subject: [PATCH 037/143] Update to the latest released version of testutils in preparation for release. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e7880ea26..8cc6396415 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ 1.8.7 2.3 1.1.2 - 1.7.0-SNAPSHOT + 1.7.0 UTF-8 ${project.parent.artifactId} Reporting From 79dc58c601d57f2e5ddacfcb68b894900fa3daf8 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Sat, 26 Oct 2019 12:50:54 +0000 Subject: [PATCH 038/143] [maven-release-plugin] prepare release 1.19.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 5 ++--- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index a400991f3f..67fa85e786 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 24d3021564..95ff07a1b4 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index fab467aad3..3095b7c3ec 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index b8a4369089..1b0eb313f1 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api-2.2 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 047ea2566f..24ba3e8c79 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index acc83df9d9..e52dd1f605 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 53bec3e881..0c963f1cba 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 8cc6396415..a77e89ed42 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0-SNAPSHOT + 1.19.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.19.0 From 7948915485aca785f9b9c310f4ca1b38abe9b6e3 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Sat, 26 Oct 2019 12:51:02 +0000 Subject: [PATCH 039/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 67fa85e786..ad680aceed 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 95ff07a1b4..183da8e061 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 3095b7c3ec..1ec4177980 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 1b0eb313f1..497a1551a1 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api-2.2 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 24ba3e8c79..adb5819f06 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index e52dd1f605..1bec8fc5c9 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 0c963f1cba..94a88f7acd 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index a77e89ed42..625d17dadc 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.19.0 + 1.20.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.19.0 + HEAD From 2057019edfc5e31c67ff8c2c85a6a986ebd3ec13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Fri, 29 Nov 2019 05:48:49 -0300 Subject: [PATCH 040/143] Minor formatting proposals (#190) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6458b1858b..41ec877938 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ OpenMRS 1.5.2 or higher ### Recommended modules: 1. Reporting Compatibility 1.5.0.3 -View, download or fork source code: on GitHub +View, download or fork source code on GitHub Installation @@ -41,9 +41,9 @@ Upgrade To upgrade from Reporting Module 0.3.x: 1. Check to make sure that you have all of the Required Modules installed on your system. 2. Log into OpenMRS - 3. Navigate to Admin > Manage Modules. + 3. Navigate to `Admin` > `Manage Modules`. 4. Click the trash icon next to Reporting 0.3.x to remove the module from your system. - 5. Navigate to the newer omod on your system using the browse button and click Upload. + 5. Navigate to the newer omod on your system using the browse button and click `Upload`. Privileges From de48eacab725b289c56d9d8f425c1617a1ccf633 Mon Sep 17 00:00:00 2001 From: solemabrothers Date: Wed, 11 Dec 2019 09:41:59 +0300 Subject: [PATCH 041/143] REPORT-859: Add a JSON Renderer to TextTemplate feature (#192) --- .../renderer/TextTemplateRendererTest.java | 8 ++--- .../report/manager/ReportManagerUtil.java | 30 +++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java index 03996d84fe..02e4d21d9a 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/renderer/TextTemplateRendererTest.java @@ -49,7 +49,7 @@ public void setup() { p.setBirthdate(DateUtil.getDateTime(2007, 5, 27)); patientService.savePatient(p); } - + @Test public void shouldRenderVariableReplacementTemplate() throws Exception { shouldRenderTemplate("VariableReplacementTemplate.txt", null); @@ -75,15 +75,15 @@ private void shouldRenderTemplate(String templateName, String templateType) thro allPatients.addPatientProperty("gender"); allPatients.addPatientProperty("birthdate"); reportDefinition.addDataSetDefinition("allPatients", allPatients, null); - + GenderCohortDefinition males = new GenderCohortDefinition(); males.setName("Males"); males.setMaleIncluded(true); - + GenderCohortDefinition females = new GenderCohortDefinition(); females.setName("Females"); females.setFemaleIncluded(true); - + CohortCrossTabDataSetDefinition genderDsd = new CohortCrossTabDataSetDefinition(); genderDsd.addColumn("males", males, null); genderDsd.addColumn("females", females, null); diff --git a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java index 30ff117075..37b7d429f5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/manager/ReportManagerUtil.java @@ -22,6 +22,7 @@ import org.openmrs.module.reporting.report.definition.ReportDefinition; import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; import org.openmrs.module.reporting.report.renderer.CsvReportRenderer; +import org.openmrs.module.reporting.report.renderer.TextTemplateRenderer; import org.openmrs.module.reporting.report.renderer.XlsReportRenderer; import org.openmrs.module.reporting.report.service.ReportService; import org.openmrs.module.reporting.report.util.ReportUtil; @@ -159,6 +160,23 @@ public static ReportDesign createExcelTemplateDesign(String reportDesignUuid, Re return design; } + /** + * @return a new ReportDesign for a JSON template, using a file on the classpath as the template + */ + public static ReportDesign createJSONTemplateDesign(String reportDesignUuid, ReportDefinition reportDefinition, String resourcePath) { + ReportDesign design = createJSONReportDesign(reportDesignUuid,reportDefinition); + design.setReportDefinition(reportDefinition); + design.setRendererType(TextTemplateRenderer.class); + ReportDesignResource resource = new ReportDesignResource(); + resource.setName("template"); + resource.setExtension("json"); + resource.setContentType("application/json"); + resource.setContents(ReportUtil.readByteArrayFromResource(resourcePath)); + resource.setReportDesign(design); + design.addResource(resource); + return design; + } + /** * @return a new ReportDesign for a standard Excel output */ @@ -183,4 +201,16 @@ public static ReportDesign createCsvReportDesign(String reportDesignUuid, Report design.setRendererType(CsvReportRenderer.class); return design; } + + /** + * @return a new ReportDesign for a standard CSV output + */ + public static ReportDesign createJSONReportDesign(String reportDesignUuid, ReportDefinition reportDefinition) { + ReportDesign design = new ReportDesign(); + design.setUuid(reportDesignUuid); + design.setName("JSON"); + design.setReportDefinition(reportDefinition); + design.setRendererType(TextTemplateRenderer.class); + return design; + } } From 9859bb88b2a18762f535a2bad40ccce9b2b8ed35 Mon Sep 17 00:00:00 2001 From: Jonathan Leitschuh Date: Tue, 11 Feb 2020 16:22:10 -0500 Subject: [PATCH 042/143] Use HTTPS instead of HTTP to resolve dependencies (#194) This fixes a security vulnerability in this project where the `pom.xml` files were configuring Maven to resolve dependencies over HTTP instead of HTTPS. Signed-off-by: Jonathan Leitschuh --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 625d17dadc..f1244ac567 100644 --- a/pom.xml +++ b/pom.xml @@ -21,12 +21,12 @@ openmrs-repo-modules OpenMRS Modules - http://mavenrepo.openmrs.org/nexus/content/repositories/modules + https://mavenrepo.openmrs.org/nexus/content/repositories/modules openmrs-repo-snapshots OpenMRS Snapshots - http://mavenrepo.openmrs.org/nexus/content/repositories/snapshots + https://mavenrepo.openmrs.org/nexus/content/repositories/snapshots @@ -559,7 +559,7 @@ openmrs-repo OpenMRS Nexus Repository - http://mavenrepo.openmrs.org/nexus/content/repositories/public + https://mavenrepo.openmrs.org/nexus/content/repositories/public @@ -567,7 +567,7 @@ openmrs-repo OpenMRS Nexus Repository - http://mavenrepo.openmrs.org/nexus/content/repositories/public + https://mavenrepo.openmrs.org/nexus/content/repositories/public false From 92ecb7096f8815e09818f58068ebfab845f8150a Mon Sep 17 00:00:00 2001 From: solemabrothers Date: Mon, 16 Mar 2020 17:51:48 +0300 Subject: [PATCH 043/143] REPORT-861:Make Reports Return an IndicatorResult Datatype (#195) * https://issues.openmrs.org/browse/REPORT-861:Reports Return a Double Value for Indicator Results --- .../renderer/ReportTemplateRenderer.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java index 11aa975c1e..121c393a95 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/renderer/ReportTemplateRenderer.java @@ -222,17 +222,19 @@ public Map getReplacementData(ReportData reportData, ReportDesig * @return the value for the report template replacement given the initial value */ public Object getReplacementValue(Object initialValue) { + Object replacementValue = ""; - if (initialValue != null) { - if (initialValue instanceof Cohort) { - replacementValue = new Integer(((Cohort) initialValue).size()); - } - else if (initialValue instanceof IndicatorResult) { - replacementValue = new Double(((IndicatorResult) initialValue).getValue().doubleValue()); - } - else { - replacementValue = initialValue; - } + if (initialValue != null) { + if (initialValue instanceof Cohort) { + replacementValue = new Integer(((Cohort) initialValue).size()); + } + else if (initialValue instanceof IndicatorResult) { + IndicatorResult ir = (IndicatorResult) initialValue; + replacementValue = ir.getValue(); + } + else { + replacementValue = initialValue; + } } return replacementValue; } From aa6a91cab5f3d4f26f62934fdb385db904df141d Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 16 Mar 2020 15:38:03 +0000 Subject: [PATCH 044/143] [maven-release-plugin] prepare release 1.20.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index ad680aceed..775a7d14af 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 183da8e061..7edc5ed757 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 1ec4177980..0bbb4f08aa 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 497a1551a1..2ecfc9a140 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api-2.2 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index adb5819f06..05afd67ba5 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 1bec8fc5c9..d455ce76e7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 94a88f7acd..4b8b98c76f 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index f1244ac567..4f3ae3f45a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0-SNAPSHOT + 1.20.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.20.0 From ffeb6c1f8a4c460056b582c8a766718516a2430e Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 16 Mar 2020 15:38:09 +0000 Subject: [PATCH 045/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 775a7d14af..ee86227b3f 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 7edc5ed757..19441f3bff 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 0bbb4f08aa..2b417bd875 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 2ecfc9a140..1432b38844 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api-2.2 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 05afd67ba5..1d3854c6f4 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index d455ce76e7..ebb92cb32e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 4b8b98c76f..672904c76c 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 4f3ae3f45a..f9b19cf398 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.20.0 + 1.21.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.20.0 + HEAD From bb432a725feb00e047641eeb9c7ea1d9b637043a Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Sun, 12 Apr 2020 00:19:35 +0300 Subject: [PATCH 046/143] Add support for OpenMRS Platform 2.4 - REPORT-863 --- api-2.4/.gitignore | 1 + api-2.4/pom.xml | 80 +++++++ .../service/db/MappedDefinitionType.java | 209 ++++++++++++++++++ .../report/service/db/PropertiesType.java | 144 ++++++++++++ .../report/service/db/RenderingModeType.java | 167 ++++++++++++++ .../service/db/ReportDefinitionType.java | 120 ++++++++++ omod/pom.xml | 10 + omod/src/main/resources/config.xml | 8 +- .../resources/webModuleApplicationContext.xml | 1 - .../webapp/cohorts/cohortDefinitionEditor.jsp | 2 +- .../definition/editAnnotatedDefinition.jsp | 2 +- pom.xml | 1 + 12 files changed, 740 insertions(+), 5 deletions(-) create mode 100644 api-2.4/.gitignore create mode 100644 api-2.4/pom.xml create mode 100644 api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java create mode 100644 api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java create mode 100644 api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java create mode 100644 api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java diff --git a/api-2.4/.gitignore b/api-2.4/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/api-2.4/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml new file mode 100644 index 0000000000..86d9b03c87 --- /dev/null +++ b/api-2.4/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.21.0-SNAPSHOT + + + reporting-api-2.4 + jar + reporting Module api 2.4 + 2.4 api project for reporting + + + 2.4.0-SNAPSHOT + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java new file mode 100644 index 0000000000..b6d3744c8c --- /dev/null +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -0,0 +1,209 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } +} \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java new file mode 100644 index 0000000000..a39f3f5c2b --- /dev/null +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -0,0 +1,144 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import static java.sql.Types.VARCHAR; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java new file mode 100644 index 0000000000..008ab123f9 --- /dev/null +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -0,0 +1,167 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } +} \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java new file mode 100644 index 0000000000..5f2a1be77f --- /dev/null +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -0,0 +1,120 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/omod/pom.xml b/omod/pom.xml index 672904c76c..31cc8b6263 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -26,6 +26,16 @@ ${project.parent.artifactId}-api-2.0 ${project.parent.version} + + ${project.parent.groupId} + ${project.parent.artifactId}-api-2.2 + ${project.parent.version} + + + ${project.parent.groupId} + ${project.parent.artifactId}-api-2.4 + ${project.parent.version} + org.openmrs.module legacyui-omod diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index be18045ceb..e517961a21 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -179,11 +179,15 @@ /lib/reporting-api-2.0.* - 2.* + 2.0.0 - 2.3.* /lib/reporting-api-2.2.* - 2.2.* + 2.2.0 + + + /lib/reporting-api-2.4.* + 2.4.0 diff --git a/omod/src/main/resources/webModuleApplicationContext.xml b/omod/src/main/resources/webModuleApplicationContext.xml index acea8c95b8..26c9f4cb77 100644 --- a/omod/src/main/resources/webModuleApplicationContext.xml +++ b/omod/src/main/resources/webModuleApplicationContext.xml @@ -12,7 +12,6 @@ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - diff --git a/omod/src/main/webapp/cohorts/cohortDefinitionEditor.jsp b/omod/src/main/webapp/cohorts/cohortDefinitionEditor.jsp index 202eb61abf..7f6fa3e8e7 100644 --- a/omod/src/main/webapp/cohorts/cohortDefinitionEditor.jsp +++ b/omod/src/main/webapp/cohorts/cohortDefinitionEditor.jsp @@ -92,7 +92,7 @@ - + diff --git a/omod/src/main/webapp/definition/editAnnotatedDefinition.jsp b/omod/src/main/webapp/definition/editAnnotatedDefinition.jsp index 3af756d877..7f3e96cfe2 100644 --- a/omod/src/main/webapp/definition/editAnnotatedDefinition.jsp +++ b/omod/src/main/webapp/definition/editAnnotatedDefinition.jsp @@ -90,7 +90,7 @@ - + diff --git a/pom.xml b/pom.xml index f9b19cf398..98e74a8eac 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ api-1.10 api-2.0 api-2.2 + api-2.4 api-tests omod From a19d427a23b4549f5797d338fb5999705238aa24 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Sun, 14 Jun 2020 00:43:45 -0400 Subject: [PATCH 047/143] REPORT-864 - Make EvaluationContext contextValues available to SqlFileDataSetDefinition --- .../dataset/definition/evaluator/SqlFileDataSetEvaluator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java index 32f1133001..5b8bebef99 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java @@ -172,7 +172,8 @@ protected Connection createConnection(Properties connectionProperties) throws Ev * @return parameter values to use within SQL statement, converting object references to metadata to scalar properties, defaulting to keys */ protected Map constructParameterValues(SqlFileDataSetDefinition dsd, EvaluationContext context) { - Map ret = context.getParameterValues(); + Map ret = context.getContextValues(); + ret.putAll(context.getParameterValues()); for (String key : ret.keySet()) { Object o = ret.get(key); if (o instanceof OpenmrsMetadata) { From 13352367050341bae9c1792221d1e43563041454 Mon Sep 17 00:00:00 2001 From: Am-Coder <39997970+Am-Coder@users.noreply.github.com> Date: Wed, 22 Jul 2020 22:58:59 +0530 Subject: [PATCH 048/143] REPORT-866 Properly map the sequences via hibernate (#200) --- api/src/main/resources/ReportDesign.hbm.xml | 18 +++++++++++++++--- api/src/main/resources/ReportRequest.hbm.xml | 6 +++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/api/src/main/resources/ReportDesign.hbm.xml b/api/src/main/resources/ReportDesign.hbm.xml index b9a28bbe99..7e5fc38483 100644 --- a/api/src/main/resources/ReportDesign.hbm.xml +++ b/api/src/main/resources/ReportDesign.hbm.xml @@ -4,7 +4,11 @@ - + + + reporting_report_design_id_seq + + @@ -30,7 +34,11 @@ - + + + reporting_report_design_resource_id_seq + + @@ -49,7 +57,11 @@ - + + + reporting_report_processor_id_seq + + diff --git a/api/src/main/resources/ReportRequest.hbm.xml b/api/src/main/resources/ReportRequest.hbm.xml index 468af9cec7..7a78c49134 100644 --- a/api/src/main/resources/ReportRequest.hbm.xml +++ b/api/src/main/resources/ReportRequest.hbm.xml @@ -5,7 +5,11 @@ - + + + reporting_report_request_id_seq + + From 76e705fc58a3f7784bc25784bc6c9e0f82ae4db0 Mon Sep 17 00:00:00 2001 From: Am-Coder <39997970+Am-Coder@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:55:06 +0530 Subject: [PATCH 049/143] REPORT-867 Liquibase error on starting Reporting Module (#201) --- api/src/main/resources/liquibase.xml | 31 +++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index bc83844e71..cece59d7cc 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -56,7 +56,7 @@ - + @@ -72,12 +72,35 @@ - + + + + + + + + + + + UPDATE reporting_report_design rd + SET report_definition_uuid = so.uuid + FROM serialized_object so + WHERE rd.report_definition_id = so.serialized_object_id; + + + + alter table reporting_report_design modify report_definition_uuid char(38) not null; + + + alter table reporting_report_design alter column report_definition_uuid type char(38); + + + 3:bddba97d81d6daa7fd6fbb478897fd84 3:e557ea83775089ed9e636768b25de9a0 @@ -356,6 +379,8 @@ + 8:29d9c10336ca467e93b34db77a250d12 + 8:631a987732036d592c48c118f8de368d Remove OpenMRS scheduled tasks produced by the reporting module @@ -364,7 +389,7 @@ where task_config_id in (select task_config_id from scheduler_task_config where schedulable_class like 'org.openmrs.module.reporting.%'); - delete from `scheduler_task_config` where schedulable_class like 'org.openmrs.module.reporting.%'; + delete from scheduler_task_config where schedulable_class like 'org.openmrs.module.reporting.%'; From 5e0b93f3efe1b07ea06976c4f69b96faf8b3b16e Mon Sep 17 00:00:00 2001 From: Mark Goodrich Date: Tue, 28 Jul 2020 09:47:16 -0400 Subject: [PATCH 050/143] REPORT-865: Support creating Report Configuration via configuration (#199) --- .../config/ReportLoaderIntegrationTest.java | 118 +++++++ .../reporting/config/ReportLoaderTest.java | 162 +++++++++ .../test/resources/config/sampleReport.yml | 34 ++ .../sampleEncountersReport.yml | 17 + .../reportdescriptors/sampleOrdersReport.yml | 23 ++ .../reportdescriptors/sql/encounters.sql | 1 + .../reports/reportdescriptors/sql/orders.sql | 1 + .../subdirectory/sampleNestedReport.yml | 18 + .../subdirectory/sql/nested.sql | 1 + .../templates/SampleReportTemplate.xls | 0 .../reporting/ReportingModuleActivator.java | 3 + .../reporting/config/DataSetDescriptor.java | 41 +++ .../reporting/config/DesignDescriptor.java | 41 +++ .../reporting/config/ParameterDescriptor.java | 39 +++ .../reporting/config/ReportDescriptor.java | 109 ++++++ .../module/reporting/config/ReportLoader.java | 313 ++++++++++++++++++ api/src/main/resources/ReportDesign.hbm.xml | 20 +- api/src/main/resources/messages.properties | 3 +- pom.xml | 24 +- 19 files changed, 951 insertions(+), 17 deletions(-) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java create mode 100644 api-tests/src/test/resources/config/sampleReport.yml create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleEncountersReport.yml create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleOrdersReport.yml create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/encounters.sql create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/orders.sql create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sampleNestedReport.yml create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sql/nested.sql create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/templates/SampleReportTemplate.xls create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/ReportDescriptor.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java new file mode 100644 index 0000000000..2ee680680c --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java @@ -0,0 +1,118 @@ +package org.openmrs.module.reporting.config; + +import org.junit.Before; +import org.junit.Test; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.report.ReportDesign; +import org.openmrs.module.reporting.report.ReportDesignResource; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; +import org.openmrs.module.reporting.report.service.ReportService; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.util.OpenmrsConstants; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.endsWith; +import static org.hamcrest.CoreMatchers.hasItems; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.openmrs.module.reporting.config.ReportLoader.getReportingDescriptorsConfigurationDir; + +public class ReportLoaderIntegrationTest extends BaseModuleContextSensitiveTest { + + public static final String appDataTestDir = "testAppDataDir"; + + private String path; + + @Before + public void setup() { + // configure app data dir path + path = getClass().getClassLoader().getResource(appDataTestDir).getPath() + File.separator; + System.setProperty("OPENMRS_APPLICATION_DATA_DIRECTORY", path); + Properties prop = new Properties(); + prop.setProperty(OpenmrsConstants.APPLICATION_DATA_DIRECTORY_RUNTIME_PROPERTY, path); + Context.setRuntimeProperties(prop); + } + + @Test + public void shouldLoadAllReportDescriptorsInReportDescriptorsDirectory() { + List reportDescriptors = ReportLoader.loadReportDescriptors(); + assertThat(reportDescriptors.size(), is(3)); + + List names = new ArrayList(); + for (ReportDescriptor reportDescriptor : reportDescriptors) { + names.add(reportDescriptor.getName()); + } + + assertThat(names, hasItems("sample.export.encounters.name","sample.export.orders.name", "sample.export.nested.name")); + } + + @Test + public void shouldConstructSqlFileDataSetDefinition() { + DataSetDescriptor sqlDataSetDescriptor = new DataSetDescriptor(); + + sqlDataSetDescriptor.setKey("encounters"); + sqlDataSetDescriptor.setType("sql"); + sqlDataSetDescriptor.setConfig("sql/encounters.sql"); + + SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) ReportLoader.constructDataSetDefinition(sqlDataSetDescriptor, new File(getReportingDescriptorsConfigurationDir()),null); + + assertThat(dsd.getSqlFile(), containsString("sql/encounters.sql")); + } + + @Test + public void shouldLoadReportsFromConfigAndSave() { + ReportLoader.loadReportsFromConfig(); + + ReportDefinition ordersReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("9e7dc296-2aad-11e3-a840-5b9e0b589afb"); + ReportDefinition encountersReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("752e386d-da67-4e3d-bddc-95157c58c54c"); + ReportDefinition nestedReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("c2fb2082-9b36-4398-96af-d20570bacd07"); + + assertThat(ordersReportDefinition, notNullValue()); + assertThat(encountersReportDefinition, notNullValue()); + assertThat(nestedReportDefinition, notNullValue()); + + assertThat(ordersReportDefinition.getName(), is("sample.export.orders.name")); + assertThat(encountersReportDefinition.getName(), is("sample.export.encounters.name")); + assertThat(nestedReportDefinition.getName(), is("sample.export.nested.name")); + + List existingOrderReportDesigns = Context.getService(ReportService.class).getReportDesigns(ordersReportDefinition, null, true); + assertThat(existingOrderReportDesigns.size(), is(2)); + + } + + @Test + public void shouldConstructExcelReportDesign() { + ReportDefinition reportDefinition = new ReportDefinition(); + reportDefinition.setName("My Test Report"); + + DesignDescriptor designDescriptor = new DesignDescriptor(); + designDescriptor.setType("excel"); + designDescriptor.setTemplate("templates/SampleReportTemplate.xls"); + + ReportDescriptor reportDescriptor = new ReportDescriptor(); + reportDescriptor.setPath(new File(getReportingDescriptorsConfigurationDir())); + reportDescriptor.setDesigns(new ArrayList()); + reportDescriptor.getDesigns().add(designDescriptor); + + List reportDesigns = ReportLoader.constructReportDesigns(reportDefinition, reportDescriptor); + assertThat(reportDesigns.size(), is(1)); + assertThat(reportDesigns.get(0).getName(), is("reporting.excel")); + assertThat(reportDesigns.get(0).getRendererType().getName(), endsWith("XlsReportRenderer")); + assertThat(reportDesigns.get(0).getReportDefinition(), is(reportDefinition)); + + assertThat(reportDesigns.get(0).getResources().size(), is(1)); + ReportDesignResource reportDesignResource = reportDesigns.get(0).getResources().iterator().next(); + assertThat(reportDesignResource.getName(), is("template")); + assertThat(reportDesignResource.getExtension(), is("xls")); + assertThat(reportDesignResource.getContentType(), is("application/vnd.ms-excel")); + assertThat(reportDesignResource.getContents(), is(notNullValue())); + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java new file mode 100644 index 0000000000..2431103c8e --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java @@ -0,0 +1,162 @@ +package org.openmrs.module.reporting.config; + +import org.junit.Test; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.module.reporting.report.ReportDesign; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.renderer.ReportDesignRenderer; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.hamcrest.CoreMatchers.endsWith; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.startsWith; +import static org.hamcrest.MatcherAssert.assertThat; + +public class ReportLoaderTest { + + @Test + public void load_shouldLoadYAMLFile() { + + ClassLoader classLoader = getClass().getClassLoader(); + File sampleReport = new File(classLoader.getResource("config/sampleReport.yml").getFile()); + + ReportDescriptor descriptor = ReportLoader.load(sampleReport); + + assertThat(descriptor.getKey(), is("sampledataexport")); + assertThat(descriptor.getUuid(), is("9e7dc296-2aad-11e3-a840-5b9e0b589afb")); + assertThat(descriptor.getName(), is("sample.export.name")); + assertThat(descriptor.getDescription(), is("sample.export.description")); + assertThat(descriptor.getParameters().size(), is(2)); + assertThat(descriptor.getParameters().get(0).getKey(), is("startDate")); + assertThat(descriptor.getParameters().get(0).getType(), is("date")); + assertThat(descriptor.getParameters().get(0).getLabel(), is("startDate.label")); + assertThat(descriptor.getDatasets().size(), is(2)); + assertThat(descriptor.getDatasets().get(0).getKey(), is("orders")); + assertThat(descriptor.getDatasets().get(0).getType(), is("sql")); + assertThat(descriptor.getDatasets().get(0).getConfig(), is("orders.sql")); + assertThat(descriptor.getDesigns().get(0).getType(), is("csv")); + assertThat(descriptor.getDesigns().get(0).getProperties().get("characterEncoding"), is("ISO-8859-1")); + assertThat(descriptor.getDesigns().get(0).getProperties().get("blacklistRegex"), is("[^\\p{InBasicLatin}\\p{L}]")); + assertThat(descriptor.getDesigns().get(1).getType(), is("excel")); + assertThat(descriptor.getDesigns().get(1).getTemplate(), is("ExcelTemplate.xls")); + + assertThat(((List)descriptor.getConfig().get("categories")).size(), is(2)); + assertThat(((List)descriptor.getConfig().get("categories")).get(0), is("DATA_EXPORT")); + assertThat(((List)descriptor.getConfig().get("categories")).get(1), is("DAILY")); + + assertThat(((List)descriptor.getConfig().get("components")).size(), is(1)); + assertThat(((List)descriptor.getConfig().get("components")).get(0), is("encounters")); + + } + + @Test + public void shouldConstructParameters() { + + List parameterDescriptors = new ArrayList(); + + ParameterDescriptor startDate = new ParameterDescriptor(); + startDate.setKey("startDate"); + startDate.setLabel("startDate.label"); + startDate.setType("date"); + + ParameterDescriptor endDate = new ParameterDescriptor(); + endDate.setKey("endDate"); + endDate.setLabel("endDate.label"); + endDate.setType("java.util.Date"); + + ParameterDescriptor location = new ParameterDescriptor(); + location.setKey("location"); + location.setLabel("location.label"); + location.setType("Location"); + + parameterDescriptors.add(startDate); + parameterDescriptors.add(endDate); + parameterDescriptors.add(location); + + List parameters = ReportLoader.constructParameters(parameterDescriptors); + + assertThat(parameters.size(), is(3)); + assertThat(parameters.get(0).getLabel(), is("startDate.label")); + assertThat(parameters.get(0).getName(), is("startDate")); + assertThat(parameters.get(0).getType().getName(), is("java.util.Date")); + + assertThat(parameters.get(1).getLabel(), is("endDate.label")); + assertThat(parameters.get(1).getName(), is("endDate")); + assertThat(parameters.get(1).getType().getName(), is("java.util.Date")); + + assertThat(parameters.get(2).getLabel(), is("location.label")); + assertThat(parameters.get(2).getName(), is("location")); + assertThat(parameters.get(2).getType().getName(), is("org.openmrs.Location")); + + } + + @Test + public void shouldConstructMappings() { + List parameterDescriptors = new ArrayList(); + + ParameterDescriptor date = new ParameterDescriptor(); + date.setKey("startDate"); + date.setLabel("startDate.label"); + date.setType("java.util.Date"); + + ParameterDescriptor location = new ParameterDescriptor(); + location.setKey("location"); + location.setLabel("location.label"); + location.setType("org.openmrs.Location"); + + parameterDescriptors.add(date); + parameterDescriptors.add(location); + + List parameters = ReportLoader.constructParameters(parameterDescriptors); + + Map mappings = ReportLoader.constructMappings(parameters); + assertThat((String) mappings.get("startDate"), is("${startDate}")); + assertThat((String) mappings.get("location"), is("${location}")); + } + + @Test + public void shouldConstructCSVReportDesign() { + ReportDefinition reportDefinition = new ReportDefinition(); + reportDefinition.setName("My Test Report"); + + DesignDescriptor designDescriptor = new DesignDescriptor(); + designDescriptor.setType("csv"); + designDescriptor.setProperties(new HashMap()); + designDescriptor.getProperties().put("characterEncoding", "ISO-8859-1"); + designDescriptor.getProperties().put("blacklistRegex", "[^\\p{InBasicLatin}\\p{L}]"); + + ReportDescriptor reportDescriptor = new ReportDescriptor(); + reportDescriptor.setDesigns(new ArrayList()); + reportDescriptor.getDesigns().add(designDescriptor); + + List reportDesigns = ReportLoader.constructReportDesigns(reportDefinition, reportDescriptor); + assertThat(reportDesigns.size(), is(1)); + assertThat(reportDesigns.get(0).getName(), is("reporting.csv")); + assertThat(reportDesigns.get(0).getReportDefinition(), is(reportDefinition)); + assertThat(reportDesigns.get(0).getPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, null), startsWith("my.test.report.")); + assertThat(reportDesigns.get(0).getPropertyValue("characterEncoding", null), is("ISO-8859-1")); + assertThat(reportDesigns.get(0).getPropertyValue("blacklistRegex", null), is("[^\\p{InBasicLatin}\\p{L}]")); + + } + + @Test + public void shouldConstructCSVReportDesignIfNoDesignSpecified() { + ReportDefinition reportDefinition = new ReportDefinition(); + reportDefinition.setName("My Test Report"); + + ReportDescriptor reportDescriptor = new ReportDescriptor(); + + List reportDesigns = ReportLoader.constructReportDesigns(reportDefinition, reportDescriptor); + assertThat(reportDesigns.size(), is(1)); + assertThat(reportDesigns.get(0).getName(), is("reporting.csv")); + assertThat(reportDesigns.get(0).getRendererType().getName(), endsWith("CsvReportRenderer")); + assertThat(reportDesigns.get(0).getReportDefinition(), is(reportDefinition)); + assertThat(reportDesigns.get(0).getPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, null), startsWith("my.test.report.")); + } + +} diff --git a/api-tests/src/test/resources/config/sampleReport.yml b/api-tests/src/test/resources/config/sampleReport.yml new file mode 100644 index 0000000000..cd4bd18edf --- /dev/null +++ b/api-tests/src/test/resources/config/sampleReport.yml @@ -0,0 +1,34 @@ +key: "sampledataexport" +uuid: "9e7dc296-2aad-11e3-a840-5b9e0b589afb" +name: "sample.export.name" +description: "sample.export.description" +parameters: # should be able to parse comments! + - key: "startDate" + type: "date" + label: "startDate.label" + - key: "endDate" + type: "date" + label: "endDate.label" +datasets: + - key: "orders" + type: "sql" + config: "orders.sql" + - key: "encounters" + type: "sql" + config: "encounters.sql" +designs: + - type: "csv" + properties: + "characterEncoding": "ISO-8859-1" + "blacklistRegex": "[^\\p{InBasicLatin}\\p{L}]" + - type: "excel" + template: "ExcelTemplate.xls" +config: + includeTestPatients: "true" + categories: + - "DATA_EXPORT" + - "DAILY" + components: + - "encounters" + + diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleEncountersReport.yml b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleEncountersReport.yml new file mode 100644 index 0000000000..2a25a1a554 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleEncountersReport.yml @@ -0,0 +1,17 @@ +key: "sampleencounters.export" +uuid: "752e386d-da67-4e3d-bddc-95157c58c54c" +name: "sample.export.encounters.name" +description: "sample.export.encounters.description" +parameters: + - key: "startDate" + type: "java.util.Date" + label: "startDate.label" + - key: "endDate" + type: "java.util.Date" + label: "endDate.label" +datasets: + - key: "encounters" + type: "sql" + config: "sql/encounters.sql" + + diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleOrdersReport.yml b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleOrdersReport.yml new file mode 100644 index 0000000000..593b607cfd --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sampleOrdersReport.yml @@ -0,0 +1,23 @@ +key: "sampleordersexport" +uuid: "9e7dc296-2aad-11e3-a840-5b9e0b589afb" +name: "sample.export.orders.name" +description: "sample.export.order.description" +parameters: + - key: "startDate" + type: "java.util.Date" + label: "startDate.label" + - key: "endDate" + type: "java.util.Date" + label: "endDate.label" +datasets: + - key: "orders" + type: "sql" + config: "sql/orders.sql" +designs: + - type: "csv" + properties: + "characterEncoding": "ISO-8859-1" + "blacklistRegex": "[^\\p{InBasicLatin}\\p{L}]" + - type: "excel" + template: "templates/SampleReportTemplate.xls" + diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/encounters.sql b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/encounters.sql new file mode 100644 index 0000000000..be860bf709 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/encounters.sql @@ -0,0 +1 @@ +select * from encounters; diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/orders.sql b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/orders.sql new file mode 100644 index 0000000000..a9b7efe223 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/orders.sql @@ -0,0 +1 @@ +select * from orders; diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sampleNestedReport.yml b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sampleNestedReport.yml new file mode 100644 index 0000000000..9e2daf2ce5 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sampleNestedReport.yml @@ -0,0 +1,18 @@ +key: "samplenestedexport" +uuid: "c2fb2082-9b36-4398-96af-d20570bacd07" +name: "sample.export.nested.name" +description: "sample.export.nested.description" +parameters: + - key: "startDate" + type: "java.util.Date" + label: "startDate.label" + - key: "endDate" + type: "java.util.Date" + label: "endDate.label" +datasets: + - key: "orders" + type: "sql" + config: "sql/nested.sql" + + + diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sql/nested.sql b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sql/nested.sql new file mode 100644 index 0000000000..a9b7efe223 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/subdirectory/sql/nested.sql @@ -0,0 +1 @@ +select * from orders; diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/templates/SampleReportTemplate.xls b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/templates/SampleReportTemplate.xls new file mode 100644 index 0000000000..e69de29bb2 diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java index beb2c4e90c..a2172cbc47 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java @@ -16,6 +16,7 @@ import org.openmrs.module.DaemonToken; import org.openmrs.module.DaemonTokenAware; import org.openmrs.module.reporting.common.MessageUtil; +import org.openmrs.module.reporting.config.ReportLoader; import org.openmrs.module.reporting.report.task.ReportingTimerTask; import org.openmrs.module.reporting.report.task.RunQueuedReportsTask; @@ -35,6 +36,8 @@ public void contextRefreshed() { @Override public void started() { ReportingTimerTask.setEnabled(true); + // TODO: should this happen in context refreshed instead? + ReportLoader.loadReportsFromConfig(); log.info("Reporting Module Started..."); } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java new file mode 100644 index 0000000000..cfe7e3c76a --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java @@ -0,0 +1,41 @@ +package org.openmrs.module.reporting.config; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class DataSetDescriptor { + + @JsonProperty + private String key; + + @JsonProperty + private String type; + + @JsonProperty + private String config; + + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getConfig() { + return config; + } + + public void setConfig(String config) { + this.config = config; + } + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java new file mode 100644 index 0000000000..4c2814da90 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java @@ -0,0 +1,41 @@ +package org.openmrs.module.reporting.config; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.Map; + +public class DesignDescriptor { + + @JsonProperty + private String type; + + @JsonProperty + private String template; + + @JsonProperty + private Map properties; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getTemplate() { + return template; + } + + public void setTemplate(String template) { + this.template = template; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java new file mode 100644 index 0000000000..0824b995c1 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java @@ -0,0 +1,39 @@ +package org.openmrs.module.reporting.config; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class ParameterDescriptor { + + @JsonProperty + private String key; + + @JsonProperty + private String type; + + @JsonProperty + private String label; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportDescriptor.java new file mode 100644 index 0000000000..0fff269880 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportDescriptor.java @@ -0,0 +1,109 @@ +package org.openmrs.module.reporting.config; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.io.File; +import java.util.List; +import java.util.Map; + +public class ReportDescriptor { + + @JsonProperty + private String key; + + @JsonProperty + private String uuid; + + @JsonProperty + private String name; + + @JsonProperty + private String description; + + @JsonProperty + private List parameters; + + @JsonProperty + private List datasets; + + @JsonProperty + private List designs; + + @JsonProperty + private Map config; + + // utility property for storing the path to this descriptor on the file system so we know where to look for related files + private File path; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getParameters() { + return parameters; + } + + public void setParameters(List parameters) { + this.parameters = parameters; + } + + public List getDatasets() { + return datasets; + } + + public void setDatasets(List datasets) { + this.datasets = datasets; + } + + public List getDesigns() { + return designs; + } + + public void setDesigns(List designs) { + this.designs = designs; + } + + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + + public File getPath() { + return path; + } + + public void setPath(File path) { + this.path = path; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java new file mode 100644 index 0000000000..65f10f185e --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -0,0 +1,313 @@ +package org.openmrs.module.reporting.config; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.io.filefilter.FileFilterUtils; +import org.apache.commons.io.filefilter.TrueFileFilter; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.Location; +import org.openmrs.api.context.Context; +import org.openmrs.api.db.SerializedObject; +import org.openmrs.api.db.SerializedObjectDAO; +import org.openmrs.module.reporting.common.ContentType; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.module.reporting.report.ReportDesign; +import org.openmrs.module.reporting.report.ReportDesignResource; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; +import org.openmrs.module.reporting.report.renderer.CsvReportRenderer; +import org.openmrs.module.reporting.report.renderer.ReportDesignRenderer; +import org.openmrs.module.reporting.report.renderer.XlsReportRenderer; +import org.openmrs.module.reporting.report.service.ReportService; +import org.openmrs.util.OpenmrsUtil; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ReportLoader { + + private static Log log = LogFactory.getLog(ReportLoader.class); + + public static final String getReportingDescriptorsConfigurationDir() { + return OpenmrsUtil.getApplicationDataDirectory() + File.separator + "configuration" + File.separator + "reports" + File.separator + "reportdescriptors"; + } + + public static void loadReportsFromConfig() { + for (ReportDescriptor reportDescriptor : loadReportDescriptors()) { + ReportDefinition reportDefinition = constructReportDefinition(reportDescriptor); + saveReportDefinition(reportDefinition); + List reportDesigns = constructReportDesigns(reportDefinition, reportDescriptor); + saveReportDesigns(reportDefinition, reportDesigns); + } + } + + public static void saveReportDefinition(ReportDefinition reportDefinition) { + + ReportDefinition existing = Context.getService(ReportDefinitionService.class).getDefinitionByUuid(reportDefinition.getUuid()); + if (existing != null) { + // we need to overwrite the existing, rather than purge-and-recreate, to avoid deleting old ReportRequests + reportDefinition.setId(existing.getId()); + } + else { + // incompatible class changes for a serialized object could mean that getting the definition return null + // and some serialization error gets logged. In that case we want to overwrite the invalid serialized definition + SerializedObject invalidSerializedObject = Context.getRegisteredComponents(SerializedObjectDAO.class).get(0).getSerializedObjectByUuid(reportDefinition.getUuid()); + if (invalidSerializedObject != null) { + reportDefinition.setId(invalidSerializedObject.getId()); + } + } + + Context.getService(ReportDefinitionService.class).saveDefinition(reportDefinition); + } + + public static void saveReportDesigns(ReportDefinition reportDefinition, List reportDesigns) { + // purging a ReportDesign doesn't trigger any extra logic, so we can just purge-and-recreate here + List existingDesigns = Context.getService(ReportService.class).getReportDesigns(reportDefinition, null, true); + if (existingDesigns.size() > 0) { + log.debug("Deleting " + existingDesigns.size() + " old designs for " + reportDefinition.getName()); + for (ReportDesign design : existingDesigns) { + Context.getService(ReportService.class).purgeReportDesign(design); + } + } + + for (ReportDesign reportDesign : reportDesigns) { + Context.getService(ReportService.class).saveReportDesign(reportDesign); + } + + } + + public static ReportDefinition constructReportDefinition(ReportDescriptor reportDescriptor) { + + ReportDefinition rd = new ReportDefinition(); + rd.setName(reportDescriptor.getName()); + rd.setDescription(reportDescriptor.getDescription()); + rd.setUuid(reportDescriptor.getUuid()); + + List parameters = constructParameters(reportDescriptor.getParameters()); + Map mappings = constructMappings(parameters); + rd.setParameters(parameters); + + if (reportDescriptor.getDatasets() != null) { + for (DataSetDescriptor dataSetDescriptor : reportDescriptor.getDatasets()) { + DataSetDefinition dsd = constructDataSetDefinition(dataSetDescriptor, reportDescriptor.getPath(), parameters); + if (dsd != null) { + rd.addDataSetDefinition(dataSetDescriptor.getKey(), dsd, mappings); + } + } + } + return rd; + } + + public static List constructParameters(List parameterDescriptors) { + List parameters = new ArrayList(); + if (parameterDescriptors != null) { + for (ParameterDescriptor parameterDescriptor : parameterDescriptors) { + try { + parameters.add(new Parameter(parameterDescriptor.getKey(), parameterDescriptor.getLabel(), getParameterClass(parameterDescriptor.getType()))); + } catch (Exception e) { + throw new RuntimeException("Unable to configure parameter " + parameterDescriptor.getKey(), e); + } + } + } + return parameters; + } + + public static Class getParameterClass(String clazz) throws ClassNotFoundException { + if (clazz.equalsIgnoreCase("location")) { + return Location.class; + } + else if (clazz.equalsIgnoreCase("date")) { + return Date.class; + } + else { + return Context.loadClass(clazz); + } + } + + public static Map constructMappings(List parameters) { + Map mappings = new HashMap(); + for (Parameter parameter : parameters) { + mappings.put(parameter.getName(), "${" + parameter.getName() + "}"); + } + return mappings; + } + + public static DataSetDefinition constructDataSetDefinition(DataSetDescriptor dataSetDescriptor, File path, List parameters) { + + DataSetDefinition dsd = null; + + if ("sql".equalsIgnoreCase(dataSetDescriptor.getType())) { + dsd = constructSQLFileDataSetDefinition(dataSetDescriptor, path); + } + else { + throw new RuntimeException("Unsupported data set descriptor type: " + dataSetDescriptor.getType()); + } + + if (parameters != null) { + for (Parameter parameter : parameters) { + dsd.addParameter(parameter); + } + } + + return dsd; + } + + public static SqlFileDataSetDefinition constructSQLFileDataSetDefinition(DataSetDescriptor dataSetDescriptor, File path) { + + SqlFileDataSetDefinition dsd = new SqlFileDataSetDefinition(); + + File sqlFile = new File(path, dataSetDescriptor.getConfig()); + + if (sqlFile.exists()) { + dsd.setSqlFile(sqlFile.getAbsolutePath()); + } + else { + throw new RuntimeException("SQL file " + dataSetDescriptor.getConfig() + " not found"); + } + + return dsd; + } + + public static List constructReportDesigns(ReportDefinition reportDefinition, ReportDescriptor reportDescriptor) { + + List reportDesigns = new ArrayList(); + + // always do a default CSV design + if (reportDescriptor.getDesigns() == null || reportDescriptor.getDesigns().size() == 0) { + DesignDescriptor defaultDesignDecsriptor = new DesignDescriptor(); + defaultDesignDecsriptor.setType("csv"); + reportDescriptor.setDesigns(Collections.singletonList(defaultDesignDecsriptor)); + } + + for (DesignDescriptor designDescriptor : reportDescriptor.getDesigns()) { + ReportDesign design = null; + if (designDescriptor.getType().equalsIgnoreCase("csv")) { + design = constructCSVReportDesign(reportDefinition); + } + else if (designDescriptor.getType().equalsIgnoreCase("excel") || designDescriptor.getType().equalsIgnoreCase("xls")) { + design = constructXlsReportDesign(reportDefinition, reportDescriptor, designDescriptor); + } + else { + throw new RuntimeException("Unsupported report design type: " + designDescriptor.getType() + " for report " + reportDefinition.getName()); + } + + design.addPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, StringUtils.replace(reportDefinition.getName(), " ", ".").toLowerCase() + "." + + "{{ formatDate request.reportDefinition.parameterMappings.startDate \"yyyyMMdd\" }}." + + "{{ formatDate request.reportDefinition.parameterMappings.endDate \"yyyyMMdd\" }}." + + "{{ formatDate request.evaluateStartDatetime \"yyyyMMdd\" }}." + + "{{ formatDate request.evaluateStartDatetime \"HHmm\" }}"); + + if (designDescriptor.getProperties() != null) { + for (Map.Entry property : designDescriptor.getProperties().entrySet()) { + design.addPropertyValue(property.getKey(), property.getValue()); + } + } + + reportDesigns.add(design); + } + + return reportDesigns; + } + + public static ReportDesign constructCSVReportDesign(ReportDefinition reportDefinition) { + ReportDesign design = new ReportDesign(); + design.setName("reporting.csv"); + design.setReportDefinition(reportDefinition); + design.setRendererType(CsvReportRenderer.class); + return design; + } + + public static ReportDesign constructXlsReportDesign(ReportDefinition reportDefinition, ReportDescriptor reportDescriptor, DesignDescriptor designDescriptor) { + + ReportDesign design = new ReportDesign(); + design.setName("reporting.excel"); + design.setReportDefinition(reportDefinition); + design.setRendererType(XlsReportRenderer.class); + + if (StringUtils.isNotBlank(designDescriptor.getTemplate())) { + ReportDesignResource resource = new ReportDesignResource(); + resource.setName("template"); + resource.setExtension(ContentType.EXCEL.getExtension()); + resource.setContentType(ContentType.EXCEL.getContentType()); + + try { + File templateFile = new File(reportDescriptor.getPath(), designDescriptor.getTemplate()); + byte[] excelTemplate = IOUtils.toByteArray(new FileInputStream(templateFile)); + resource.setContents(excelTemplate); + } catch (IOException e) { + throw new RuntimeException("Failed to load XLS template " + designDescriptor.getTemplate(), e); + } + resource.setReportDesign(design); + design.addResource(resource); + } + + + return design; + } + + public static List loadReportDescriptors() { + List reportDescriptors = new ArrayList(); + Collection files = null; + + try { + File reportDir = new File(getReportingDescriptorsConfigurationDir()); + if (reportDir.exists()) { + // search all directories and subdirectories for YAML files + files = FileUtils.listFiles(reportDir, FileFilterUtils.suffixFileFilter("yml"), TrueFileFilter.INSTANCE); + } + } + catch (Exception e) { + throw new RuntimeException("Unable to open reporting configuration directory", e); + } + + if (files != null) { + for (File file : files) { + reportDescriptors.add(ReportLoader.load(file)); + } + } + + return reportDescriptors; + } + + public static ReportDescriptor load(File file) { + + ReportDescriptor reportDescriptor = null; + + ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory()); + + if (file.exists()) { + + InputStream is = null; + + try { + is = new FileInputStream(file); + reportDescriptor = objectMapper.readValue(is, ReportDescriptor.class); + reportDescriptor.setPath(file.getParentFile()); + } + catch (Exception e) { + throw new RuntimeException("Unable to load report descriptor " + file.getAbsolutePath(), e); + } + finally { + IOUtils.closeQuietly(is); + } + } + + return reportDescriptor; + } +} diff --git a/api/src/main/resources/ReportDesign.hbm.xml b/api/src/main/resources/ReportDesign.hbm.xml index 7e5fc38483..686c0d5fca 100644 --- a/api/src/main/resources/ReportDesign.hbm.xml +++ b/api/src/main/resources/ReportDesign.hbm.xml @@ -14,7 +14,7 @@ - + @@ -22,17 +22,17 @@ - + - + - + @@ -49,13 +49,13 @@ - + - + - + @@ -79,11 +79,11 @@ - + - + - + diff --git a/api/src/main/resources/messages.properties b/api/src/main/resources/messages.properties index 54f10da4ad..5d39eac5e7 100644 --- a/api/src/main/resources/messages.properties +++ b/api/src/main/resources/messages.properties @@ -727,6 +727,7 @@ reporting.sqlQuery=SQL Query reporting.csv=CSV reporting.tsv=TSV reporting.xml=XML +reporting.excel=Excel reporting.add=ADD reporting.dimension=Dimension reporting.dimensions=Dimensions @@ -765,4 +766,4 @@ reporting.createNewLogicDataSet=Create New Logic DataSet reporting.previewLimitedToRandomCohort=Results have been limited to a random cohort of {0} patients reporting.affectedReportDefinitions.label=Affected Reports Definitions reporting.loadAffectedReportDefinitions.label=Load Affected Report Definitions -reporting.noAffectedReportDefs.label=No Affected Report Defifnitions! \ No newline at end of file +reporting.noAffectedReportDefs.label=No Affected Report Defifnitions! diff --git a/pom.xml b/pom.xml index 98e74a8eac..410feab69b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,14 +9,14 @@ Parent project for Reporting http://openmrs.org - + scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ HEAD - + openmrs-repo-modules @@ -227,21 +227,21 @@ ${serializationVersion} provided - + org.openmrs.module serialization.xstream-api-1.9 ${serializationVersion} provided - + org.openmrs.module serialization.xstream-api-1.10 ${serializationVersion} provided - + org.openmrs.module serialization.xstream-api-2.0 @@ -262,7 +262,7 @@ ${htmlwidgetsVersion} provided - + javax.mail mail @@ -278,6 +278,18 @@ provided + + + com.fasterxml.jackson.core + jackson-databind + 2.10.1 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.10.1 + + org.apache.poi poi-ooxml From 40c1b7db6124a9eedc8ed0eff5aeacf9aed1e73a Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Tue, 28 Jul 2020 10:47:36 -0400 Subject: [PATCH 051/143] Add dependency on com.fasterxml.jackson.com; switch to version used by OpenMRS Core --- pom.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 410feab69b..ae6893e7b3 100644 --- a/pom.xml +++ b/pom.xml @@ -279,15 +279,20 @@ + + com.fasterxml.jackson.core + jackson-core + 2.9.8 + com.fasterxml.jackson.core jackson-databind - 2.10.1 + 2.9.8 com.fasterxml.jackson.dataformat jackson-dataformat-yaml - 2.10.1 + 2.9.8 From fee77117eb8576fc2f0887f9982348721ef23e50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2020 17:49:31 +0300 Subject: [PATCH 052/143] Bump jackson-databind from 2.9.8 to 2.9.10.5 (#202) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.8 to 2.9.10.5. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae6893e7b3..c14c73edef 100644 --- a/pom.xml +++ b/pom.xml @@ -287,7 +287,7 @@ com.fasterxml.jackson.core jackson-databind - 2.9.8 + 2.9.10.5 com.fasterxml.jackson.dataformat From 5b97f3c4863bb1e04f503f3ad305a28ddb5aba0c Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Tue, 28 Jul 2020 10:59:11 -0400 Subject: [PATCH 053/143] Bump up version of com.fasterxml.jackson.* --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c14c73edef..985eaffb12 100644 --- a/pom.xml +++ b/pom.xml @@ -282,7 +282,7 @@ com.fasterxml.jackson.core jackson-core - 2.9.8 + 2.9.10.5 com.fasterxml.jackson.core @@ -292,7 +292,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - 2.9.8 + 2.9.10.5 From 478c71d40d2d63c4dd4c3dd714c13dd142e60566 Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Tue, 28 Jul 2020 11:48:55 -0400 Subject: [PATCH 054/143] Correct version of com.fasterxml.jackson.* --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 985eaffb12..c14c73edef 100644 --- a/pom.xml +++ b/pom.xml @@ -282,7 +282,7 @@ com.fasterxml.jackson.core jackson-core - 2.9.10.5 + 2.9.8 com.fasterxml.jackson.core @@ -292,7 +292,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - 2.9.10.5 + 2.9.8 From 4d1f55d8bfcaf667bfd26e513451baa544c5e722 Mon Sep 17 00:00:00 2001 From: mgoodrich Date: Tue, 28 Jul 2020 16:33:00 -0400 Subject: [PATCH 055/143] add additional valid liquibase checksums --- api/src/main/resources/liquibase.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index cece59d7cc..9b433c4591 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -86,7 +86,7 @@ SET report_definition_uuid = so.uuid FROM serialized_object so WHERE rd.report_definition_id = so.serialized_object_id; - + @@ -100,7 +100,7 @@ alter table reporting_report_design alter column report_definition_uuid type char(38); - + 3:bddba97d81d6daa7fd6fbb478897fd84 3:e557ea83775089ed9e636768b25de9a0 @@ -381,6 +381,8 @@ 8:29d9c10336ca467e93b34db77a250d12 8:631a987732036d592c48c118f8de368d + 3:f6ea0df533cc324ea0d6275d72980c78 + 3:e868cc03288964204097d0beef162f5f Remove OpenMRS scheduled tasks produced by the reporting module @@ -615,5 +617,5 @@ - - \ No newline at end of file + + From 3bf83004ad6fe56fde3e69188e7b102954a1b1f2 Mon Sep 17 00:00:00 2001 From: Am-Coder <39997970+Am-Coder@users.noreply.github.com> Date: Wed, 5 Aug 2020 19:25:06 +0530 Subject: [PATCH 056/143] Report 869 Change tinyint(1) to boolean for boolean columns in Reporting Module (#203) * REPORT-869 Change tinyint(1) to boolean for boolean columns in Reporting Module * REPORT-869 Change tinyint(1) to boolean for boolean columns in Reporting Module --- api/src/main/resources/liquibase.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index 9b433c4591..4d87074624 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -260,6 +260,8 @@ + 3:8e88f53150534221e9c32cd0e2c94706 + 3:f821b2d05cdaf6593e2c6a48907b5d48 @@ -267,7 +269,7 @@ Add processAutomatically boolean to ReportRequest - + @@ -290,6 +292,9 @@ 3:bc9b147af791381ff5a98a7786f7d638 3:779193b8124f3299601ca74ff7699dfe + + 3:779193b8124f3299601ca74ff7699dfe + 3:357a305d1d6f3723032301f9e96e6f22 @@ -311,10 +316,10 @@ - + - + From fdef40b48f8227ecbb056167914bbd1c2b07f9dc Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Sun, 27 Sep 2020 00:41:58 +0300 Subject: [PATCH 057/143] Switching from snapshot to alpha of the platform --- api-2.4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 86d9b03c87..9bab685777 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -13,7 +13,7 @@ 2.4 api project for reporting - 2.4.0-SNAPSHOT + 2.4.0-alpha From 02d8410ff1ea9f16d2b896b6ba35817b7100dd3a Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 28 Sep 2020 13:25:41 +0000 Subject: [PATCH 058/143] [maven-release-plugin] prepare release 1.21.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index ee86227b3f..b1be012889 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 19441f3bff..638a856c05 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 2b417bd875..d60fb74e1b 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 1432b38844..166e5a9ce9 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 9bab685777..139bac9501 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 1d3854c6f4..27f1b50cb7 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index ebb92cb32e..099f3f8ba2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 31cc8b6263..6e21ec4cd4 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index c14c73edef..ac5419ea02 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0-SNAPSHOT + 1.21.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.21.0 From 7f3e0a44b2f417efa2f22a9b52ff6bf94813664d Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 28 Sep 2020 13:25:48 +0000 Subject: [PATCH 059/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index b1be012889..c9ec091f43 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 638a856c05..6b2e2c8f7f 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index d60fb74e1b..fb21475624 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 166e5a9ce9..9ccd9ce21f 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 139bac9501..c1cb1cb506 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 27f1b50cb7..eeb003e225 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 099f3f8ba2..304ce3d5ed 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 6e21ec4cd4..d16ae79b5c 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index ac5419ea02..60fdc3284a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.21.0 + 1.22.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.21.0 + HEAD From 2b512af17c4c8b75be19c59131b3796305a44bba Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 29 Oct 2020 00:28:22 -0400 Subject: [PATCH 060/143] REPORT-872 Cohort Indicator Evaluator does not properly limit aggregation data to numerator cohort --- .../indicator/evaluator/CohortIndicatorEvaluator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java index c94da7fa65..ac9a072ca9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/indicator/evaluator/CohortIndicatorEvaluator.java @@ -102,7 +102,9 @@ public IndicatorResult evaluate(Indicator indicator, EvaluationContext context) if (cid.getDataToAggregate() != null) { try { PatientDataService pds = Context.getService(PatientDataService.class); - EvaluatedPatientData patientData = pds.evaluate(cid.getDataToAggregate(), context); + EvaluationContext dataContext = context.shallowCopy(); + dataContext.setBaseCohort(cohort); + EvaluatedPatientData patientData = pds.evaluate(cid.getDataToAggregate(), dataContext); for (Integer pId : patientData.getData().keySet()) { result.addLogicResult(pId, (Number) patientData.getData().get(pId)); } @@ -154,4 +156,4 @@ private void maybeSetIndexDate(Object criteria, EvaluationContext context) { } } } -} \ No newline at end of file +} From e764058dec3571b6f4a3d59ac9e6c1ed4d7f144d Mon Sep 17 00:00:00 2001 From: Varsha Sharma Date: Wed, 2 Dec 2020 08:44:38 -0500 Subject: [PATCH 061/143] Adding HTML Encoding for Report Processor Name (#206) --- .../controller/portlet/ReportProcessorFormController.java | 3 ++- pom.xml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java index 3385a666fa..2d2de9d55a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; +import org.owasp.encoder.Encode; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.api.context.Context; @@ -61,7 +62,7 @@ public String saveReportProcessor(ModelMap model, HttpServletRequest request, c = new ReportProcessorConfiguration(); } - c.setName(name); + c.setName(Encode.forHtml(name)); c.setDescription(description); c.setProcessorType(processorType); c.setProcessorMode(processorMode); diff --git a/pom.xml b/pom.xml index 60fdc3284a..31fa23b7ad 100644 --- a/pom.xml +++ b/pom.xml @@ -278,6 +278,12 @@ provided + + org.owasp.encoder + encoder + 1.2.3 + + com.fasterxml.jackson.core From 745d656668f196661e8d6a8efaa5db6fba11d5ae Mon Sep 17 00:00:00 2001 From: Anupam Devulapalli Date: Fri, 4 Dec 2020 14:45:14 -0500 Subject: [PATCH 062/143] Added sanitization for EMPT-103 and EMPT-104 --- omod/src/main/webapp/definition/manageDefinitions.jsp | 10 +++++----- omod/src/main/webapp/indicators/manageIndicators.jsp | 10 +++++----- omod/src/main/webapp/portlets/baseCohortIndicator.jsp | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/omod/src/main/webapp/definition/manageDefinitions.jsp b/omod/src/main/webapp/definition/manageDefinitions.jsp index 766b04d630..cadcad7be8 100644 --- a/omod/src/main/webapp/definition/manageDefinitions.jsp +++ b/omod/src/main/webapp/definition/manageDefinitions.jsp @@ -50,8 +50,8 @@ $j('#typeRowAll').css('background-color', '#E6E6E6'); }); - function confirmDelete(name, uuid, type) { - if (confirm("Are you sure you want to delete " + name + "?")) { + function confirmDelete(uuid, type) { + if (confirm("Are you sure you want to delete it?")) { document.location.href = 'purgeDefinition.form?uuid='+uuid+'&type='+type; } } @@ -115,10 +115,10 @@ - ${definition.name} + - ${definition.creator} + @@ -127,7 +127,7 @@     - +   diff --git a/omod/src/main/webapp/indicators/manageIndicators.jsp b/omod/src/main/webapp/indicators/manageIndicators.jsp index 41fc843c9f..9c015b7b1d 100644 --- a/omod/src/main/webapp/indicators/manageIndicators.jsp +++ b/omod/src/main/webapp/indicators/manageIndicators.jsp @@ -20,8 +20,8 @@ $j("#indicatorNameColumn").click(); } ); - function confirmDelete(name, uuid) { - if (confirm("Are you sure you want to delete " + name + "?")) { + function confirmDelete(uuid) { + if (confirm("Are you sure you want to delete it?")) { document.location.href = '${pageContext.request.contextPath}/module/reporting/indicators/purgeIndicator.form?uuid=' + uuid; } } @@ -97,7 +97,7 @@ - + @@ -106,7 +106,7 @@ - ${indicator.name} + @@ -132,7 +132,7 @@ period indicator - ${indicator.name} + ${indicator.creator} diff --git a/omod/src/main/webapp/portlets/baseCohortIndicator.jsp b/omod/src/main/webapp/portlets/baseCohortIndicator.jsp index 0344437f89..f467cf1351 100644 --- a/omod/src/main/webapp/portlets/baseCohortIndicator.jsp +++ b/omod/src/main/webapp/portlets/baseCohortIndicator.jsp @@ -63,11 +63,11 @@
- +
- +
@@ -124,10 +124,10 @@
- :  ${model.indicator.name} + :  
- :  ${model.indicator.description} + :  
:  ${model.indicator.type} From 061318f93c9b9c9e22ecc9390805ba5746544cf9 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 14 Dec 2020 12:45:31 -0500 Subject: [PATCH 063/143] Travis -> GitHub Actions Feel free to revert, but see https://talk.openmrs.org/t/ci-within-openmrs-bamboo-vs-travis-vs-github-actions-vs-azure-pipelines/31252/6 --- .github/workflows/maven.yml | 40 +++++++++++++++++++++++++++++++++++++ .travis.yml | 3 --- 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/maven.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000000..8d2315028f --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,40 @@ +# this build is designed to replicate the Travis CI workflow +name: Build with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + platform: [ ubuntu-latest ] + java-version: [ 8 ] + + runs-on: ${{ matrix.platform }} + env: + PLATFORM: ${{ matrix.platform }} + JAVA_VERSION: ${{ matrix.java-version }} + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java-version }} + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Install dependencies + run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml + - name: Build with Maven + run: mvn test --batch-mode --file pom.xml + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5ffed3f27..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: java -jdk: - - openjdk8 From ca6078a599f198542c245baf67932f62935cca89 Mon Sep 17 00:00:00 2001 From: MAGEMBE SHARIF <48015736+sherrif10@users.noreply.github.com> Date: Wed, 6 Jan 2021 13:53:55 +0300 Subject: [PATCH 064/143] REPORT-874:ReportLoaderIntegrationTest Have Failing Tests (#208) * resolving failing test * Remove file * Removed second file * Removed second file * https://issues.openmrs.org/browse/REPORT-874 Using File separator method * Adding spaces btn + signs --- .../module/reporting/config/ReportLoaderIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java index 2ee680680c..0ddc199acd 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java @@ -64,7 +64,7 @@ public void shouldConstructSqlFileDataSetDefinition() { SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) ReportLoader.constructDataSetDefinition(sqlDataSetDescriptor, new File(getReportingDescriptorsConfigurationDir()),null); - assertThat(dsd.getSqlFile(), containsString("sql/encounters.sql")); + assertThat(dsd.getSqlFile(), containsString("sql" + File.separator + "encounters.sql")); } @Test From 767ffb92850f823185621d4401968402ac3fb9f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 10:47:32 +0300 Subject: [PATCH 065/143] Bump jackson-databind from 2.9.10.5 to 2.9.10.7 (#212) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.5 to 2.9.10.7. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 31fa23b7ad..fa5f7a8075 100644 --- a/pom.xml +++ b/pom.xml @@ -293,7 +293,7 @@ com.fasterxml.jackson.core jackson-databind - 2.9.10.5 + 2.9.10.7 com.fasterxml.jackson.dataformat From d2aee742f5dc97de31f8a5c7ad3eddaf4e72b3cb Mon Sep 17 00:00:00 2001 From: Mutesasira Moses Date: Fri, 2 Apr 2021 19:05:42 +0300 Subject: [PATCH 066/143] REPORT-722: Aded a check whether the logic module is installed to handle lack of logic service gracefully. made Reporting module aware of logic modle (#169) --- api/src/main/resources/messages.properties | 1 + .../reporting/web/datasets/LogicDataSetEditor.java | 13 ++++++++++++- omod/src/main/resources/config.xml | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/api/src/main/resources/messages.properties b/api/src/main/resources/messages.properties index 5d39eac5e7..79fe59c367 100644 --- a/api/src/main/resources/messages.properties +++ b/api/src/main/resources/messages.properties @@ -767,3 +767,4 @@ reporting.previewLimitedToRandomCohort=Results have been limited to a random coh reporting.affectedReportDefinitions.label=Affected Reports Definitions reporting.loadAffectedReportDefinitions.label=Load Affected Report Definitions reporting.noAffectedReportDefs.label=No Affected Report Defifnitions! +reporting.logicModuleNotStarted.error=Logic module is not started. Please Ensure Logic Module is Installed and Running diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java index c6df15a5a9..c820029e96 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java @@ -15,11 +15,15 @@ import java.util.List; import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.api.context.Context; import org.openmrs.logic.LogicException; +import org.openmrs.module.ModuleFactory; import org.openmrs.module.reporting.common.LogicUtil; import org.openmrs.module.reporting.dataset.definition.LogicDataSetDefinition; import org.openmrs.module.reporting.dataset.definition.LogicDataSetDefinition.Column; @@ -37,10 +41,13 @@ public class LogicDataSetEditor { Log log = LogFactory.getLog(getClass()); @RequestMapping("/module/reporting/datasets/logicDataSetEditor") - public void showDataset(ModelMap model, @RequestParam(required = false, value = "uuid") String uuid) { + public void showDataset(HttpServletRequest request, ModelMap model, @RequestParam(required = false, value = "uuid") String uuid) { DataSetDefinitionService svc = Context.getService(DataSetDefinitionService.class); LogicDataSetDefinition definition = (LogicDataSetDefinition) svc.getDefinition(uuid, LogicDataSetDefinition.class); + HttpSession httpSession = request.getSession(); + if(ModuleFactory.isModuleStarted("logic")) { + List tokens = new ArrayList(Context.getLogicService().getAllTokens()); Collections.sort(tokens); @@ -58,6 +65,10 @@ public void showDataset(ModelMap model, @RequestParam(required = false, value = model.addAttribute("logicErrors", logicErrors); model.addAttribute("tokens", tokens); model.addAttribute("conceptNameTags", Context.getConceptService().getAllConceptNameTags()); + }else { + + httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, "reporting.logicModuleNotStarted.error"); + } } @RequestMapping("/module/reporting/datasets/logicDataSetEditorSave") diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index e517961a21..744d1eee9f 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -27,6 +27,7 @@ org.openmrs.module.reportingcompatibility org.openmrs.module.legacyui + org.openmrs.module.logic From c7b3d3c3f9ae3033e96aa8e44a56d590900e975f Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 2 Jun 2021 10:13:17 -0400 Subject: [PATCH 067/143] REPORT-877: Configurable data set descriptors should support fixed parameter values (#214) --- .../config/ReportLoaderIntegrationTest.java | 87 +++++++++++---- .../reporting/config/ReportLoaderTest.java | 49 ++++----- .../test/resources/config/sampleReport.yml | 12 ++ .../reportdescriptors/samplePersonsReport.yml | 32 ++++++ .../reports/reportdescriptors/sql/persons.sql | 1 + .../reporting/config/DataSetDescriptor.java | 16 +++ .../reporting/config/ParameterDescriptor.java | 11 ++ .../module/reporting/config/ReportLoader.java | 103 ++++++++++++++---- .../evaluation/parameter/Parameter.java | 15 +++ 9 files changed, 253 insertions(+), 73 deletions(-) create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/samplePersonsReport.yml create mode 100644 api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/persons.sql diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java index 0ddc199acd..810643c9ed 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java @@ -1,9 +1,17 @@ package org.openmrs.module.reporting.config; +import org.hibernate.cfg.Environment; import org.junit.Before; import org.junit.Test; import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; +import org.openmrs.module.reporting.dataset.DataSetRow; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.querybuilder.SqlQueryBuilder; +import org.openmrs.module.reporting.evaluation.service.EvaluationService; +import org.openmrs.module.reporting.report.ReportData; import org.openmrs.module.reporting.report.ReportDesign; import org.openmrs.module.reporting.report.ReportDesignResource; import org.openmrs.module.reporting.report.definition.ReportDefinition; @@ -11,18 +19,20 @@ import org.openmrs.module.reporting.report.service.ReportService; import org.openmrs.test.BaseModuleContextSensitiveTest; import org.openmrs.util.OpenmrsConstants; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Properties; -import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.hasItems; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertTrue; import static org.openmrs.module.reporting.config.ReportLoader.getReportingDescriptorsConfigurationDir; public class ReportLoaderIntegrationTest extends BaseModuleContextSensitiveTest { @@ -30,21 +40,39 @@ public class ReportLoaderIntegrationTest extends BaseModuleContextSensitiveTest public static final String appDataTestDir = "testAppDataDir"; private String path; + + @Autowired @Qualifier("reportingReportDefinitionService") + ReportDefinitionService reportDefinitionService; + + @Autowired @Qualifier("reportingEvaluationService") + EvaluationService evaluationService; + + @Autowired + BuiltInCohortDefinitionLibrary cohorts; @Before public void setup() { // configure app data dir path path = getClass().getClassLoader().getResource(appDataTestDir).getPath() + File.separator; System.setProperty("OPENMRS_APPLICATION_DATA_DIRECTORY", path); - Properties prop = new Properties(); + Properties prop = getRuntimeProperties(); prop.setProperty(OpenmrsConstants.APPLICATION_DATA_DIRECTORY_RUNTIME_PROPERTY, path); Context.setRuntimeProperties(prop); } + @Override + public Properties getRuntimeProperties() { + Properties p = super.getRuntimeProperties(); + p.put("connection.url", p.getProperty(Environment.URL)); + p.put(Environment.URL, p.getProperty(Environment.URL) + ";MVCC=TRUE"); + p.put("connection.driver_class", p.getProperty(Environment.DRIVER)); + return p; + } + @Test public void shouldLoadAllReportDescriptorsInReportDescriptorsDirectory() { List reportDescriptors = ReportLoader.loadReportDescriptors(); - assertThat(reportDescriptors.size(), is(3)); + assertThat(reportDescriptors.size(), is(4)); List names = new ArrayList(); for (ReportDescriptor reportDescriptor : reportDescriptors) { @@ -54,26 +82,13 @@ public void shouldLoadAllReportDescriptorsInReportDescriptorsDirectory() { assertThat(names, hasItems("sample.export.encounters.name","sample.export.orders.name", "sample.export.nested.name")); } - @Test - public void shouldConstructSqlFileDataSetDefinition() { - DataSetDescriptor sqlDataSetDescriptor = new DataSetDescriptor(); - - sqlDataSetDescriptor.setKey("encounters"); - sqlDataSetDescriptor.setType("sql"); - sqlDataSetDescriptor.setConfig("sql/encounters.sql"); - - SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) ReportLoader.constructDataSetDefinition(sqlDataSetDescriptor, new File(getReportingDescriptorsConfigurationDir()),null); - - assertThat(dsd.getSqlFile(), containsString("sql" + File.separator + "encounters.sql")); - } - @Test public void shouldLoadReportsFromConfigAndSave() { ReportLoader.loadReportsFromConfig(); - ReportDefinition ordersReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("9e7dc296-2aad-11e3-a840-5b9e0b589afb"); - ReportDefinition encountersReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("752e386d-da67-4e3d-bddc-95157c58c54c"); - ReportDefinition nestedReportDefinition = Context.getService(ReportDefinitionService.class).getDefinitionByUuid("c2fb2082-9b36-4398-96af-d20570bacd07"); + ReportDefinition ordersReportDefinition = reportDefinitionService.getDefinitionByUuid("9e7dc296-2aad-11e3-a840-5b9e0b589afb"); + ReportDefinition encountersReportDefinition = reportDefinitionService.getDefinitionByUuid("752e386d-da67-4e3d-bddc-95157c58c54c"); + ReportDefinition nestedReportDefinition = reportDefinitionService.getDefinitionByUuid("c2fb2082-9b36-4398-96af-d20570bacd07"); assertThat(ordersReportDefinition, notNullValue()); assertThat(encountersReportDefinition, notNullValue()); @@ -85,7 +100,39 @@ public void shouldLoadReportsFromConfigAndSave() { List existingOrderReportDesigns = Context.getService(ReportService.class).getReportDesigns(ordersReportDefinition, null, true); assertThat(existingOrderReportDesigns.size(), is(2)); + } + + @Test + public void shouldSupportFixedParametersInDataSetDefinitions() throws Exception { + ReportLoader.loadReportsFromConfig(); + ReportDefinition rd = reportDefinitionService.getDefinitionByUuid("0c32f660-c2de-11eb-b5a4-0242ac110002"); + assertThat(rd.getParameters().size(), is(2)); + Mapped maleMapped = rd.getDataSetDefinitions().get("males"); + Mapped femaleMapped = rd.getDataSetDefinitions().get("females"); + assertThat(maleMapped.getParameterizable().getParameters().size(), is(3)); + assertThat(femaleMapped.getParameterizable().getParameters().size(), is(3)); + assertThat(maleMapped.getParameterMappings().get("gender").toString(), is("M")); + assertThat(femaleMapped.getParameterMappings().get("gender").toString(), is("F")); + ReportData data = reportDefinitionService.evaluate(rd, new EvaluationContext()); + List rptMales = new ArrayList(); + List rptFemales = new ArrayList(); + for (DataSetRow row : data.getDataSets().get("males")) { + rptMales.add((Integer)row.getColumnValue("person_id")); + } + for (DataSetRow row : data.getDataSets().get("females")) { + rptFemales.add((Integer)row.getColumnValue("person_id")); + } + + SqlQueryBuilder maleQuery = new SqlQueryBuilder("select person_id from person where gender = 'M'"); + List males = evaluationService.evaluateToList(maleQuery, Integer.class, new EvaluationContext()); + + SqlQueryBuilder femaleQuery = new SqlQueryBuilder("select person_id from person where gender = 'F'"); + List females = evaluationService.evaluateToList(femaleQuery, Integer.class, new EvaluationContext()); + assertThat(males.size(), is(rptMales.size())); + assertThat(females.size(), is(rptFemales.size())); + assertTrue(males.containsAll(rptMales)); + assertTrue(females.containsAll(rptFemales)); } @Test diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java index 2431103c8e..61f1ccb6f9 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderTest.java @@ -10,7 +10,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Map; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.is; @@ -35,10 +34,26 @@ public void load_shouldLoadYAMLFile() { assertThat(descriptor.getParameters().get(0).getKey(), is("startDate")); assertThat(descriptor.getParameters().get(0).getType(), is("date")); assertThat(descriptor.getParameters().get(0).getLabel(), is("startDate.label")); - assertThat(descriptor.getDatasets().size(), is(2)); - assertThat(descriptor.getDatasets().get(0).getKey(), is("orders")); - assertThat(descriptor.getDatasets().get(0).getType(), is("sql")); - assertThat(descriptor.getDatasets().get(0).getConfig(), is("orders.sql")); + assertThat(descriptor.getDatasets().size(), is(4)); + DataSetDescriptor ds0 = descriptor.getDatasets().get(0); + assertThat(ds0.getKey(), is("males")); + assertThat(ds0.getType(), is("sql")); + assertThat(ds0.getConfig(), is("persons.sql")); + assertThat(ds0.getParameters().size(), is(1)); + assertThat(ds0.getParameters().get(0).getKey(), is("gender")); + assertThat(ds0.getParameters().get(0).getValue(), is("M")); + DataSetDescriptor ds1 = descriptor.getDatasets().get(1); + assertThat(ds1.getKey(), is("females")); + assertThat(ds1.getType(), is("sql")); + assertThat(ds1.getConfig(), is("persons.sql")); + assertThat(ds1.getParameters().size(), is(1)); + assertThat(ds1.getParameters().get(0).getKey(), is("gender")); + assertThat(ds1.getParameters().get(0).getValue(), is("F")); + DataSetDescriptor ds2 = descriptor.getDatasets().get(2); + assertThat(ds2.getKey(), is("orders")); + assertThat(ds2.getType(), is("sql")); + assertThat(ds2.getConfig(), is("orders.sql")); + assertThat(ds2.getParameters().size(), is(0)); assertThat(descriptor.getDesigns().get(0).getType(), is("csv")); assertThat(descriptor.getDesigns().get(0).getProperties().get("characterEncoding"), is("ISO-8859-1")); assertThat(descriptor.getDesigns().get(0).getProperties().get("blacklistRegex"), is("[^\\p{InBasicLatin}\\p{L}]")); @@ -95,30 +110,6 @@ public void shouldConstructParameters() { } - @Test - public void shouldConstructMappings() { - List parameterDescriptors = new ArrayList(); - - ParameterDescriptor date = new ParameterDescriptor(); - date.setKey("startDate"); - date.setLabel("startDate.label"); - date.setType("java.util.Date"); - - ParameterDescriptor location = new ParameterDescriptor(); - location.setKey("location"); - location.setLabel("location.label"); - location.setType("org.openmrs.Location"); - - parameterDescriptors.add(date); - parameterDescriptors.add(location); - - List parameters = ReportLoader.constructParameters(parameterDescriptors); - - Map mappings = ReportLoader.constructMappings(parameters); - assertThat((String) mappings.get("startDate"), is("${startDate}")); - assertThat((String) mappings.get("location"), is("${location}")); - } - @Test public void shouldConstructCSVReportDesign() { ReportDefinition reportDefinition = new ReportDefinition(); diff --git a/api-tests/src/test/resources/config/sampleReport.yml b/api-tests/src/test/resources/config/sampleReport.yml index cd4bd18edf..f8edc511e1 100644 --- a/api-tests/src/test/resources/config/sampleReport.yml +++ b/api-tests/src/test/resources/config/sampleReport.yml @@ -10,6 +10,18 @@ parameters: # should be able to parse comments! type: "date" label: "endDate.label" datasets: + - key: "males" + type: "sql" + config: "persons.sql" + parameters: + - key: "gender" + value: "M" + - key: "females" + type: "sql" + config: "persons.sql" + parameters: + - key: "gender" + value: "F" - key: "orders" type: "sql" config: "orders.sql" diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/samplePersonsReport.yml b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/samplePersonsReport.yml new file mode 100644 index 0000000000..0bfe55f372 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/samplePersonsReport.yml @@ -0,0 +1,32 @@ +key: "sampleordersexport" +uuid: "0c32f660-c2de-11eb-b5a4-0242ac110002" +name: "sample.export.person.name" +description: "sample.export.person.description" +parameters: + - key: "startDate" + type: "java.util.Date" + label: "startDate.label" + - key: "endDate" + type: "java.util.Date" + label: "endDate.label" +datasets: + - key: "males" + type: "sql" + config: "sql/persons.sql" + parameters: + - key: "gender" + value: "M" + - key: "females" + type: "sql" + config: "sql/persons.sql" + parameters: + - key: "gender" + value: "F" +designs: + - type: "csv" + properties: + "characterEncoding": "ISO-8859-1" + "blacklistRegex": "[^\\p{InBasicLatin}\\p{L}]" + - type: "excel" + template: "templates/SampleReportTemplate.xls" + diff --git a/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/persons.sql b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/persons.sql new file mode 100644 index 0000000000..eccba7b9b5 --- /dev/null +++ b/api-tests/src/test/resources/testAppDataDir/configuration/reports/reportdescriptors/sql/persons.sql @@ -0,0 +1 @@ +select person_id, gender from person where gender = @gender; diff --git a/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java index cfe7e3c76a..8686906481 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/DataSetDescriptor.java @@ -2,6 +2,9 @@ import org.codehaus.jackson.annotate.JsonProperty; +import java.util.ArrayList; +import java.util.List; + public class DataSetDescriptor { @JsonProperty @@ -13,6 +16,8 @@ public class DataSetDescriptor { @JsonProperty private String config; + @JsonProperty + private List parameters; public String getKey() { return key; @@ -38,4 +43,15 @@ public void setConfig(String config) { this.config = config; } + public List getParameters() { + if (parameters == null) { + parameters = new ArrayList(); + } + return parameters; + } + + public void setParameters(List parameters) { + this.parameters = parameters; + } + } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java index 0824b995c1..bfbb79adb9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java @@ -13,6 +13,9 @@ public class ParameterDescriptor { @JsonProperty private String label; + @JsonProperty + private String value; + public String getKey() { return key; } @@ -36,4 +39,12 @@ public String getLabel() { public void setLabel(String label) { this.label = label; } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index 65f10f185e..d021ff5baf 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -17,6 +17,7 @@ import org.openmrs.module.reporting.common.ContentType; import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; import org.openmrs.module.reporting.evaluation.parameter.Parameter; import org.openmrs.module.reporting.report.ReportDesign; import org.openmrs.module.reporting.report.ReportDesignResource; @@ -32,12 +33,13 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; -import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; public class ReportLoader { @@ -89,26 +91,18 @@ public static void saveReportDesigns(ReportDefinition reportDefinition, List parameters = constructParameters(reportDescriptor.getParameters()); - Map mappings = constructMappings(parameters); - rd.setParameters(parameters); + rd.setParameters(constructParameters(reportDescriptor.getParameters())); if (reportDescriptor.getDatasets() != null) { for (DataSetDescriptor dataSetDescriptor : reportDescriptor.getDatasets()) { - DataSetDefinition dsd = constructDataSetDefinition(dataSetDescriptor, reportDescriptor.getPath(), parameters); - if (dsd != null) { - rd.addDataSetDefinition(dataSetDescriptor.getKey(), dsd, mappings); - } + addDataSetDefinition(rd, dataSetDescriptor, reportDescriptor.getPath()); } } return rd; @@ -119,7 +113,13 @@ public static List constructParameters(List para if (parameterDescriptors != null) { for (ParameterDescriptor parameterDescriptor : parameterDescriptors) { try { - parameters.add(new Parameter(parameterDescriptor.getKey(), parameterDescriptor.getLabel(), getParameterClass(parameterDescriptor.getType()))); + Class parameterType = getParameterClass(parameterDescriptor.getType()); + Parameter p = new Parameter(); + p.setName(parameterDescriptor.getKey()); + p.setLabel(parameterDescriptor.getLabel()); + p.setType(parameterType); + p.setDefaultValue(getParameterValue(parameterType, parameterDescriptor.getValue())); + parameters.add(p); } catch (Exception e) { throw new RuntimeException("Unable to configure parameter " + parameterDescriptor.getKey(), e); } @@ -129,43 +129,98 @@ public static List constructParameters(List para } public static Class getParameterClass(String clazz) throws ClassNotFoundException { + if (clazz == null) { + return String.class; + } if (clazz.equalsIgnoreCase("location")) { return Location.class; } else if (clazz.equalsIgnoreCase("date")) { return Date.class; } + else if (clazz.equalsIgnoreCase("text") || clazz.equalsIgnoreCase("string")) { + return String.class; + } + else if (clazz.equalsIgnoreCase("locale")) { + return Locale.class; + } else { return Context.loadClass(clazz); } } - public static Map constructMappings(List parameters) { - Map mappings = new HashMap(); - for (Parameter parameter : parameters) { - mappings.put(parameter.getName(), "${" + parameter.getName() + "}"); + public static Object getParameterValue(Class parameterType, String stringVal) { + Object ret = null; + try { + if (stringVal != null) { + if (parameterType == String.class) { + return stringVal; + } + else if (parameterType == Date.class) { + return new SimpleDateFormat("yyyy-MM-dd").parse(stringVal); + } + else if (parameterType == Locale.class) { + return new Locale(stringVal); + } + else { + throw new IllegalStateException("Unable to parse parameter values of type " + parameterType); + } + } } - return mappings; + catch (Exception e) { + throw new IllegalStateException("Unable to parse parameter value " + stringVal + " to a " + parameterType); + } + return ret; } - public static DataSetDefinition constructDataSetDefinition(DataSetDescriptor dataSetDescriptor, File path, List parameters) { + public static void addDataSetDefinition(ReportDefinition rd, DataSetDescriptor dataSetDescriptor, File path) { - DataSetDefinition dsd = null; + Mapped mappedDsd = new Mapped(); if ("sql".equalsIgnoreCase(dataSetDescriptor.getType())) { - dsd = constructSQLFileDataSetDefinition(dataSetDescriptor, path); + mappedDsd.setParameterizable(constructSQLFileDataSetDefinition(dataSetDescriptor, path)); } else { throw new RuntimeException("Unsupported data set descriptor type: " + dataSetDescriptor.getType()); } - if (parameters != null) { - for (Parameter parameter : parameters) { - dsd.addParameter(parameter); + // First add in all of the report parameters + for (Parameter reportParameter : rd.getParameters()) { + Parameter parameter = new Parameter(reportParameter); + mappedDsd.getParameterizable().addParameter(parameter); + if (parameter.getDefaultValue() != null) { + mappedDsd.addParameterMapping(parameter.getName(), parameter.getDefaultValue()); + parameter.setDefaultValue(null); + } else { + mappedDsd.addParameterMapping(parameter.getName(), "${" + parameter.getName() + "}"); } } - return dsd; + // Next, if any data set parameters specify values for report parameters, or are new parameters, add these + List datasetParameters = constructParameters(dataSetDescriptor.getParameters()); + if (datasetParameters != null) { + for (Parameter parameter : datasetParameters) { + boolean found = false; + for (Parameter existingParam : rd.getParameters()) { + if (existingParam.getName().equals(parameter.getName())) { + found = true; + if (parameter.getDefaultValue() != null) { + mappedDsd.getParameterMappings().put(existingParam.getName(), parameter.getDefaultValue()); + parameter.setDefaultValue(null); + } + } + } + if (!found) { + mappedDsd.getParameterizable().addParameter(parameter); + if (parameter.getDefaultValue() != null) { + mappedDsd.addParameterMapping(parameter.getName(), parameter.getDefaultValue()); + parameter.setDefaultValue(null); + } + } + } + } + + rd.addDataSetDefinition(dataSetDescriptor.getKey(), mappedDsd); } public static SqlFileDataSetDefinition constructSQLFileDataSetDefinition(DataSetDescriptor dataSetDescriptor, File path) { diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java index aca7c749d2..479686132f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/parameter/Parameter.java @@ -152,6 +152,21 @@ public Parameter(String name, String label, Class type) { public Parameter(String name, String label, Class type, Properties widgetConfiguration) { this(name, label, type, null, null, widgetConfiguration); } + + /** + * Initialize this Parameter with the values from an existing Parameter. This is equivalent to cloning. + * + * @param p the Parameter to clone from + */ + public Parameter(Parameter p) { + setName(p.getName()); + setLabel(p.getLabel()); + setType(p.getType()); + setCollectionType(p.getCollectionType()); + setRequired(p.isRequired()); + setDefaultValue(p.getDefaultValue()); + setWidgetConfiguration(p.getWidgetConfiguration()); + } //*********************** // INSTANCE METHODS From 4fe45815a742ff2f598bb85b0c33f0e55d4cd9b8 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 2 Jun 2021 11:04:19 -0400 Subject: [PATCH 068/143] REPORT-877: Configurable data set descriptors should support fixed parameter values - attempt to fix unit tests. --- .../config/ReportLoaderIntegrationTest.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java index 810643c9ed..0217075862 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/config/ReportLoaderIntegrationTest.java @@ -1,7 +1,6 @@ package org.openmrs.module.reporting.config; import org.hibernate.cfg.Environment; -import org.junit.Before; import org.junit.Test; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; @@ -38,8 +37,6 @@ public class ReportLoaderIntegrationTest extends BaseModuleContextSensitiveTest { public static final String appDataTestDir = "testAppDataDir"; - - private String path; @Autowired @Qualifier("reportingReportDefinitionService") ReportDefinitionService reportDefinitionService; @@ -50,22 +47,15 @@ public class ReportLoaderIntegrationTest extends BaseModuleContextSensitiveTest @Autowired BuiltInCohortDefinitionLibrary cohorts; - @Before - public void setup() { - // configure app data dir path - path = getClass().getClassLoader().getResource(appDataTestDir).getPath() + File.separator; - System.setProperty("OPENMRS_APPLICATION_DATA_DIRECTORY", path); - Properties prop = getRuntimeProperties(); - prop.setProperty(OpenmrsConstants.APPLICATION_DATA_DIRECTORY_RUNTIME_PROPERTY, path); - Context.setRuntimeProperties(prop); - } - @Override public Properties getRuntimeProperties() { Properties p = super.getRuntimeProperties(); + String path = getClass().getClassLoader().getResource(appDataTestDir).getPath() + File.separator; p.put("connection.url", p.getProperty(Environment.URL)); p.put(Environment.URL, p.getProperty(Environment.URL) + ";MVCC=TRUE"); p.put("connection.driver_class", p.getProperty(Environment.DRIVER)); + p.setProperty(OpenmrsConstants.APPLICATION_DATA_DIRECTORY_RUNTIME_PROPERTY, path); + System.setProperty("OPENMRS_APPLICATION_DATA_DIRECTORY", path); return p; } From ffc3535f7a373096615055ab725cdbd97d370e12 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 7 Jun 2021 14:18:44 +0000 Subject: [PATCH 069/143] [maven-release-plugin] prepare release 1.22.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index c9ec091f43..2143c95bae 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 6b2e2c8f7f..139b9deadd 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index fb21475624..240ae136b9 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 9ccd9ce21f..351d90c5bb 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index c1cb1cb506..9fb55e954c 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index eeb003e225..2c4db4bd4a 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 304ce3d5ed..303b529cd3 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index d16ae79b5c..47ebf3450b 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index fa5f7a8075..1086a7e350 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0-SNAPSHOT + 1.22.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.22.0 From 59a07481558e3ea7f38356305e5727e001683b76 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 7 Jun 2021 14:18:50 +0000 Subject: [PATCH 070/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 2143c95bae..b0fbb9541c 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 139b9deadd..1ec0b116a9 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 240ae136b9..61954fa2cd 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 351d90c5bb..cf32f429df 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 9fb55e954c..6bc455d00f 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 2c4db4bd4a..0db98f5508 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 303b529cd3..0b033e37ae 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 47ebf3450b..af8f29e207 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 1086a7e350..309da36077 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.22.0 + 1.23.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.22.0 + HEAD From eee5d601cc6d73de1bae0da2655220ebea23c8a5 Mon Sep 17 00:00:00 2001 From: Parth Kanakiya Date: Mon, 21 Jun 2021 16:49:17 -0700 Subject: [PATCH 071/143] C:out changes to manageReportDesigns.jsp for xss (#215) --- .../main/webapp/reports/manageReportDesigns.jsp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/omod/src/main/webapp/reports/manageReportDesigns.jsp b/omod/src/main/webapp/reports/manageReportDesigns.jsp index d7c676c528..35f172cd8b 100644 --- a/omod/src/main/webapp/reports/manageReportDesigns.jsp +++ b/omod/src/main/webapp/reports/manageReportDesigns.jsp @@ -20,7 +20,11 @@ document.location.href = '${pageContext.request.contextPath}/module/reporting/reports/renderers/editReportDesign.form?type=${design.rendererType.name}&reportDesignUuid=${design.uuid}'; }); $j('#${design.uuid}DesignRemoveLink').click(function(event){ - if (confirm('Please confirm you wish to permanantly delete ${design.name}')) { + var encodedStr = ""; + var parser = new DOMParser; + var dom = parser.parseFromString('' + encodedStr,'text/html'); + var decodedString = dom.body.textContent; + if (confirm('Please confirm you wish to permanantly delete '+decodedString)) { document.location.href='${pageContext.request.contextPath}/module/reporting/reports/deleteReportDesign.form?uuid=${design.uuid}'; } }); @@ -31,7 +35,10 @@ } ); $j('#designAddLink').click(function(event){ - document.location.href = '${pageContext.request.contextPath}/module/reporting/reports/renderers/editReportDesign.form?type=' + $j( this ).attr( 'href' ); + if($j("#rendererType").val()==="") + alert("Please select a value from Dropdown"); + else + document.location.href = '${pageContext.request.contextPath}/module/reporting/reports/renderers/editReportDesign.form?type=' + $j( this ).attr( 'href' ); }); }); @@ -57,9 +64,9 @@ - ${design.name} + - ${design.description} + ${design.reportDefinition.name} From ea7937e138ed899419c0fadd04a5546368e91e5c Mon Sep 17 00:00:00 2001 From: dbaluku Date: Thu, 24 Jun 2021 20:06:54 +0300 Subject: [PATCH 072/143] REPORT-878:Enable RenderReport Method to accept multiple values for a parameter passed in a HTTP request (#216) --- .../module/reporting/web/reports/ManageReportsController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java index d2665a7402..abdbce9106 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java @@ -250,7 +250,7 @@ public void renderReport(ModelMap model, HttpServletRequest request, HttpServlet else { List l = new ArrayList(); for (String v : parameterValues) { - l.add(WidgetUtil.parseInput(parameterValues[0], p.getType())); + l.add(WidgetUtil.parseInput(v, p.getType())); } value = l; } From 4ad29e75f0638c9cd731c909c3662824a9db93fc Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 28 Jun 2021 07:00:25 +0000 Subject: [PATCH 073/143] [maven-release-plugin] prepare release 1.23.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index b0fbb9541c..2dc288b068 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 1ec0b116a9..02d24b3dd2 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 61954fa2cd..aab77b1163 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index cf32f429df..5b06cb4380 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 6bc455d00f..9b38ba7bbe 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 0db98f5508..2f9b3d4d38 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 0b033e37ae..e7956755af 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index af8f29e207..aa8987e2b4 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 309da36077..89739a989b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0-SNAPSHOT + 1.23.0 pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.23.0 From 246976091feb4355c199fdcf3023885d83c9fd58 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 28 Jun 2021 07:00:30 +0000 Subject: [PATCH 074/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 2dc288b068..0052fcdfd8 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 02d24b3dd2..53785905e8 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index aab77b1163..57ab4807fb 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 5b06cb4380..2fae61808f 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 9b38ba7bbe..f41b549e37 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 2f9b3d4d38..3052246bac 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index e7956755af..21dd6d1324 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index aa8987e2b4..481b44f81b 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 89739a989b..f02b78abf0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.23.0 + 1.24.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -14,7 +14,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.23.0 + HEAD From 55da48075135fa056c2316566a10297b45f0f1c6 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 2 Jul 2021 08:42:24 -0400 Subject: [PATCH 075/143] Updating repository URLs to HTTPS For details on why this change is happening see this Talk post: https://talk.openmrs.org/t/maven-3-8-1-and-http-repositories/33364 If this commit causes issues, please feel free to revert --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index f02b78abf0..0f7c939cf8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,3 +1,4 @@ + 4.0.0 From a4987d06ad9b06e74f10414310cf55a885b2a97f Mon Sep 17 00:00:00 2001 From: Mark Goodrich Date: Wed, 14 Jul 2021 15:51:22 -0400 Subject: [PATCH 076/143] REPORTING-881: Sql Reports fail if generating user's name has a single quote (#218) --- .../reporting/common/SqlRunnerTest.java | 21 +++++++++++++++++++ .../module/reporting/common/SqlRunner.java | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/common/SqlRunnerTest.java diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/SqlRunnerTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/SqlRunnerTest.java new file mode 100644 index 0000000000..494ce287c2 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/SqlRunnerTest.java @@ -0,0 +1,21 @@ +package org.openmrs.module.reporting.common; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SqlRunnerTest { + + @Test + public void parseParametersIntoStatements_shouldEscapeParametersWithSingleQuotes() throws Exception { + SqlRunner sqlRunner = new SqlRunner(null); + Map parameters = new HashMap(); + parameters.put("generatedBy", "Fredrick 'Fred' Flintstone"); + List results = sqlRunner.parseParametersIntoStatements(parameters); + Assert.assertEquals("set @generatedBy='Fredrick ''Fred'' Flintstone'", results.get(0)); + } + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java index c400db030b..678e4d0263 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java @@ -10,6 +10,7 @@ package org.openmrs.module.reporting.common; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -204,7 +205,7 @@ else if (paramValue instanceof OpenmrsObject) { sqlVal = ((OpenmrsObject)paramValue).getId().toString(); } else { - sqlVal = "'" + paramValue.toString() + "'"; + sqlVal = "'" + StringEscapeUtils.escapeSql(paramValue.toString()) + "'"; } } statements.add("set @" + paramName + "=" + sqlVal); From 07e5ad1405457505d73b77dd01332b32da5ff2c0 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Mon, 20 Sep 2021 10:01:09 -0400 Subject: [PATCH 077/143] REPORT-882 - Support adding Report Processors via config descriptors (#219) --- .../reporting/config/DesignDescriptor.java | 12 +++ .../reporting/config/ProcessorDescriptor.java | 76 +++++++++++++++++++ .../module/reporting/config/ReportLoader.java | 60 ++++++++++++--- 3 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/ProcessorDescriptor.java diff --git a/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java index 4c2814da90..a8568d2d42 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java @@ -2,6 +2,7 @@ import org.codehaus.jackson.annotate.JsonProperty; +import java.util.List; import java.util.Map; public class DesignDescriptor { @@ -15,6 +16,9 @@ public class DesignDescriptor { @JsonProperty private Map properties; + @JsonProperty + private List processors; + public String getType() { return type; } @@ -38,4 +42,12 @@ public Map getProperties() { public void setProperties(Map properties) { this.properties = properties; } + + public List getProcessors() { + return processors; + } + + public void setProcessors(List processors) { + this.processors = processors; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ProcessorDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ProcessorDescriptor.java new file mode 100644 index 0000000000..a5d3b5e251 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/ProcessorDescriptor.java @@ -0,0 +1,76 @@ +package org.openmrs.module.reporting.config; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.Map; + +public class ProcessorDescriptor { + + @JsonProperty + private String name; + + @JsonProperty + private String type; + + @JsonProperty + private Boolean runOnSuccess; + + @JsonProperty + private Boolean runOnError; + + @JsonProperty + private String processorMode; + + @JsonProperty + private Map configuration; + + public ProcessorDescriptor() {} + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Boolean getRunOnSuccess() { + return runOnSuccess; + } + + public void setRunOnSuccess(Boolean runOnSuccess) { + this.runOnSuccess = runOnSuccess; + } + + public Boolean getRunOnError() { + return runOnError; + } + + public void setRunOnError(Boolean runOnError) { + this.runOnError = runOnError; + } + + public String getProcessorMode() { + return processorMode; + } + + public void setProcessorMode(String processorMode) { + this.processorMode = processorMode; + } + + public Map getConfiguration() { + return configuration; + } + + public void setConfiguration(Map configuration) { + this.configuration = configuration; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index d021ff5baf..ce5780980f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -21,8 +21,12 @@ import org.openmrs.module.reporting.evaluation.parameter.Parameter; import org.openmrs.module.reporting.report.ReportDesign; import org.openmrs.module.reporting.report.ReportDesignResource; +import org.openmrs.module.reporting.report.ReportProcessorConfiguration; import org.openmrs.module.reporting.report.definition.ReportDefinition; import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; +import org.openmrs.module.reporting.report.processor.DiskReportProcessor; +import org.openmrs.module.reporting.report.processor.EmailReportProcessor; +import org.openmrs.module.reporting.report.processor.LoggingReportProcessor; import org.openmrs.module.reporting.report.renderer.CsvReportRenderer; import org.openmrs.module.reporting.report.renderer.ReportDesignRenderer; import org.openmrs.module.reporting.report.renderer.XlsReportRenderer; @@ -41,6 +45,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Properties; public class ReportLoader { @@ -243,11 +248,11 @@ public static List constructReportDesigns(ReportDefinition reportD List reportDesigns = new ArrayList(); - // always do a default CSV design + // always do a default CSV design, if no designs are explicitly configured if (reportDescriptor.getDesigns() == null || reportDescriptor.getDesigns().size() == 0) { - DesignDescriptor defaultDesignDecsriptor = new DesignDescriptor(); - defaultDesignDecsriptor.setType("csv"); - reportDescriptor.setDesigns(Collections.singletonList(defaultDesignDecsriptor)); + DesignDescriptor defaultDesignDescriptor = new DesignDescriptor(); + defaultDesignDescriptor.setType("csv"); + reportDescriptor.setDesigns(Collections.singletonList(defaultDesignDescriptor)); } for (DesignDescriptor designDescriptor : reportDescriptor.getDesigns()) { @@ -262,18 +267,53 @@ else if (designDescriptor.getType().equalsIgnoreCase("excel") || designDescripto throw new RuntimeException("Unsupported report design type: " + designDescriptor.getType() + " for report " + reportDefinition.getName()); } - design.addPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, StringUtils.replace(reportDefinition.getName(), " ", ".").toLowerCase() + "." + - "{{ formatDate request.reportDefinition.parameterMappings.startDate \"yyyyMMdd\" }}." + - "{{ formatDate request.reportDefinition.parameterMappings.endDate \"yyyyMMdd\" }}." + - "{{ formatDate request.evaluateStartDatetime \"yyyyMMdd\" }}." + - "{{ formatDate request.evaluateStartDatetime \"HHmm\" }}"); - if (designDescriptor.getProperties() != null) { for (Map.Entry property : designDescriptor.getProperties().entrySet()) { design.addPropertyValue(property.getKey(), property.getValue()); } } + if (design.getPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, null) == null) { + design.addPropertyValue(ReportDesignRenderer.FILENAME_BASE_PROPERTY, StringUtils.replace(reportDefinition.getName(), " ", ".").toLowerCase() + "." + + "{{ formatDate request.reportDefinition.parameterMappings.startDate \"yyyyMMdd\" }}." + + "{{ formatDate request.reportDefinition.parameterMappings.endDate \"yyyyMMdd\" }}." + + "{{ formatDate request.evaluateStartDatetime \"yyyyMMdd\" }}." + + "{{ formatDate request.evaluateStartDatetime \"HHmm\" }}"); + } + + if (designDescriptor.getProcessors() != null) { + for (ProcessorDescriptor processorDescriptor : designDescriptor.getProcessors()) { + ReportProcessorConfiguration c = new ReportProcessorConfiguration(); + String type = processorDescriptor.getType(); + if ("disk".equalsIgnoreCase(type)) { + type = DiskReportProcessor.class.getName(); + } + else if ("email".equalsIgnoreCase(type)) { + type = EmailReportProcessor.class.getName(); + } + else if ("logging".equalsIgnoreCase(type)) { + type = LoggingReportProcessor.class.getName(); + } + c.setProcessorType(type); + c.setRunOnSuccess(processorDescriptor.getRunOnSuccess()); + c.setRunOnError(processorDescriptor.getRunOnError()); + c.setName(processorDescriptor.getName()); + if (processorDescriptor.getProcessorMode() != null) { + c.setProcessorMode(ReportProcessorConfiguration.ProcessorMode.valueOf(processorDescriptor.getProcessorMode())); + } + c.setReportDesign(design); + if (processorDescriptor.getConfiguration() != null) { + c.setConfiguration(new Properties()); + for (Map.Entry config : processorDescriptor.getConfiguration().entrySet()) { + String configValue = config.getValue(); + configValue = configValue.replace("{{application_data_directory}}", OpenmrsUtil.getApplicationDataDirectory()); + c.getConfiguration().setProperty(config.getKey(), configValue); + } + } + design.addReportProcessor(c); + } + } + reportDesigns.add(design); } From b1fc3a0732cc0e67a8775ca2d4bc7f6f2e214039 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Mon, 20 Sep 2021 10:47:42 -0400 Subject: [PATCH 078/143] Update POM to jfrog urls --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0f7c939cf8..33e07ce9e4 100644 --- a/pom.xml +++ b/pom.xml @@ -22,12 +22,12 @@ openmrs-repo-modules OpenMRS Modules - https://mavenrepo.openmrs.org/nexus/content/repositories/modules + https://openmrs.jfrog.io/artifactory/modules openmrs-repo-snapshots OpenMRS Snapshots - https://mavenrepo.openmrs.org/nexus/content/repositories/snapshots + https://openmrs.jfrog.io/artifactory/snapshots @@ -584,7 +584,7 @@ openmrs-repo OpenMRS Nexus Repository - https://mavenrepo.openmrs.org/nexus/content/repositories/public + https://openmrs.jfrog.io/artifactory/public @@ -592,7 +592,7 @@ openmrs-repo OpenMRS Nexus Repository - https://mavenrepo.openmrs.org/nexus/content/repositories/public + https://openmrs.jfrog.io/artifactory/public false From f125ffe3d2a8b64da9e568cc136eceee2251b8c7 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 21 Sep 2021 17:07:10 -0400 Subject: [PATCH 079/143] =?UTF-8?q?REPORT-883=20-=20Add=20new=20interface?= =?UTF-8?q?=20and=20component=20model=20for=20loading=20data=20s=E2=80=A6?= =?UTF-8?q?=20(#220)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT-883 - Add new interface and component model for loading data sets from configuration and remove hard-coding for sql-only. --- .../reporting/config/ParameterDescriptor.java | 11 ++++ .../module/reporting/config/ReportLoader.java | 59 ++++++++----------- .../config/factory/DataSetFactory.java | 24 ++++++++ .../config/factory/SqlDataSetFactory.java | 35 +++++++++++ 4 files changed, 94 insertions(+), 35 deletions(-) create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/factory/DataSetFactory.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/config/factory/SqlDataSetFactory.java diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java index bfbb79adb9..8f4f5cab94 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java @@ -16,6 +16,9 @@ public class ParameterDescriptor { @JsonProperty private String value; + @JsonProperty + private Boolean required; + public String getKey() { return key; } @@ -47,4 +50,12 @@ public String getValue() { public void setValue(String value) { this.value = value; } + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index ce5780980f..30490971d6 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -7,6 +7,7 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.io.filefilter.FileFilterUtils; import org.apache.commons.io.filefilter.TrueFileFilter; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -15,8 +16,8 @@ import org.openmrs.api.db.SerializedObject; import org.openmrs.api.db.SerializedObjectDAO; import org.openmrs.module.reporting.common.ContentType; +import org.openmrs.module.reporting.config.factory.DataSetFactory; import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; import org.openmrs.module.reporting.evaluation.parameter.Mapped; import org.openmrs.module.reporting.evaluation.parameter.Parameter; import org.openmrs.module.reporting.report.ReportDesign; @@ -124,6 +125,7 @@ public static List constructParameters(List para p.setLabel(parameterDescriptor.getLabel()); p.setType(parameterType); p.setDefaultValue(getParameterValue(parameterType, parameterDescriptor.getValue())); + p.setRequired(BooleanUtils.isTrue(parameterDescriptor.getRequired())); parameters.add(p); } catch (Exception e) { throw new RuntimeException("Unable to configure parameter " + parameterDescriptor.getKey(), e); @@ -182,12 +184,17 @@ public static void addDataSetDefinition(ReportDefinition rd, DataSetDescriptor d Mapped mappedDsd = new Mapped(); - if ("sql".equalsIgnoreCase(dataSetDescriptor.getType())) { - mappedDsd.setParameterizable(constructSQLFileDataSetDefinition(dataSetDescriptor, path)); + String factoryBeanName = dataSetDescriptor.getType(); + if ("sql".equalsIgnoreCase(factoryBeanName)) { + factoryBeanName = "sqlDataSetFactory"; } - else { + + DataSetFactory factory = Context.getRegisteredComponent(factoryBeanName, DataSetFactory.class); + if (factory == null) { throw new RuntimeException("Unsupported data set descriptor type: " + dataSetDescriptor.getType()); } + DataSetDefinition dsd = factory.constructDataSetDefinition(dataSetDescriptor, path); + mappedDsd.setParameterizable(dsd); // First add in all of the report parameters for (Parameter reportParameter : rd.getParameters()) { @@ -203,47 +210,29 @@ public static void addDataSetDefinition(ReportDefinition rd, DataSetDescriptor d // Next, if any data set parameters specify values for report parameters, or are new parameters, add these List datasetParameters = constructParameters(dataSetDescriptor.getParameters()); - if (datasetParameters != null) { - for (Parameter parameter : datasetParameters) { - boolean found = false; - for (Parameter existingParam : rd.getParameters()) { - if (existingParam.getName().equals(parameter.getName())) { - found = true; - if (parameter.getDefaultValue() != null) { - mappedDsd.getParameterMappings().put(existingParam.getName(), parameter.getDefaultValue()); - parameter.setDefaultValue(null); - } - } - } - if (!found) { - mappedDsd.getParameterizable().addParameter(parameter); + for (Parameter parameter : datasetParameters) { + boolean found = false; + for (Parameter existingParam : rd.getParameters()) { + if (existingParam.getName().equals(parameter.getName())) { + found = true; if (parameter.getDefaultValue() != null) { - mappedDsd.addParameterMapping(parameter.getName(), parameter.getDefaultValue()); + mappedDsd.getParameterMappings().put(existingParam.getName(), parameter.getDefaultValue()); parameter.setDefaultValue(null); } } } + if (!found) { + mappedDsd.getParameterizable().addParameter(parameter); + if (parameter.getDefaultValue() != null) { + mappedDsd.addParameterMapping(parameter.getName(), parameter.getDefaultValue()); + parameter.setDefaultValue(null); + } + } } rd.addDataSetDefinition(dataSetDescriptor.getKey(), mappedDsd); } - public static SqlFileDataSetDefinition constructSQLFileDataSetDefinition(DataSetDescriptor dataSetDescriptor, File path) { - - SqlFileDataSetDefinition dsd = new SqlFileDataSetDefinition(); - - File sqlFile = new File(path, dataSetDescriptor.getConfig()); - - if (sqlFile.exists()) { - dsd.setSqlFile(sqlFile.getAbsolutePath()); - } - else { - throw new RuntimeException("SQL file " + dataSetDescriptor.getConfig() + " not found"); - } - - return dsd; - } - public static List constructReportDesigns(ReportDefinition reportDefinition, ReportDescriptor reportDescriptor) { List reportDesigns = new ArrayList(); diff --git a/api/src/main/java/org/openmrs/module/reporting/config/factory/DataSetFactory.java b/api/src/main/java/org/openmrs/module/reporting/config/factory/DataSetFactory.java new file mode 100644 index 0000000000..75227fd80f --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/factory/DataSetFactory.java @@ -0,0 +1,24 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.config.factory; + +import org.openmrs.module.reporting.config.DataSetDescriptor; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; + +import java.io.File; + +/** + * Interface for providers that are capable of constructing and returning new DataSetDefinition instances from config + */ +public interface DataSetFactory { + + DataSetDefinition constructDataSetDefinition(DataSetDescriptor dataSetDescriptor, File baseConfigDir); + +} diff --git a/api/src/main/java/org/openmrs/module/reporting/config/factory/SqlDataSetFactory.java b/api/src/main/java/org/openmrs/module/reporting/config/factory/SqlDataSetFactory.java new file mode 100644 index 0000000000..327e073458 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/config/factory/SqlDataSetFactory.java @@ -0,0 +1,35 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.config.factory; + +import org.openmrs.module.reporting.config.DataSetDescriptor; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.SqlFileDataSetDefinition; +import org.springframework.stereotype.Component; + +import java.io.File; + +/** + * Builds a SqlFileDataSetDefinition from configuration + */ +@Component +public class SqlDataSetFactory implements DataSetFactory { + + public DataSetDefinition constructDataSetDefinition(DataSetDescriptor dataSetDescriptor, File baseConfigDir) { + File sqlFile = new File(baseConfigDir, dataSetDescriptor.getConfig()); + if (!sqlFile.exists()) { + throw new RuntimeException("SQL file " + dataSetDescriptor.getConfig() + " not found"); + } + SqlFileDataSetDefinition dsd = new SqlFileDataSetDefinition(); + dsd.setSqlFile(sqlFile.getAbsolutePath()); + return dsd; + } + +} From d9f4676b9d084e6633897809ddcf0ff0a67a86c8 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 23 Sep 2021 17:09:53 -0400 Subject: [PATCH 080/143] Add additional missing method. --- ...CohortsWithVaryingParametersDataSetDefinition.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java index 42441e1aa1..e7638357ff 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/CohortsWithVaryingParametersDataSetDefinition.java @@ -61,6 +61,10 @@ public void setVaryingParameters(List> varyingParameters) { this.varyingParameters = varyingParameters; } + public void addColumn(String name, String description, Mapped mappedCohortDefinition) { + getColumns().add(new Column(name, description, mappedCohortDefinition)); + } + /** * Will automatically create "straight-through" mappings for any parameters in cd, and takes name and label from * cd.name and cd.description. @@ -71,7 +75,12 @@ public void addColumn(CohortDefinition cd) { for (Parameter parameter : cd.getParameters()) { mappings.put(parameter.getName(), "${" + parameter.getName() + "}"); } - getColumns().add(new Column(cd.getName(), cd.getDescription(), new Mapped(cd, mappings))); + addColumn(new Mapped(cd, mappings)); + } + + public void addColumn(Mapped mappedCohortDefinition) { + CohortDefinition cd = mappedCohortDefinition.getParameterizable(); + addColumn(cd.getName(), cd.getDescription(), mappedCohortDefinition); } public void addVaryingParameters(Map parameterOption) { From 16a42ae02685b42849d389c2b33236103c87972a Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 24 Sep 2021 14:03:36 -0400 Subject: [PATCH 081/143] REPORT-884 - Reporting module should not load reports from config automatically in activator (#221) --- .../org/openmrs/module/reporting/ReportingConstants.java | 5 +++++ .../openmrs/module/reporting/ReportingModuleActivator.java | 6 ++++-- omod/src/main/resources/config.xml | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java b/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java index 27503d63ad..7558ce8fd2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingConstants.java @@ -50,6 +50,7 @@ public class ReportingConstants implements GlobalPropertyListener { public static final String GLOBAL_PROPERTY_DEFAULT_DATE_FORMAT = "reporting.defaultDateFormat"; public static final String GLOBAL_PROPERTY_TEST_PATIENTS_COHORT_DEFINITION = "reporting.testPatientsCohortDefinition"; public static final String GLOBAL_PROPERTY_EVALUATION_LOGGER_ENABLED = "reporting.evaluationLoggerEnabled"; + public static final String GLOBAL_PROPERTY_LOAD_REPORTS_FROM_CONFIGURATION_AT_STARTUP = "reporting.loadReportsFromConfigurationAtStartup"; public static final String DEFAULT_LOCALE_GP_NAME = "reporting.defaultLocale"; public static final List CACHED_PROPERTIES = Arrays.asList( @@ -109,6 +110,10 @@ public static final boolean GLOBAL_PROPERTY_INCLUDE_DATA_EXPORTS() { return getPropertyValueAsBoolean(GLOBAL_PROPERTY_INCLUDE_DATA_EXPORTS, false); } + public static final boolean GLOBAL_PROPERTY_LOAD_REPORTS_FROM_CONFIGURATION_AT_STARTUP() { + return getPropertyValueAsBoolean(GLOBAL_PROPERTY_LOAD_REPORTS_FROM_CONFIGURATION_AT_STARTUP, false); + } + // this property is fetched a lot, so we cache it public static final Locale GLOBAL_PROPERTY_DEFAULT_LOCALE() { if (gpCache.containsKey(DEFAULT_LOCALE_GP_NAME)) { diff --git a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java index a2172cbc47..1d6562135b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java +++ b/api/src/main/java/org/openmrs/module/reporting/ReportingModuleActivator.java @@ -36,8 +36,10 @@ public void contextRefreshed() { @Override public void started() { ReportingTimerTask.setEnabled(true); - // TODO: should this happen in context refreshed instead? - ReportLoader.loadReportsFromConfig(); + if (ReportingConstants.GLOBAL_PROPERTY_LOAD_REPORTS_FROM_CONFIGURATION_AT_STARTUP()) { + // TODO: should this happen in context refreshed instead? + ReportLoader.loadReportsFromConfig(); + } log.info("Reporting Module Started..."); } diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index 744d1eee9f..3a4e783b1d 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -148,6 +148,11 @@ false If false, will disable the built in use of the evaluation logger to log evaluation information for performance diagnostics + + reporting.loadReportsFromConfigurationAtStartup + false + If true, this will automatically load reports defined by report descriptors in .OpenMRS/configuration/reports/reportdescriptors at startup + From 7b54925e223a2321c28e81ec23f89adad93a17f2 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 29 Sep 2021 21:24:18 -0400 Subject: [PATCH 082/143] REPORT-885 - Add ability to refresh a single descriptor --- .../module/reporting/config/ReportLoader.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index 30490971d6..192e053471 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -58,13 +58,17 @@ public static final String getReportingDescriptorsConfigurationDir() { public static void loadReportsFromConfig() { for (ReportDescriptor reportDescriptor : loadReportDescriptors()) { - ReportDefinition reportDefinition = constructReportDefinition(reportDescriptor); - saveReportDefinition(reportDefinition); - List reportDesigns = constructReportDesigns(reportDefinition, reportDescriptor); - saveReportDesigns(reportDefinition, reportDesigns); + loadReportFromDescriptor(reportDescriptor); } } + public static void loadReportFromDescriptor(ReportDescriptor reportDescriptor) { + ReportDefinition reportDefinition = constructReportDefinition(reportDescriptor); + saveReportDefinition(reportDefinition); + List reportDesigns = constructReportDesigns(reportDefinition, reportDescriptor); + saveReportDesigns(reportDefinition, reportDesigns); + } + public static void saveReportDefinition(ReportDefinition reportDefinition) { ReportDefinition existing = Context.getService(ReportDefinitionService.class).getDefinitionByUuid(reportDefinition.getUuid()); From ceadfddee19b18b5e3c29dbc26da479e88b4309c Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Tue, 26 Oct 2021 00:48:55 +0300 Subject: [PATCH 083/143] Adding the 2.4 profile --- .../resources/TestingApplicationContext.xml | 5 + .../include/ReportTestDataset-openmrs-2.4.xml | 564 ++++++++++++++++++ pom.xml | 9 + 3 files changed, 578 insertions(+) create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml diff --git a/api-tests/src/test/resources/TestingApplicationContext.xml b/api-tests/src/test/resources/TestingApplicationContext.xml index 956604743b..a5c7568e14 100644 --- a/api-tests/src/test/resources/TestingApplicationContext.xml +++ b/api-tests/src/test/resources/TestingApplicationContext.xml @@ -24,6 +24,11 @@ + + + org.openmrs + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml new file mode 100644 index 0000000000..bb308ce0b9 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml @@ -0,0 +1,564 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 33e07ce9e4..540d46c3ff 100644 --- a/pom.xml +++ b/pom.xml @@ -373,6 +373,15 @@ reporting-api-2.0 + + 2.4 + + 2.4.0 + 2.4 + 1.9.13 + reporting-api-2.4 + + From 4aff5c691375a53000ea3323e84c19354a41c6c6 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Tue, 26 Oct 2021 12:17:16 +0300 Subject: [PATCH 084/143] Fixing 2.1 profile failing tests --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 540d46c3ff..c509c70635 100644 --- a/pom.xml +++ b/pom.xml @@ -358,7 +358,7 @@ 2.1 - 2.1.0 + 2.1.1 2.1 1.9.13 reporting-api-2.0 From 19b1985f546115f574c1a3e75407b8af74792d23 Mon Sep 17 00:00:00 2001 From: icrc-toliveira <70152448+icrc-toliveira@users.noreply.github.com> Date: Mon, 22 Nov 2021 21:41:13 +0000 Subject: [PATCH 085/143] REPORT-880: Added profiles for Openmrs platform 2.3 and 2.4 (#217) --- .github/workflows/maven.yml | 5 +- api-2.4/pom.xml | 2 +- api-tests-2.4/.gitignore | 1 + api-tests-2.4/pom.xml | 124 ++++ .../EvaluationProfilerTest24On.java | 97 +++ ...ncounterCohortDefinitionEvaluatorTest.java | 18 +- .../EncounterProviderDataEvaluatorTest.java | 2 +- ...EncountersForPatientDataEvaluatorTest.java | 11 +- ...peatPerTimePeriodDataSetEvaluatorTest.java | 8 +- .../evaluation/EvaluationProfilerTest.java | 9 +- .../test/OpenmrsVersionTestListener.java | 37 ++ .../reporting/test/RequiresVersion.java | 25 + .../resources/TestingApplicationContext.xml | 4 +- ...tTestDataset-encounter-before-midnight.xml | 4 + .../include/ReportTestDataset-openmrs-2.3.xml | 564 ++++++++++++++++++ .../querybuilder/HqlQueryBuilder.java | 9 +- pom.xml | 37 +- 17 files changed, 921 insertions(+), 36 deletions(-) create mode 100644 api-tests-2.4/.gitignore create mode 100644 api-tests-2.4/pom.xml create mode 100644 api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/test/OpenmrsVersionTestListener.java create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/test/RequiresVersion.java create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-encounter-before-midnight.xml create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8d2315028f..5cacb8057a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -14,6 +14,7 @@ jobs: matrix: platform: [ ubuntu-latest ] java-version: [ 8 ] + profile: [ 1.10, 1.11, 1.12, 2.0, 2.1, 2.2, 2.3, 2.4 ] runs-on: ${{ matrix.platform }} env: @@ -33,8 +34,6 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - name: Install dependencies - run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml - name: Build with Maven - run: mvn test --batch-mode --file pom.xml + run: mvn clean install -P ${{ matrix.profile }} --batch-mode --show-version --file pom.xml diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index f41b549e37..dc6d68f430 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -13,7 +13,7 @@ 2.4 api project for reporting - 2.4.0-alpha + 2.4.0 diff --git a/api-tests-2.4/.gitignore b/api-tests-2.4/.gitignore new file mode 100644 index 0000000000..ea8c4bf7f3 --- /dev/null +++ b/api-tests-2.4/.gitignore @@ -0,0 +1 @@ +/target diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml new file mode 100644 index 0000000000..45e033599c --- /dev/null +++ b/api-tests-2.4/pom.xml @@ -0,0 +1,124 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.24.0-SNAPSHOT + + + reporting-api-tests-2.4 + jar + reporting API Tests for 2.4+ + API tests for reporting + + + + org.openmrs.module + reporting-api + ${project.parent.version} + + + org.openmrs.module + reporting-api + ${project.parent.version} + tests + + + javassist + javassist + + + + + org.openmrs.module + ${reportingApiConditionalArtifactId} + ${project.parent.version} + + + org.openmrs.module + reporting-api-tests + ${project.parent.version} + test-jar + test + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + + + javassist + javassist + + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + tests + + + javassist + javassist + + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + + + javassist + javassist + + + + + org.openmrs.web + openmrs-web + ${openMRSVersion} + + + + + + + src/main/resources + true + + + + + src/test/resources + true + + **/*.xml + **/*.txt + **/*.properties + + + + src/test/resources + false + + **/*.xml + **/*.txt + **/*.properties + + + + + + + ${project.parent.artifactId} + ${project.parent.name} + ${project.parent.version} + ${project.parent.groupId}.${project.parent.artifactId} + + + diff --git a/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java b/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java new file mode 100644 index 0000000000..5d98991313 --- /dev/null +++ b/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java @@ -0,0 +1,97 @@ +package org.openmrs.module.reporting.evaluation; + +import java.util.List; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.config.AppenderRef; +import org.apache.logging.log4j.core.config.Configuration; +import org.apache.logging.log4j.core.config.LoggerConfig; +import org.apache.logging.log4j.core.layout.PatternLayout; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; +import org.openmrs.module.reporting.indicator.CohortIndicator; +import org.openmrs.module.reporting.indicator.service.IndicatorService; +import org.openmrs.module.reporting.test.OpenmrsVersionTestListener; +import org.openmrs.module.reporting.test.RequiresVersion; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.util.MemoryAppender; +import org.openmrs.util.OpenmrsUtil; +import org.springframework.test.context.TestExecutionListeners; + +/** + * Tests for {@link EvaluationProfiler} + */ +@TestExecutionListeners(OpenmrsVersionTestListener.class) +@RequiresVersion("2.4.* - 2.*") +public class EvaluationProfilerTest24On extends BaseModuleContextSensitiveTest { + + protected EvaluationProfiler profiler1, profiler2; + + private static MemoryAppender appender; + + @BeforeClass + public static void beforeClass() { + appender = OpenmrsUtil.getMemoryAppender(); + + if (appender == null) { + LoggerContext context = (LoggerContext) LogManager.getContext(false); + Configuration config = context.getConfiguration(); + + appender = MemoryAppender.newBuilder().setName("MEMORY_APPENDER").setLayout(PatternLayout.createDefaultLayout()) + .setConfiguration(config).build(); + appender.start(); + + config.addAppender(appender); + + AppenderRef appenderRef = AppenderRef.createAppenderRef("MEMORY_APPENDER", Level.ALL, null); + LoggerConfig loggerConfig = LoggerConfig.createLogger(false, Level.ALL, EvaluationProfiler.class.getName(), null, + new AppenderRef[] { appenderRef }, null, config, null); + loggerConfig.addAppender(appender, Level.ALL, null); + config.addLogger(EvaluationProfiler.class.getName(), loggerConfig); + context.updateLoggers(); + } + + } + + @AfterClass + public static void afterClass() { + ((LoggerContext) LogManager.getContext()).updateLoggers(); + } + + /** + * Setup each test by configuring AOP on the relevant services and logging for the profiler class + */ + @Before + public void setup() { + profiler1 = new EvaluationProfiler(new EvaluationContext()); + profiler2 = new EvaluationProfiler(new EvaluationContext()); + } + + @Test + public void integration() throws EvaluationException { + GenderCohortDefinition males = new GenderCohortDefinition(); + males.setName("males"); + males.setMaleIncluded(true); + + CohortIndicator count = new CohortIndicator(); // No name, log message should use "?" + count.setCohortDefinition(males, ""); + + Context.getService(IndicatorService.class).evaluate(count, null); + + List split = appender.getLogLines(); + Assert.assertEquals(6, split.size()); + Assert.assertTrue(split.get(0).contains("EVALUATION_STARTED")); + Assert.assertTrue(split.get(1).contains(">")); + Assert.assertTrue(split.get(1).contains("CohortIndicator")); + Assert.assertTrue(split.get(2).contains(">>")); + Assert.assertTrue(split.get(2).contains("GenderCohortDefinition[males]")); + Assert.assertTrue(split.get(5).contains("EVALUATION_COMPLETED")); + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java index cc6d521c7a..8479486659 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java @@ -241,8 +241,8 @@ public void evaluate_shouldNotReturnVoidedPatients() throws Exception { public void evaluate_shouldFindPatientsWithEncountersOnTheOnOrBeforeDateIfPassedInTimeIsAtMidnight() throws Exception { EncounterService es = Context.getEncounterService(); Encounter enc = es.getEncounter(3); - final Integer patentId = 7; - Assert.assertEquals(patentId, enc.getPatient().getPatientId());//sanity check + final Integer patientId = 7; + Assert.assertEquals(patientId, enc.getPatient().getPatientId());//sanity check enc.setEncounterDatetime(DateUtil.getDateTime(2005, 8, 1, 11, 0, 0, 0)); es.saveEncounter(enc); Context.flushSession();//because the query will compare with the value in the DB @@ -250,7 +250,7 @@ public void evaluate_shouldFindPatientsWithEncountersOnTheOnOrBeforeDateIfPassed EncounterCohortDefinition cd = new EncounterCohortDefinition(); cd.setOnOrBefore(DateUtil.getDateTime(2005, 8, 1)); Cohort c = Context.getService(CohortDefinitionService.class).evaluate(cd, null); - Assert.assertTrue(c.contains(patentId)); + Assert.assertTrue(c.contains(patientId)); } /** @@ -260,17 +260,15 @@ public void evaluate_shouldFindPatientsWithEncountersOnTheOnOrBeforeDateIfPassed @Verifies(value = "should find patients with encounters created on the specified date if passed in time is at midnight", method = "evaluate(CohortDefinition,EvaluationContext)") public void evaluate_shouldFindPatientsWithEncountersCreatedOnTheSpecifiedDateIfPassedInTimeIsAtMidnight() throws Exception { + executeDataSet(XML_DATASET_PATH + "ReportTestDataset-encounter-before-midnight.xml"); EncounterService es = Context.getEncounterService(); - Encounter enc = es.getEncounter(3); - final Integer patentId = 7; - Assert.assertEquals(patentId, enc.getPatient().getPatientId()); - enc.setDateCreated(DateUtil.getDateTime(2005, 8, 1, 11, 0, 0, 0)); - es.saveEncounter(enc); - Context.flushSession(); + Encounter enc = es.getEncounter(13); + final Integer patientId = 7; + Assert.assertEquals(patientId, enc.getPatient().getPatientId()); EncounterCohortDefinition cd = new EncounterCohortDefinition(); cd.setCreatedOnOrBefore(DateUtil.getDateTime(2005, 8, 1)); Cohort c = Context.getService(CohortDefinitionService.class).evaluate(cd, null); - Assert.assertTrue(c.contains(patentId)); + Assert.assertTrue(c.contains(patientId)); } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java index 1d2e5cd9fd..5b347200b9 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncounterProviderDataEvaluatorTest.java @@ -192,7 +192,7 @@ public void shouldIgnoredVoidedEncounterProviders() throws Exception { public void shouldFailIfEncounterRoleParameterSetToAnotherType() throws Exception { EncounterProviderDataDefinition d = new EncounterProviderDataDefinition(); - d.setEncounterRole(new User()); + d.setEncounterRole(new EncounterRole()); d.setSingleProvider(false); EncounterEvaluationContext encounterEvaluationContext = new EncounterEvaluationContext(); diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java index 8fe280df50..e7ce440b90 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/encounter/evaluator/EncountersForPatientDataEvaluatorTest.java @@ -9,6 +9,8 @@ */ package org.openmrs.module.reporting.data.encounter.evaluator; +import org.databene.benerator.util.SimpleRandom; +import org.joda.time.LocalDate; import org.junit.Test; import org.openmrs.Cohort; import org.openmrs.Encounter; @@ -19,6 +21,7 @@ import org.openmrs.VisitType; import org.openmrs.api.context.Context; import org.openmrs.contrib.testdata.TestDataManager; +import org.openmrs.contrib.testdata.builder.PatientBuilder; import org.openmrs.module.reporting.data.patient.EvaluatedPatientData; import org.openmrs.module.reporting.data.patient.definition.EncountersForPatientDataDefinition; import org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition; @@ -52,7 +55,13 @@ public void shouldReturnEncountersInActiveVisit() throws Exception { Context.getLocationService().saveLocation(location); EvaluationContext context = new EvaluationContext(); - Patient patient = data.randomPatient().save(); + PatientBuilder patientBuilder = data.randomPatient(); + + LocalDate visitDate = LocalDate.parse("2013-10-01"); + int minimumAge = LocalDate.now().getYear() - visitDate.getYear() + 1; + + patientBuilder.age(SimpleRandom.randomInt(minimumAge, 90)); + Patient patient = patientBuilder.save(); // add an older closed visit Visit v1 = data.visit().patient(patient).visitType(visitType).started("2013-10-01 09:30:00").stopped("2013-10-03 09:30:00").location(location).save(); Encounter e1 = data.randomEncounter().encounterType(encounterType).visit(v1).patient(patient).encounterDatetime("2013-10-01 10:30:00").location(location).save(); diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java index eb6a55594c..41e2df6356 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java @@ -98,7 +98,7 @@ public void testEvaluate() throws Exception { // verify we delegated as expected - verify(service).evaluate(argThat(new ArgumentMatcher() { + verify(service).evaluate((DataSetDefinition) argThat(new ArgumentMatcher() { @Override public boolean matches(Object argument) { MultiParameterDataSetDefinition actualDelegate = (MultiParameterDataSetDefinition) argument; @@ -138,7 +138,7 @@ public void testEvaluateCoversWholeEndDay() throws Exception { // verify we delegated as expected - verify(service).evaluate(argThat(new ArgumentMatcher() { + verify(service).evaluate((DataSetDefinition) argThat(new ArgumentMatcher() { @Override public boolean matches(Object argument) { MultiParameterDataSetDefinition actualDelegate = (MultiParameterDataSetDefinition) argument; @@ -183,7 +183,7 @@ public void testEvaluateAddingTime() throws Exception { // verify we delegated as expected - verify(service).evaluate(argThat(new ArgumentMatcher() { + verify(service).evaluate((DataSetDefinition) argThat(new ArgumentMatcher() { @Override public boolean matches(Object argument) { MultiParameterDataSetDefinition actualDelegate = (MultiParameterDataSetDefinition) argument; @@ -238,7 +238,7 @@ public void testEvaluateWithMoreParameters() throws Exception { // verify we delegated as expected - verify(service).evaluate(argThat(new ArgumentMatcher() { + verify(service).evaluate((DataSetDefinition) argThat(new ArgumentMatcher() { @Override public boolean matches(Object argument) { MultiParameterDataSetDefinition actualDelegate = (MultiParameterDataSetDefinition) argument; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java index 4278709a09..39192f318b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java @@ -9,6 +9,8 @@ */ package org.openmrs.module.reporting.evaluation; +import static org.junit.Assume.assumeTrue; + import org.apache.log4j.Appender; import org.apache.log4j.Level; import org.apache.log4j.LogManager; @@ -23,7 +25,10 @@ import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.indicator.CohortIndicator; import org.openmrs.module.reporting.indicator.service.IndicatorService; +import org.openmrs.module.reporting.test.OpenmrsVersionTestListener; +import org.openmrs.module.reporting.test.RequiresVersion; import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.springframework.test.context.TestExecutionListeners; import java.io.StringWriter; import java.util.ArrayList; @@ -33,6 +38,8 @@ /** * Tests for {@link EvaluationProfiler} */ +@TestExecutionListeners(OpenmrsVersionTestListener.class) +@RequiresVersion("1.* - 2.3.*") public class EvaluationProfilerTest extends BaseModuleContextSensitiveTest { protected EvaluationProfiler profiler1, profiler2; @@ -91,4 +98,4 @@ public void integration() throws EvaluationException { Assert.assertTrue(split[2].contains("GenderCohortDefinition[males]")); Assert.assertTrue(split[5].contains("EVALUATION_COMPLETED")); } -} \ No newline at end of file +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/test/OpenmrsVersionTestListener.java b/api-tests/src/test/java/org/openmrs/module/reporting/test/OpenmrsVersionTestListener.java new file mode 100644 index 0000000000..0beb820231 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/test/OpenmrsVersionTestListener.java @@ -0,0 +1,37 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.test; + +import org.apache.commons.lang3.StringUtils; +import org.junit.Assume; +import org.openmrs.module.ModuleUtil; +import org.openmrs.util.OpenmrsConstants; +import org.springframework.test.context.TestContext; +import org.springframework.test.context.support.AbstractTestExecutionListener; + +public class OpenmrsVersionTestListener extends AbstractTestExecutionListener { + + @Override + public void beforeTestClass(TestContext testContext) { + Class testClass = testContext.getTestClass(); + + RequiresVersion requiresVersionAnnotation = (RequiresVersion) testClass.getAnnotation(RequiresVersion.class); + + if (requiresVersionAnnotation == null || StringUtils.isBlank(requiresVersionAnnotation.value())) { + return; + } + + if (!ModuleUtil.matchRequiredVersions(OpenmrsConstants.OPENMRS_VERSION, + requiresVersionAnnotation.value())) { + // silly hack to work with JUnit 4.11 where the AssumptionViolationException is not exposed as a public class + Assume.assumeTrue(false); + } + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/test/RequiresVersion.java b/api-tests/src/test/java/org/openmrs/module/reporting/test/RequiresVersion.java new file mode 100644 index 0000000000..6bbbe6cad2 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/test/RequiresVersion.java @@ -0,0 +1,25 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.test; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface RequiresVersion { + + String value(); + +} diff --git a/api-tests/src/test/resources/TestingApplicationContext.xml b/api-tests/src/test/resources/TestingApplicationContext.xml index a5c7568e14..a8b7bd4391 100644 --- a/api-tests/src/test/resources/TestingApplicationContext.xml +++ b/api-tests/src/test/resources/TestingApplicationContext.xml @@ -20,9 +20,7 @@ classpath:reporting-hibernate.cfg.xml - - - + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-encounter-before-midnight.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-encounter-before-midnight.xml new file mode 100644 index 0000000000..d9149a17d7 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-encounter-before-midnight.xml @@ -0,0 +1,4 @@ + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml new file mode 100644 index 0000000000..bb308ce0b9 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml @@ -0,0 +1,564 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java index 92d27e0b2b..4a858ebae1 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java @@ -454,10 +454,11 @@ public List getColumns(DbSessionFactory sessionFactory) { Query q = buildQuery(sessionFactory); String[] returnAliases = q.getReturnAliases(); Type[] returnTypes = q.getReturnTypes(); - for (int i=0; ireporting-api-2.0 - - 2.4 - - 2.4.0 - 2.4 - 1.9.13 - reporting-api-2.4 - + + 2.3 + + 2.3.0 + 2.3 + 1.9.13 + reporting-api-2.0 + + + + 2.4 + + api + api-1.9 + api-1.10 + api-2.0 + api-2.2 + api-2.4 + api-tests + api-tests-2.4 + omod + + + + 2.4.1 + 2.4 + 1.9.13 + reporting-api-2.4 + From a47a7148e778c828a15904fc0c60f44e5831d335 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Nov 2021 00:50:24 +0300 Subject: [PATCH 086/143] Bump jackson-databind from 2.9.10.7 to 2.9.10.8 (#222) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.7 to 2.9.10.8. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a0f083063..1ba576a311 100644 --- a/pom.xml +++ b/pom.xml @@ -294,7 +294,7 @@ com.fasterxml.jackson.core jackson-databind - 2.9.10.7 + 2.9.10.8 com.fasterxml.jackson.dataformat From 2f2492fbf8b6cd8349bfa448db88bc5e152915fd Mon Sep 17 00:00:00 2001 From: IsaacLin <52143432+isaaclin-artist@users.noreply.github.com> Date: Sat, 4 Dec 2021 01:57:20 +0800 Subject: [PATCH 087/143] REPORT-492: Multiple stored XSS via Dimension Name and Descriptions (#180) --- .../portlet/ParameterPortletFormController.java | 6 ++++++ .../ParameterizablePortletFormController.java | 5 +++-- omod/src/main/webapp/indicators/manageDimensions.jsp | 6 ++++-- omod/src/main/webapp/portlets/parameter.jsp | 12 ++++++++---- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java index 24b3416e22..89f0221c48 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java @@ -24,6 +24,7 @@ import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; import org.openmrs.module.reporting.evaluation.parameter.ParameterizableUtil; import org.openmrs.web.WebConstants; +import org.openmrs.web.WebUtil; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.util.StringUtils; @@ -55,6 +56,11 @@ public String saveParameter(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="widgetConfiguration") String widgetConfiguration, @RequestParam(required=false, value="shortcut") String shortcut ) { + + currentName = WebUtil.escapeHTML(currentName); + newName = WebUtil.escapeHTML(newName); + label = WebUtil.escapeHTML(label); + widgetConfiguration = WebUtil.escapeHTML(widgetConfiguration); if (shortcut != null) { if (shortcut.equals("date")) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java index 3371ee9fef..cd1e55b462 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java @@ -18,6 +18,7 @@ import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; import org.openmrs.module.reporting.evaluation.parameter.ParameterizableUtil; import org.openmrs.web.WebConstants; +import org.openmrs.web.WebUtil; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; @@ -62,8 +63,8 @@ public String saveBaseParameterizable(ModelMap model, HttpServletRequest request throw new IllegalArgumentException("Cannot instantiate a new " + type, e); } } - p.setName(name); - p.setDescription(description); + p.setName(WebUtil.escapeHTML(name)); + p.setDescription(WebUtil.escapeHTML(description)); p = ParameterizableUtil.saveParameterizable(p); if (StringUtils.isNotEmpty(successUrl)) { diff --git a/omod/src/main/webapp/indicators/manageDimensions.jsp b/omod/src/main/webapp/indicators/manageDimensions.jsp index 272b8e81d9..45f5b9464a 100644 --- a/omod/src/main/webapp/indicators/manageDimensions.jsp +++ b/omod/src/main/webapp/indicators/manageDimensions.jsp @@ -59,11 +59,13 @@ - ${dimension.name} + - ${dimension.description} + + + diff --git a/omod/src/main/webapp/portlets/parameter.jsp b/omod/src/main/webapp/portlets/parameter.jsp index 7766118761..84198e0f86 100644 --- a/omod/src/main/webapp/portlets/parameter.jsp +++ b/omod/src/main/webapp/portlets/parameter.jsp @@ -135,15 +135,19 @@ - ${p.name} - ${p.label} + + + + + + - ${p.collectionType.simpleName}<${p.type.simpleName}> + < >; - ${p.type.simpleName} + From b30da8311beb14d2779cfae3ac90005e8d807ccd Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Fri, 28 Jan 2022 16:01:04 +0300 Subject: [PATCH 088/143] REPORT-886 liquibase.util.StringUtils does not exist on platform 2.6 --- .../querybuilder/SqlQueryBuilder.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java index 0fcd38dbed..c944e986f3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java @@ -28,8 +28,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; - -import liquibase.util.StringUtils; +import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -73,10 +72,26 @@ public SqlQueryBuilder(String sql, Map parameters) { //***** INSTANCE METHODS ***** public SqlQueryBuilder append(String clause) { - clause = StringUtils.stripComments(clause); + clause = stripComments(clause); queryClauses.add(clause); return this; } + + /** + * Searches through a String which contains SQL code and strips out + * any comments that are between \/**\/ or anything that matches + * SP--SP\n (to support the ANSI standard commenting of -- + * at the end of a line). + * + * Copied from liquibase.util.StringUtils + * + * @return The String without the comments in + */ + private static String stripComments(String multiLineSQL) { + String strippedSingleLines = Pattern.compile("(.*?)\\s*\\-\\-.*\n").matcher(multiLineSQL).replaceAll("$1\n"); + strippedSingleLines = Pattern.compile("(.*?)\\s*\\-\\-.*$").matcher(strippedSingleLines).replaceAll("$1\n"); + return Pattern.compile("/\\*.*?\\*/", Pattern.DOTALL).matcher(strippedSingleLines).replaceAll("").trim(); + } public SqlQueryBuilder addParameter(String parameterName, Object parameterValue) { getParameters().put(parameterName, parameterValue); From d7e39c4e080f9e4d959552aa8bb480fd274c37fb Mon Sep 17 00:00:00 2001 From: pwargulak Date: Tue, 8 Mar 2022 14:54:15 +0100 Subject: [PATCH 089/143] REPORT-870: Increased size of ReportDesignResource.contentType DB column (#227) - Increased reporting_report_design_resource.content_type to varchar(100), so it can fir the XLSX content type value --- api/src/main/resources/liquibase.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index 4d87074624..7f3e1a0e9d 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -623,4 +623,17 @@ + + + + + + Update data type of content_type column from reporting_report_design_resource table + + + + From 81269ae84eb558962602decd02ccad0d58daf5c2 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Tue, 22 Mar 2022 23:22:04 +0300 Subject: [PATCH 090/143] REPORT-887 Fix NPE for null DefinitionLibrary.getKeyPrefix() --- .../reporting/definition/library/BaseDefinitionLibrary.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java index 017938dc0e..b76231eb8a 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/library/BaseDefinitionLibrary.java @@ -39,7 +39,11 @@ public abstract class BaseDefinitionLibrary implements Def public abstract String getKeyPrefix(); public T getDefinition(String key) { - String lookFor = key.startsWith(getKeyPrefix()) ? key.substring(getKeyPrefix().length()) : key; + String lookFor = key; + String keyPrefix = getKeyPrefix(); + if (keyPrefix != null) { + lookFor = key.startsWith(keyPrefix) ? key.substring(keyPrefix.length()) : key; + } return findAndInvokeMethod(lookFor); } From 411f348e6be624064222267e55ce157d86df8f35 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 5 Apr 2022 20:10:05 +0000 Subject: [PATCH 091/143] [maven-release-plugin] prepare release 1.24.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 0052fcdfd8..bfddd5f61f 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 53785905e8..04971592ca 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 57ab4807fb..a9be26e897 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 2fae61808f..ce7297b85b 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index dc6d68f430..489fbcf106 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 3052246bac..b2b5d7cf81 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 21dd6d1324..5ad3f09543 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 481b44f81b..f40b83dc1a 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 1ba576a311..ae94a4da73 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.24.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.24.0 From e56d4d3bb7c4a7ef22629bc825d3692fd4b72253 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 5 Apr 2022 20:10:07 +0000 Subject: [PATCH 092/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index bfddd5f61f..fd70b46f4c 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 04971592ca..81c8913e55 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index a9be26e897..32eafbdb7a 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index ce7297b85b..9841020e39 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 489fbcf106..8c62b6fc9a 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index b2b5d7cf81..ae9fd5fa79 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 5ad3f09543..addb9625a1 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index f40b83dc1a..6f2744d912 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index ae94a4da73..661228f645 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0 + 1.25.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.24.0 + HEAD From 218061ca108b7946cd1dfcfabbbd68c485916780 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Mon, 2 May 2022 12:44:38 +0300 Subject: [PATCH 093/143] REPORT-888 - Add MariaDb into changeSet Entries (#232) Co-authored-by: Amos Laboso --- api/src/main/resources/liquibase.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index 7f3e1a0e9d..c9e9c06bcb 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -56,7 +56,8 @@ - + + 8:53ee2581fae69de6011402f9ccf56cdd @@ -89,7 +90,8 @@ - + + 8:376812e41a0a69544e5d3a03f3a99c7f alter table reporting_report_design modify report_definition_uuid char(38) not null; From 98facc79b6e70b7c74d4fe4dc6597b733c014b78 Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Mon, 2 May 2022 13:11:37 +0300 Subject: [PATCH 094/143] Bump parent.version to 1.25.0-SNAPSHOT (#233) --- api-tests-2.4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml index 45e033599c..427edda2c9 100644 --- a/api-tests-2.4/pom.xml +++ b/api-tests-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.24.0-SNAPSHOT + 1.25.0-SNAPSHOT reporting-api-tests-2.4 From 1656effb2638aaaa82924ac2707b6c93cc1962b2 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Tue, 7 Jun 2022 23:02:59 +0300 Subject: [PATCH 095/143] LUI-189 Include suffix in controller urls --- ...CompositionCohortDefinitionController.java | 6 ++--- .../ManageCohortDefinitionsController.java | 6 ++--- .../SqlCohortDefinitionController.java | 6 ++--- .../web/controller/AjaxController.java | 2 +- .../web/controller/DashboardController.java | 2 +- .../EditAnnotatedDefinitionController.java | 4 ++-- .../GetMappedAsStringController.java | 2 +- ...InvalidSerializedDefinitionController.java | 12 +++++----- .../ManageDefinitionsController.java | 10 ++++----- .../ManageIndicatorsController.java | 4 ++-- .../QueryParameterFormController.java | 2 +- .../RenderLogicDataSetController.java | 2 +- .../RenderReportFormController.java | 2 +- .../controller/ReportDashboardController.java | 2 +- ...sitionPatientDataDefinitionController.java | 6 ++--- .../controller/SqlDefinitionController.java | 6 ++--- .../MappedPropertyPortletFormController.java | 4 ++-- .../ParameterPortletFormController.java | 4 ++-- .../ParameterizablePortletFormController.java | 2 +- .../portlet/ReportDesignFormController.java | 4 ++-- .../ReportProcessorFormController.java | 4 ++-- .../web/datasets/CohortDataSetEditor.java | 2 +- ...ortIndicatorAndDimensionDataSetEditor.java | 8 +++---- .../web/datasets/LogicDataSetEditor.java | 4 ++-- .../datasets/ManageDatasetsController.java | 6 ++--- .../datasets/MultiParameterDataSetEditor.java | 10 ++++----- .../web/datasets/PatientDataSetEditor.java | 22 +++++++++---------- .../web/datasets/SqlDataSetEditor.java | 6 ++--- ...itCohortDefinitionDimensionController.java | 4 ++-- .../ManageDimensionsController.java | 4 ++-- .../web/reports/CurrentReportController.java | 2 +- .../web/reports/LogicReportController.java | 4 ++-- .../ManageReportQueuePortletController.java | 2 +- .../web/reports/ManageReportsController.java | 16 +++++++------- .../ManageScheduledReportsController.java | 2 +- .../PeriodIndicatorReportController.java | 8 +++---- .../reporting/web/reports/ReportEditor.java | 2 +- .../web/reports/ReportHistoryController.java | 16 +++++++------- 38 files changed, 105 insertions(+), 105 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java index 838e9f2156..5dc387a09b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/CompositionCohortDefinitionController.java @@ -23,7 +23,7 @@ @Controller public class CompositionCohortDefinitionController { - @RequestMapping("/module/reporting/cohorts/compositionCohortDefinition") + @RequestMapping("/module/reporting/cohorts/compositionCohortDefinition.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid, @RequestParam(value="copyFromUuid", required=false) String copyFromUuid) { @@ -40,7 +40,7 @@ public void showForm(ModelMap model, } } - @RequestMapping("/module/reporting/cohorts/compositionCohortDefinitionSetComposition") + @RequestMapping("/module/reporting/cohorts/compositionCohortDefinitionSetComposition.form") public String setComposition(@RequestParam("uuid") String uuid, @RequestParam("compositionString") String compositionString) { CohortDefinition def = Context.getService(CohortDefinitionService.class).getDefinitionByUuid(uuid); @@ -57,7 +57,7 @@ public String setComposition(@RequestParam("uuid") String uuid, * @param uuid * @return */ - @RequestMapping("/module/reporting/cohorts/compositionCohortDefinitionClone") + @RequestMapping("/module/reporting/cohorts/compositionCohortDefinitionClone.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value="description", required=false) String description, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java index 93c7dba11b..98b05d9c57 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/ManageCohortDefinitionsController.java @@ -54,7 +54,7 @@ public CohortDefinition getCohortDefinition(@RequestParam(required = false, valu /** * Basically acts as the formBackingObject() method for saving a CohortDefinition. */ - @RequestMapping("/module/reporting/cohorts/editCohortDefinition") + @RequestMapping("/module/reporting/cohorts/editCohortDefinition.form") public String editCohortDefinition(ModelMap model, @ModelAttribute("cohortDefinition") CohortDefinition cohortDefinition) { addPropertiesToModel(model, cohortDefinition); return "/module/reporting/cohorts/cohortDefinitionEditor"; @@ -63,7 +63,7 @@ public String editCohortDefinition(ModelMap model, @ModelAttribute("cohortDefini /** * Saves a cohort definition. */ - @RequestMapping("/module/reporting/cohorts/saveCohortDefinition") + @RequestMapping("/module/reporting/cohorts/saveCohortDefinition.form") @SuppressWarnings("unchecked") public String saveCohortDefinition(@ModelAttribute("cohortDefinition") CohortDefinition cohortDefinition, BindingResult bindingResult, ModelMap model, HttpServletRequest request) { @@ -132,7 +132,7 @@ public String saveCohortDefinition(@ModelAttribute("cohortDefinition") CohortDef * @return * @throws EvaluationException */ - @RequestMapping("/module/reporting/cohorts/evaluateCohortDefinition") + @RequestMapping("/module/reporting/cohorts/evaluateCohortDefinition.form") public String evaluateCohortDefinition(@RequestParam(required = false, value = "uuid") String uuid, @RequestParam(required = false, value = "type") Class type, ModelMap model) throws EvaluationException { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java index 547378ff5a..b55b15dda8 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/cohorts/SqlCohortDefinitionController.java @@ -29,7 +29,7 @@ @Controller public class SqlCohortDefinitionController { - @RequestMapping("/module/reporting/cohorts/sqlCohortDefinition") + @RequestMapping("/module/reporting/cohorts/sqlCohortDefinition.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid, @RequestParam(value="copyFromUuid", required=false) String copyFromUuid) { @@ -47,7 +47,7 @@ public void showForm(ModelMap model, } } - @RequestMapping("/module/reporting/cohorts/sqlCohortDefinitionAssignQueryString") + @RequestMapping("/module/reporting/cohorts/sqlCohortDefinitionAssignQueryString.form") public String saveQueryString( HttpSession httpSession, WebRequest webRequest, @@ -76,7 +76,7 @@ public String saveQueryString( * Copies the SQL cohort definition with the given uuid into another one with the same * parameters and searches, but blank name/description and SQL string */ - @RequestMapping("/module/reporting/cohorts/sqlCohortDefinitionClone") + @RequestMapping("/module/reporting/cohorts/sqlCohortDefinitionClone.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value="description", required=false) String description, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java index 57d84817af..e623ae52cb 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/AjaxController.java @@ -27,7 +27,7 @@ @Controller public class AjaxController { - @RequestMapping("/module/reporting/ajax/getRenderingModes") + @RequestMapping("/module/reporting/ajax/getRenderingModes.form") public String getRenderingModes(Model model, @RequestParam("reportDefinitionUuid") String reportUuid, @RequestParam(value="includeInteractiveRenderers", required=false) Boolean includeInteractive, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java index 6f0f387efb..e78957dcf5 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/DashboardController.java @@ -19,7 +19,7 @@ @Controller public class DashboardController { - @RequestMapping("/module/reporting/dashboard/index") + @RequestMapping("/module/reporting/dashboard/index.form") public void showDashboard() { } diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java index 68d9c0de36..46d485bd29 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/EditAnnotatedDefinitionController.java @@ -61,7 +61,7 @@ public Definition getDefinition(@RequestParam(required = false, value = "uuid") /** * Basically acts as the formBackingObject() method for saving a CohortDefinition. */ - @RequestMapping("/module/reporting/definition/editAnnotatedDefinition") + @RequestMapping("/module/reporting/definition/editAnnotatedDefinition.form") public String editAnnotatedDefinition(ModelMap model, @RequestParam(required = true, value = "parentType") Class parentType, @ModelAttribute("definition") Definition definition) { @@ -73,7 +73,7 @@ public String editAnnotatedDefinition(ModelMap model, /** * Saves a cohort definition. */ - @RequestMapping("/module/reporting/definition/saveAnnotatedDefinition") + @RequestMapping("/module/reporting/definition/saveAnnotatedDefinition.form") @SuppressWarnings({"unchecked", "rawtypes"}) public String saveAnnotatedDefinition(@RequestParam(required = true, value = "parentType") Class parentType, @ModelAttribute("definition") Definition definition, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java index dd03e45cab..0c8876d271 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/GetMappedAsStringController.java @@ -36,7 +36,7 @@ public class GetMappedAsStringController { private static Log log = LogFactory.getLog(GetMappedAsStringController.class); - @RequestMapping("/module/reporting/widget/getMappedAsString") + @RequestMapping("/module/reporting/widget/getMappedAsString.form") public void getMappedAsString(Model model, HttpServletRequest request, @RequestParam("valueType") String valueTypeClassnames, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java index ba3fea8547..cddbb8247f 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/InvalidSerializedDefinitionController.java @@ -41,7 +41,7 @@ public class InvalidSerializedDefinitionController { /** * View Invalid Serialized Definition Page */ - @RequestMapping("/module/reporting/definition/invalidSerializedDefinitions") + @RequestMapping("/module/reporting/definition/invalidSerializedDefinitions.form") public void invalidSerializedDefinitions(ModelMap model) { SerializedDefinitionService service = Context.getService(SerializedDefinitionService.class); @@ -64,7 +64,7 @@ public void invalidSerializedDefinitions(ModelMap model) { /** * Edit Invalid Serialized Definition Page */ - @RequestMapping("/module/reporting/definition/editInvalidSerializedDefinition") + @RequestMapping("/module/reporting/definition/editInvalidSerializedDefinition.form") public void editInvalidSerializedDefinition( @RequestParam(required=true, value="type") Class type, @RequestParam(required=true, value="uuid") String uuid, @@ -79,7 +79,7 @@ public void editInvalidSerializedDefinition( /** * Edit Invalid Serialized Definition Page */ - @RequestMapping("/module/reporting/definition/saveSerializedDefinition") + @RequestMapping("/module/reporting/definition/saveSerializedDefinition.form") public String saveSerializedDefinition(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam(required=true, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, @@ -105,7 +105,7 @@ public String saveSerializedDefinition(ModelMap model, HttpServletRequest reques /** * Edit Invalid Serialized Definition Page */ - @RequestMapping("/module/reporting/definition/testSerializedDefinition") + @RequestMapping("/module/reporting/definition/testSerializedDefinition.form") @SuppressWarnings("unchecked") public void testSerializedDefinition(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam(required=true, value="type") String type, @@ -129,7 +129,7 @@ public void testSerializedDefinition(ModelMap model, HttpServletRequest request, /** * Purges the definition represented by the given uuid. */ - @RequestMapping("/module/reporting/definition/purgeSerializedDefinition") + @RequestMapping("/module/reporting/definition/purgeSerializedDefinition.form") public String purgeSerializedDefinition(@RequestParam(required=true, value="uuid") String uuid) { SerializedDefinitionService sds = Context.getService(SerializedDefinitionService.class); sds.purgeDefinition(uuid); @@ -139,7 +139,7 @@ public String purgeSerializedDefinition(@RequestParam(required=true, value="uuid /** * Converts the definition represented by the given uuid using the given converter */ - @RequestMapping("/module/reporting/definition/convertDefinition") + @RequestMapping("/module/reporting/definition/convertDefinition.form") public String convertDefinition(@RequestParam(required=true, value="uuid") String uuid, @RequestParam(required=true, value="converter") Class converter) throws Exception { SerializedDefinitionService sds = Context.getService(SerializedDefinitionService.class); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java index 947aece6c0..3ce0acb541 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageDefinitionsController.java @@ -52,7 +52,7 @@ public class ManageDefinitionsController { /** * Manage Definitions Controller */ - @RequestMapping("/module/reporting/definition/manageDefinitions") + @RequestMapping("/module/reporting/definition/manageDefinitions.form") public void manageDefinitions( @RequestParam(required=true, value="type") Class type, @RequestParam(required=false, value="includeRetired") Boolean includeRetired, @@ -114,7 +114,7 @@ else if (Query.class.isAssignableFrom(type)) { /** * Edit Definition Controller */ - @RequestMapping("/module/reporting/definition/editDefinition") + @RequestMapping("/module/reporting/definition/editDefinition.form") public String editDefinition( @RequestParam(required=true, value="type") Class type, @RequestParam(required=false, value="uuid") String uuid, @@ -133,7 +133,7 @@ public String editDefinition( /** * Purge Definition Controller */ - @RequestMapping("/module/reporting/definition/purgeDefinition") + @RequestMapping("/module/reporting/definition/purgeDefinition.form") public String purgeDefinition( @RequestParam(required=true, value="type") Class type, @RequestParam(required=true, value="uuid") String uuid, @@ -146,7 +146,7 @@ public String purgeDefinition( /** * Retire Definition Controller */ - @RequestMapping("/module/reporting/definition/retireDefinition") + @RequestMapping("/module/reporting/definition/retireDefinition.form") public String retireDefinition( @RequestParam(required=true, value="type") Class type, @RequestParam(required=true, value="uuid") String uuid, @@ -160,7 +160,7 @@ public String retireDefinition( /** * Retire Definition Controller */ - @RequestMapping("/module/reporting/definition/unretireDefinition") + @RequestMapping("/module/reporting/definition/unretireDefinition.form") public String unretireDefinition( @RequestParam(required=true, value="type") Class type, @RequestParam(required=true, value="uuid") String uuid, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java index 024edacd4b..e3c5f1879e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ManageIndicatorsController.java @@ -26,13 +26,13 @@ public class ManageIndicatorsController { protected Log log = LogFactory.getLog(this.getClass()); - @RequestMapping("/module/reporting/indicators/manageIndicators") + @RequestMapping("/module/reporting/indicators/manageIndicators.form") public void manageIndicators(ModelMap model) { List indicators = Context.getService(IndicatorService.class).getAllDefinitions(false); model.addAttribute("indicators", indicators); } - @RequestMapping("/module/reporting/indicators/purgeIndicator") + @RequestMapping("/module/reporting/indicators/purgeIndicator.form") public String purgeIndicator(@RequestParam(required=false, value="uuid") String uuid) { Indicator indicator = Context.getService(IndicatorService.class).getDefinitionByUuid(uuid); if (indicator != null) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java index 385261f674..9d8c5eba13 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/QueryParameterFormController.java @@ -59,7 +59,7 @@ public void initBinder(WebDataBinder binder) { /** * Processes the form when a user submits. */ - @RequestMapping("/module/reporting/parameters/queryParameter") + @RequestMapping("/module/reporting/parameters/queryParameter.form") public ModelAndView processForm( HttpServletRequest request, HttpServletResponse response, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java index eae98ca09f..e8af13ae76 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderLogicDataSetController.java @@ -27,7 +27,7 @@ @Controller public class RenderLogicDataSetController { - @RequestMapping("/module/reporting/reports/renderLogicDataSet") + @RequestMapping("/module/reporting/reports/renderLogicDataSet.form") public String showReport(Model model, HttpSession session, @RequestParam(required=false, value="start") Integer start, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java index 71db6e1a21..347b0d1717 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/RenderReportFormController.java @@ -31,7 +31,7 @@ public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(Date.class, new CustomDateEditor(ymd, true)); } - @RequestMapping("/module/reporting/reports/renderDefaultReport") + @RequestMapping("/module/reporting/reports/renderDefaultReport.form") public ModelAndView renderDefaultReport() { return new ModelAndView("/module/reporting/reports/renderDefaultReport"); } diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java index 9a320c8655..582216a2f8 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ReportDashboardController.java @@ -59,7 +59,7 @@ public void initBinder(WebDataBinder binder) { } - @RequestMapping("/module/reporting/dashboard/viewCohortDataSet") + @RequestMapping("/module/reporting/dashboard/viewCohortDataSet.form") public String viewCohortDataSet( @RequestParam(required=false, value="savedDataSetKey") String savedDataSetKey, @RequestParam(required=false, value="savedColumnKey") String savedColumnKey, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java index 9481b6c7c5..aebe578b27 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/ScriptedCompositionPatientDataDefinitionController.java @@ -30,7 +30,7 @@ public class ScriptedCompositionPatientDataDefinitionController { protected transient Log log = LogFactory.getLog(getClass()); @SuppressWarnings("unchecked") - @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinition") + @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinition.form") public void showForm(ModelMap model, @RequestParam(value = "uuid", required = false) String uuid, @RequestParam(value = "copyFromUuid", required = false) String copyFromUuid) { model.put("scriptTypes", TemplateEngineManager.getAvailableTemplateEngineNames()); @@ -49,7 +49,7 @@ public void showForm(ModelMap model, @RequestParam(value = "uuid", required = fa } } - @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinitionSetComposition") + @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinitionSetComposition.form") public String setScriptCode(@RequestParam("uuid") String uuid, @RequestParam("scriptCode") String scriptCode, @RequestParam("scriptType") String scriptType) { PatientDataDefinition def = Context.getService(PatientDataService.class).getDefinitionByUuid(uuid); @@ -67,7 +67,7 @@ public String setScriptCode(@RequestParam("uuid") String uuid, @RequestParam("sc * @param uuid * @return */ - @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinitionClone") + @RequestMapping("/module/reporting/definition/scriptedCompositionPatientDataDefinitionClone.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value = "description", required = false) String description, @RequestParam("copyFromUuid") String copyFromUuid) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java index 6fcd1526d9..ba8ae42741 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/SqlDefinitionController.java @@ -30,7 +30,7 @@ @Controller public class SqlDefinitionController { - @RequestMapping("/module/reporting/definition/sqlDefinition") + @RequestMapping("/module/reporting/definition/sqlDefinition.form") public void showForm(ModelMap model, @RequestParam(value="type", required=true) Class type, @RequestParam(value="uuid", required=false) String uuid, @@ -47,7 +47,7 @@ public void showForm(ModelMap model, model.addAttribute("type", type); } - @RequestMapping("/module/reporting/definition/sqlDefinitionAssignQueryString") + @RequestMapping("/module/reporting/definition/sqlDefinitionAssignQueryString.form") public String saveQueryString( HttpSession httpSession, WebRequest webRequest, @@ -91,7 +91,7 @@ else if (BaseSqlDataDefinition.class.isAssignableFrom(type)) { * Copies the SQL cohort definition with the given uuid into another one with the same * parameters and searches, but blank name/description and SQL string */ - @RequestMapping("/module/reporting/definition/sqlDefinitionClone") + @RequestMapping("/module/reporting/definition/sqlDefinitionClone.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value="description", required=false) String description, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java index a9efb5c5f3..eb986d682b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/MappedPropertyPortletFormController.java @@ -50,7 +50,7 @@ public MappedPropertyPortletFormController() { } /** * Saves mapped parameters */ - @RequestMapping("/module/reporting/reports/saveMappedProperty") + @RequestMapping("/module/reporting/reports/saveMappedProperty.form") @SuppressWarnings("unchecked") public String saveMappedProperty(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="type") Class type, @@ -151,7 +151,7 @@ else if (Mapped.class.isAssignableFrom(fieldType)) { /** * Remove mapped property */ - @RequestMapping("/module/reporting/reports/removeMappedProperty") + @RequestMapping("/module/reporting/reports/removeMappedProperty.form") @SuppressWarnings("unchecked") public String removeMappedProperty(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="type") Class type, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java index 89f0221c48..080b735db4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterPortletFormController.java @@ -44,7 +44,7 @@ public ParameterPortletFormController() { } /** * Saves mapped parameters */ - @RequestMapping("/module/reporting/parameters/saveParameter") + @RequestMapping("/module/reporting/parameters/saveParameter.form") public String saveParameter(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="type") Class parentType, @RequestParam(required=true, value="uuid") String parentUuid, @@ -109,7 +109,7 @@ else if (shortcut.equals("location")) { /** * Remove mapped property */ - @RequestMapping("/module/reporting/parameters/deleteParameter") + @RequestMapping("/module/reporting/parameters/deleteParameter.form") public String deleteParameter(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="type") Class parentType, @RequestParam(required=true, value="uuid") String parentUuid, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java index cd1e55b462..e425e51751 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ParameterizablePortletFormController.java @@ -37,7 +37,7 @@ public ParameterizablePortletFormController() { } /** * Saves a BaseOpenmrsMetadata object */ - @RequestMapping("/module/reporting/reports/saveBaseParameterizable") + @RequestMapping("/module/reporting/reports/saveBaseParameterizable.form") public String saveBaseParameterizable(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="type") Class type, @RequestParam(required=true, value="uuid") String uuid, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java index 612e14b37c..3a3de2f66b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportDesignFormController.java @@ -49,7 +49,7 @@ public ReportDesignFormController() { } /** * Saves report design */ - @RequestMapping("/module/reporting/reports/saveReportDesign") + @RequestMapping("/module/reporting/reports/saveReportDesign.form") @SuppressWarnings("unchecked") public String saveReportDesign(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @@ -133,7 +133,7 @@ else if (successUrl.startsWith(pathToRemove)) { /** * Delete report design */ - @RequestMapping("/module/reporting/reports/deleteReportDesign") + @RequestMapping("/module/reporting/reports/deleteReportDesign.form") public String deleteReportDesign(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="uuid") String uuid, @RequestParam(required=false, value="returnUrl") String returnUrl) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java index 2d2de9d55a..ea0d58fce4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/portlet/ReportProcessorFormController.java @@ -42,7 +42,7 @@ public ReportProcessorFormController() { } /** * Saves report design */ - @RequestMapping("/module/reporting/reports/saveReportProcessor") + @RequestMapping("/module/reporting/reports/saveReportProcessor.form") public String saveReportProcessor(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, @@ -81,7 +81,7 @@ public String saveReportProcessor(ModelMap model, HttpServletRequest request, /** * Delete report design */ - @RequestMapping("/module/reporting/reports/deleteReportProcessor") + @RequestMapping("/module/reporting/reports/deleteReportProcessor.form") public String deleteReportDesign(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="uuid") String uuid, @RequestParam(required=false, value="returnUrl") String returnUrl) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java index a00dfa4111..ef6f5ee106 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortDataSetEditor.java @@ -33,7 +33,7 @@ public CohortDataSetEditor() { } /** * Retrieves either an existing or new report to edit */ - @RequestMapping("/module/reporting/datasets/cohortDatasetEditor") + @RequestMapping("/module/reporting/datasets/cohortDatasetEditor.form") public void editCohortDataSet(ModelMap model, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=false, value="type") Class type) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java index 91a405ff8d..b3801f0b21 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/CohortIndicatorAndDimensionDataSetEditor.java @@ -48,7 +48,7 @@ public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(Indicator.class, new IndicatorEditor()); } - @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionDatasetEditor") + @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionDatasetEditor.form") public void editDataSet(ModelMap model, @RequestParam(value="uuid", required=false) String uuid) { DataSetDefinition dsd = new CohortIndicatorAndDimensionDataSetDefinition(); if (uuid != null) { @@ -57,7 +57,7 @@ public void editDataSet(ModelMap model, @RequestParam(value="uuid", required=fal model.addAttribute("dsd", dsd); } - @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionAddSpecification") + @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionAddSpecification.form") public String addSpecification(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("index") Integer index, @RequestParam("indicatorNumber") String indicatorNumber, @@ -133,7 +133,7 @@ public int compare(CohortIndicatorAndDimensionSpecification s1, CohortIndicatorA return "redirect:/module/reporting/closeWindow.htm"; } - @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionRemoveIndicator") + @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionRemoveIndicator.form") public String removeIndicator(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("index") Integer index) { @@ -145,7 +145,7 @@ public String removeIndicator(@RequestParam("dsdUuid") String dsdUuid, return "redirect:cohortIndicatorAndDimensionDatasetEditor.form?uuid=" + dsdUuid; } - @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionRemoveDimension") + @RequestMapping("/module/reporting/datasets/cohortIndicatorAndDimensionRemoveDimension.form") public String removeDimension(@RequestParam("uuid") String uuid, @RequestParam("key") String key) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java index c820029e96..8b38b2c35a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/LogicDataSetEditor.java @@ -40,7 +40,7 @@ public class LogicDataSetEditor { Log log = LogFactory.getLog(getClass()); - @RequestMapping("/module/reporting/datasets/logicDataSetEditor") + @RequestMapping("/module/reporting/datasets/logicDataSetEditor.form") public void showDataset(HttpServletRequest request, ModelMap model, @RequestParam(required = false, value = "uuid") String uuid) { DataSetDefinitionService svc = Context.getService(DataSetDefinitionService.class); LogicDataSetDefinition definition = (LogicDataSetDefinition) svc.getDefinition(uuid, LogicDataSetDefinition.class); @@ -71,7 +71,7 @@ public void showDataset(HttpServletRequest request, ModelMap model, @RequestPara } } - @RequestMapping("/module/reporting/datasets/logicDataSetEditorSave") + @RequestMapping("/module/reporting/datasets/logicDataSetEditorSave.form") public String saveLogicDataset(ModelMap model, @RequestParam(required = false, value = "uuid") String uuid, @RequestParam(required = false, value = "name") String name, @RequestParam(required = false, value = "description") String description, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java index 2cbecdca8a..15582616e6 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/ManageDatasetsController.java @@ -46,7 +46,7 @@ public class ManageDatasetsController { /** * Controller for the edit data set page */ - @RequestMapping("/module/reporting/datasets/editDataSet") + @RequestMapping("/module/reporting/datasets/editDataSet.form") public String editDataSet( @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=false, value="type") Class type, @@ -77,7 +77,7 @@ public String editDataSet( /* * Load Affected Report Definitions. */ - @RequestMapping("/module/reporting/datasets/loadAffectedDatasetDefs") + @RequestMapping("/module/reporting/datasets/loadAffectedDatasetDefs.form") @ResponseBody() public List loadAffectedDatasetDefs(@RequestParam(required=true,value="uuid")String uuid){ List reportDefinitions = Context.getService(ReportDefinitionService.class).getAllDefinitions(false); @@ -101,7 +101,7 @@ public List loadAffectedDatasetDefs(@RequestParam(required=tr /** * Save DataSetDefinition */ - @RequestMapping("/module/reporting/datasets/saveDataSet") + @RequestMapping("/module/reporting/datasets/saveDataSet.form") @SuppressWarnings("unchecked") public String saveDataSet( @RequestParam(required=false, value="uuid") String uuid, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java index 1bec39fe9e..6d64c94fd3 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/MultiParameterDataSetEditor.java @@ -33,7 +33,7 @@ @Controller public class MultiParameterDataSetEditor { - @RequestMapping("/module/reporting/datasets/multiParameterDataSetEditor") + @RequestMapping("/module/reporting/datasets/multiParameterDataSetEditor.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid) { List allDefinitions = Context.getService(DataSetDefinitionService.class).getAllDefinitions(false); @@ -51,7 +51,7 @@ public void showForm(ModelMap model, model.addAttribute("availableDefinitions", allDefinitions); } - @RequestMapping("/module/reporting/datasets/multiParameterAddIteration") + @RequestMapping("/module/reporting/datasets/multiParameterAddIteration.form") public String addIteration(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("index") Integer index) { @@ -66,7 +66,7 @@ public String addIteration(@RequestParam("dsdUuid") String dsdUuid, return "redirect:multiParameterDataSetEditor.form?uuid=" + dsdUuid; } - @RequestMapping("/module/reporting/datasets/multiParameterRemoveIteration") + @RequestMapping("/module/reporting/datasets/multiParameterRemoveIteration.form") public String removeIteration(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("index") Integer index) { DataSetDefinition dsd = DefinitionContext.getDataSetDefinitionService().getDefinitionByUuid(dsdUuid); @@ -78,7 +78,7 @@ public String removeIteration(@RequestParam("dsdUuid") String dsdUuid, return "redirect:multiParameterDataSetEditor.form?uuid=" + dsdUuid; } - @RequestMapping("/module/reporting/datasets/multiParameterEditIterationParameter") + @RequestMapping("/module/reporting/datasets/multiParameterEditIterationParameter.form") public String editIterationParameter(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("iteration") Integer iteration, @RequestParam("parameterName") String parameterName, @@ -108,7 +108,7 @@ public String editIterationParameter(@RequestParam("dsdUuid") String dsdUuid, return "redirect:/module/reporting/closeWindow.htm"; } - @RequestMapping("/module/reporting/datasets/multiParameterChangeBaseDefinition") + @RequestMapping("/module/reporting/datasets/multiParameterChangeBaseDefinition.form") public String changeBaseDefinition(@RequestParam("dsdUuid") String dsdUuid, @RequestParam("baseDefinitionUuid") String baseDefinitionUuid) { DataSetDefinition dsd = DefinitionContext.getDataSetDefinitionService().getDefinitionByUuid(dsdUuid); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java index 97087b1eca..33fde4915b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java @@ -124,7 +124,7 @@ private PatientDataSetDefinition getFromSession(HttpSession session) { } } - @RequestMapping("/module/reporting/datasets/patientDataSetEditor") + @RequestMapping("/module/reporting/datasets/patientDataSetEditor.form") public void showDataset(HttpSession session, Model model) { model.addAttribute("unsaved", session.getAttribute(IS_UNSAVED_ATTR)); @@ -132,7 +132,7 @@ public void showDataset(HttpSession session, model.addAttribute("dataDefinitionTypes", PatientDataDefinition.class.getName() + "," + PersonDataDefinition.class.getName()); } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-nameDescription", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-nameDescription.form", method=RequestMethod.POST) public String changeNameAndDescription(@RequestParam("name") String name, @RequestParam("description") String description, HttpSession session) { @@ -143,7 +143,7 @@ public String changeNameAndDescription(@RequestParam("name") String name, return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addParam", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addParam.form", method=RequestMethod.POST) public String addParameter(@RequestParam(value="collectionType", required=false) Class> collectionType, @RequestParam(value="parameterType", required=false) Class parameterType, @RequestParam(value="name", required=false) String name, @@ -166,7 +166,7 @@ public String addParameter(@RequestParam(value="collectionType", required=false) return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeParam", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeParam.form", method=RequestMethod.POST) public String removeParameter(@RequestParam("name") String name, HttpSession session) { PatientDataSetDefinition dsd = getFromSession(session); @@ -175,7 +175,7 @@ public String removeParameter(@RequestParam("name") String name, return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addColumn", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addColumn.form", method=RequestMethod.POST) public String addColumn(@RequestParam(value="label", required=false) String label, @RequestParam(value="columnDefinition", required=false) String columnDefinition, HttpSession session) { @@ -201,7 +201,7 @@ public String addColumn(@RequestParam(value="label", required=false) String labe return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeColumn", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeColumn.form", method=RequestMethod.POST) public String removeColumn(@RequestParam("name") String name, HttpSession session) { PatientDataSetDefinition dsd = getFromSession(session); @@ -210,7 +210,7 @@ public String removeColumn(@RequestParam("name") String name, return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addFilter", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-addFilter.form", method=RequestMethod.POST) public String addFilter(@RequestParam(value="filterDefinition", required=false) String filterDefinition, HttpSession session) { if (StringUtils.isBlank(filterDefinition)) { @@ -229,7 +229,7 @@ public String addFilter(@RequestParam(value="filterDefinition", required=false) return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeFilter", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-removeFilter.form", method=RequestMethod.POST) public String removeFilter(@RequestParam("filterIndex") int index, HttpSession session) { PatientDataSetDefinition dsd = getFromSession(session); @@ -238,7 +238,7 @@ public String removeFilter(@RequestParam("filterIndex") int index, return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-sortColumns", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-sortColumns.form", method=RequestMethod.POST) public String sortColumns(WebRequest request, HttpSession session) { final List columnOrder = new ArrayList(); @@ -263,7 +263,7 @@ public int compare(RowPerObjectColumnDefinition left, RowPerObjectColumnDefiniti return "redirect:patientDataSetEditor.form"; } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-save", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-save.form", method=RequestMethod.POST) public String save(HttpSession session) { PatientDataSetDefinition dsd = getFromSession(session); String successUrl = (String) session.getAttribute(SUCCESS_URL_ATTR); @@ -279,7 +279,7 @@ public String save(HttpSession session) { } } - @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-discard", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/datasets/patientDataSetEditor-discard.form", method=RequestMethod.POST) public String discard(HttpSession session) { String discardUrl = (String) session.getAttribute(DISCARD_URL_ATTR); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java index 8430ba2301..3135d4aa57 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/SqlDataSetEditor.java @@ -29,7 +29,7 @@ @Controller public class SqlDataSetEditor { - @RequestMapping("/module/reporting/datasets/sqlDataSetEditor") + @RequestMapping("/module/reporting/datasets/sqlDataSetEditor.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid, @RequestParam(value="copyFromUuid", required=false) String copyFromUuid) { @@ -48,7 +48,7 @@ public void showForm(ModelMap model, } } - @RequestMapping("/module/reporting/datasets/sqlDataSetDefinitionAssignQueryString") + @RequestMapping("/module/reporting/datasets/sqlDataSetDefinitionAssignQueryString.form") public String saveQueryString( HttpSession httpSession, WebRequest webRequest, @@ -79,7 +79,7 @@ public String saveQueryString( * @param uuid * @return */ - @RequestMapping("/module/reporting/datasets/sqlDataSetDefinitionClone") + @RequestMapping("/module/reporting/datasets/sqlDataSetDefinitionClone.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value="description", required=false) String description, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java index 6f34bf7011..7afaf97745 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/EditCohortDefinitionDimensionController.java @@ -20,7 +20,7 @@ @Controller public class EditCohortDefinitionDimensionController { - @RequestMapping("/module/reporting/indicators/editCohortDefinitionDimension") + @RequestMapping("/module/reporting/indicators/editCohortDefinitionDimension.form") public void editReportDefinition( @RequestParam(required=false, value="uuid") String uuid, ModelMap model) { @@ -30,7 +30,7 @@ public void editReportDefinition( model.addAttribute("dimension", dim); } - @RequestMapping("/module/reporting/indicators/editCohortDefinitionDimensionRemoveOption") + @RequestMapping("/module/reporting/indicators/editCohortDefinitionDimensionRemoveOption.form") public String removeOption( @RequestParam("uuid") String uuid, @RequestParam("key") String keyToRemove) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java index 227767fa25..88da882036 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/dimensions/ManageDimensionsController.java @@ -28,7 +28,7 @@ public class ManageDimensionsController { /** * List all dimensions */ - @RequestMapping("/module/reporting/indicators/manageDimensions") + @RequestMapping("/module/reporting/indicators/manageDimensions.form") public void manageDimensions(ModelMap model, @RequestParam(required=false, value="includeRetired") Boolean includeRetired) { @@ -46,7 +46,7 @@ public void manageDimensions(ModelMap model, /** * Delete an existing dimension */ - @RequestMapping("/module/reporting/indicators/purgeDimension") + @RequestMapping("/module/reporting/indicators/purgeDimension.form") public String purgeDimension(@RequestParam("uuid") String uuid) { DimensionService service = Context.getService(DimensionService.class); Dimension dim = service.getDefinitionByUuid(uuid); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java index 4498dc2c2f..bedc5d1bf1 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/CurrentReportController.java @@ -20,7 +20,7 @@ @Controller public class CurrentReportController { - @RequestMapping("/module/reporting/run/currentReportDiscard") + @RequestMapping("/module/reporting/run/currentReportDiscard.form") public String discardFromSession(WebRequest request) { request.removeAttribute(ReportingConstants.OPENMRS_REPORT_DATA, WebRequest.SCOPE_SESSION); request.removeAttribute(ReportingConstants.OPENMRS_REPORT_ARGUMENT, WebRequest.SCOPE_SESSION); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java index 60dea92492..7c28b5d96a 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/LogicReportController.java @@ -26,7 +26,7 @@ @Controller public class LogicReportController { - @RequestMapping("/module/reporting/reports/logicReport") + @RequestMapping("/module/reporting/reports/logicReport.form") public String showFormOrRedirect(@RequestParam(required=false, value="uuid") String uuid) { if (uuid != null) { // TODO find the logic dataset in this report, and redirect to its edit page @@ -35,7 +35,7 @@ public String showFormOrRedirect(@RequestParam(required=false, value="uuid") Str return null; // show the default view } - @RequestMapping("/module/reporting/reports/logicReportCreate") + @RequestMapping("/module/reporting/reports/logicReportCreate.form") public String createLogicReport(@RequestParam("name") String name, @RequestParam(required=false, value="description") String description) { LogicDataSetDefinition dsd = new LogicDataSetDefinition(); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java index d9104fc71b..35c2ee06bb 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportQueuePortletController.java @@ -31,7 +31,7 @@ @Order(50) public class ManageReportQueuePortletController extends ReportingPortletController { - @RequestMapping(value = "/module/reporting/portlets/manageReportQueue") + @RequestMapping(value = "/module/reporting/portlets/manageReportQueue.form") public void showReportRequests() { //this method is just to get the controller registered for the portlet's url. //The model data is added from populateModel() method below diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java index abdbce9106..ffd70e629b 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageReportsController.java @@ -61,7 +61,7 @@ public ManageReportsController() { } * Provide all reports, optionally including those that are retired, to a page * that lists them and provides options for working with these reports. */ - @RequestMapping("/module/reporting/reports/manageReports") + @RequestMapping("/module/reporting/reports/manageReports.form") public ModelMap manageReports(ModelMap model, @RequestParam(required=false, value="includeRetired") Boolean includeRetired) { @@ -84,7 +84,7 @@ public ModelMap manageReports(ModelMap model, * Provide all reports designs, optionally including those that are retired, to a page * that lists them and provides options for working with them. */ - @RequestMapping("/module/reporting/reports/manageReportDesigns") + @RequestMapping("/module/reporting/reports/manageReportDesigns.form") public ModelMap manageReportDesigns(ModelMap model, @RequestParam(required=false, value="includeRetired") Boolean includeRetired) { @@ -102,7 +102,7 @@ public ModelMap manageReportDesigns(ModelMap model, * * to edit a reportDefinition based on its rendererType. */ - @RequestMapping("/module/reporting/reports/renderers/editReportDesign") + @RequestMapping("/module/reporting/reports/renderers/editReportDesign.form") public String editReportDesign(ModelMap model, @RequestParam(required=true, value="type") Class type, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @@ -143,7 +143,7 @@ public String editReportDesign(ModelMap model, * * Edit page for a report design that does not have a custom editor */ - @RequestMapping("/module/reporting/reports/renderers/defaultReportDesignEditor") + @RequestMapping("/module/reporting/reports/renderers/defaultReportDesignEditor.form") public void defaultReportDesignRenderer(ModelMap model, @RequestParam(required=true, value="type") Class type, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @@ -167,7 +167,7 @@ public void defaultReportDesignRenderer(ModelMap model, /** * Provide all reports processor configurations, to a page that lists them and provides options for working with them. */ - @RequestMapping("/module/reporting/reports/manageReportProcessors") + @RequestMapping("/module/reporting/reports/manageReportProcessors.form") public void manageReportProcessors(ModelMap model) { List configs = Context.getService(ReportService.class).getAllReportProcessorConfigurations(false); model.addAttribute("reportProcessorConfigurations", configs); @@ -177,7 +177,7 @@ public void manageReportProcessors(ModelMap model) { * Provide all reports designs, optionally including those that are retired, to a page * that lists them and provides options for working with them. */ - @RequestMapping("/module/reporting/reports/viewReportDesignResource") + @RequestMapping("/module/reporting/reports/viewReportDesignResource.form") public void viewDesignContent(ModelMap model, HttpServletResponse response, @RequestParam(required=true, value="designUuid") String designUuid, @@ -198,7 +198,7 @@ public void viewDesignContent(ModelMap model, } } - @RequestMapping("/module/reporting/reports/purgeReport") + @RequestMapping("/module/reporting/reports/purgeReport.form") public String purgeReportDefinition(@RequestParam(required=false, value="uuid") String uuid) { ReportDefinitionService rds = Context.getService(ReportDefinitionService.class); rds.purgeDefinition(rds.getDefinitionByUuid(uuid)); @@ -209,7 +209,7 @@ public String purgeReportDefinition(@RequestParam(required=false, value="uuid") * Renders a report to the response output stream, given a report definition, rendering mode, and optional patient id * @param patientIdOrUuid the id or uuid of patient whose summary you wish to view */ - @RequestMapping("/module/reporting/reports/renderReport") + @RequestMapping("/module/reporting/reports/renderReport.form") public void renderReport(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam("reportDefinition") String reportDefinitionUuid, @RequestParam("renderingMode") String renderingModeDescriptor, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java index 9880e7e442..4241de6f67 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ManageScheduledReportsController.java @@ -40,7 +40,7 @@ public ManageScheduledReportsController() { } /** * Provide all scheduled reports for working with these reports. */ - @RequestMapping("/module/reporting/reports/manageScheduledReports") + @RequestMapping("/module/reporting/reports/manageScheduledReports.form") public ModelMap manageReports(ModelMap model) { // getting all currently scheduled reports ReportService reportService = Context.getService(ReportService.class); diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java index 650c5f5ba7..a6b06c2738 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/PeriodIndicatorReportController.java @@ -71,7 +71,7 @@ public List getIndicators() { return ret; } - @RequestMapping("/module/reporting/reports/periodIndicatorReport") + @RequestMapping("/module/reporting/reports/periodIndicatorReport.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid) { if (uuid == null) { @@ -89,7 +89,7 @@ public void showForm(ModelMap model, } - @RequestMapping("/module/reporting/reports/periodIndicatorReportSaveColumn") + @RequestMapping("/module/reporting/reports/periodIndicatorReportSaveColumn.form") public String addColumn(@RequestParam("uuid") String uuid, @RequestParam(value="index", required=false) Integer index, @RequestParam("key") String key, @@ -147,7 +147,7 @@ public String addColumn(@RequestParam("uuid") String uuid, return "redirect:periodIndicatorReport.form?uuid=" + uuid; } - @RequestMapping("/module/reporting/reports/periodIndicatorReportRemoveColumn") + @RequestMapping("/module/reporting/reports/periodIndicatorReportRemoveColumn.form") public String removeColumn(@RequestParam("uuid") String uuid, @RequestParam("key") String key) { @@ -157,7 +157,7 @@ public String removeColumn(@RequestParam("uuid") String uuid, return "redirect:periodIndicatorReport.form?uuid=" + uuid; } - @RequestMapping("/module/reporting/reports/periodIndicatorReportRemoveDimension") + @RequestMapping("/module/reporting/reports/periodIndicatorReportRemoveDimension.form") public String removeDimension(@RequestParam("uuid") String uuid, @RequestParam("key") String key) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java index c31c55e18f..354973880d 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportEditor.java @@ -38,7 +38,7 @@ public ReportEditor() { /** * Retrieves either an existing or new report to edit */ - @RequestMapping("/module/reporting/reports/reportEditor") + @RequestMapping("/module/reporting/reports/reportEditor.form") public void editReport(ModelMap model, @RequestParam(required = false, value = "uuid") String uuid, @RequestParam(required = false, value = "type") Class type) { diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java index 73e225e098..bcec778d4c 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/ReportHistoryController.java @@ -77,7 +77,7 @@ public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true, 10)); } - @RequestMapping("/module/reporting/reports/reportHistory") + @RequestMapping("/module/reporting/reports/reportHistory.form") public void showReportHistory(ModelMap model, @RequestParam(value="reportDefinition", required=false) ReportDefinition reportDefinition, @RequestParam(value="requestedBy", required=false) User requestedBy, @@ -123,7 +123,7 @@ public void showReportHistory(ModelMap model, model.addAttribute("renderingModes", renderingModes); } - @RequestMapping("/module/reporting/reports/deleteReportRequest") + @RequestMapping("/module/reporting/reports/deleteReportRequest.form") public String deleteReportRequest(@RequestParam("uuid") String uuid, @RequestParam(value="returnUrl", required=false) String returnUrl) { ReportService rs = Context.getService(ReportService.class); @@ -132,7 +132,7 @@ public String deleteReportRequest(@RequestParam("uuid") String uuid, return "redirect:" + ObjectUtil.nvlStr(returnUrl, "reportHistory.form"); } - @RequestMapping("/module/reporting/reports/loadReportStatus") + @RequestMapping("/module/reporting/reports/loadReportStatus.form") public String loadReportStatus(ModelMap model, @RequestParam("uuid") String uuid) { ReportService rs = Context.getService(ReportService.class); @@ -157,14 +157,14 @@ public String loadReportStatus(ModelMap model, @RequestParam("uuid") String uuid return "/module/reporting/json"; } - @RequestMapping("/module/reporting/reports/viewErrorDetails") + @RequestMapping("/module/reporting/reports/viewErrorDetails.form") public void viewErrorDetails(HttpServletResponse response, @RequestParam("uuid") String uuid) throws IOException { ReportRequest rr = Context.getService(ReportService.class).getReportRequestByUuid(uuid); String error = Context.getService(ReportService.class).loadReportError(rr); response.getWriter().write(error); } - @RequestMapping("/module/reporting/reports/reportHistorySave") + @RequestMapping("/module/reporting/reports/reportHistorySave.form") public String saveHistoryElement(@RequestParam("uuid") String uuid, @RequestParam(value="description", required=false) String description) { ReportService rs = Context.getService(ReportService.class); ReportRequest rr = rs.getReportRequestByUuid(uuid); @@ -173,7 +173,7 @@ public String saveHistoryElement(@RequestParam("uuid") String uuid, @RequestPara return "redirect:/module/reporting/reports/reportHistoryOpen.form?uuid="+uuid; } - @RequestMapping("/module/reporting/reports/reportHistoryOpen") + @RequestMapping("/module/reporting/reports/reportHistoryOpen.form") public String openFromHistory(@RequestParam("uuid") String uuid, HttpServletResponse response, WebRequest request, ModelMap model) throws IOException { ReportService rs = Context.getService(ReportService.class); ReportRequest req = rs.getReportRequestByUuid(uuid); @@ -214,7 +214,7 @@ public String openFromHistory(@RequestParam("uuid") String uuid, HttpServletResp return "/module/reporting/reports/reportHistoryOpen"; } - @RequestMapping("/module/reporting/reports/viewReport") + @RequestMapping("/module/reporting/reports/viewReport.form") public ModelAndView viewReport(@RequestParam("uuid") String uuid, HttpServletResponse response, HttpServletRequest request) throws IOException { ReportRequest req = getReportService().getReportRequestByUuid(uuid); RenderingMode rm = req.getRenderingMode(); @@ -252,7 +252,7 @@ public ModelAndView viewReport(@RequestParam("uuid") String uuid, HttpServletRes } - @RequestMapping("/module/reporting/reports/reportHistoryProcess") + @RequestMapping("/module/reporting/reports/reportHistoryProcess.form") public String runOnDemandPostProcessor(@RequestParam("uuid") String requestUuid, @RequestParam("processorUuid") String processorUuid, HttpServletResponse response, HttpServletRequest request) throws IOException { ReportRequest req = getReportService().getReportRequestByUuid(requestUuid); ReportProcessorConfiguration rpc = getReportService().getReportProcessorConfigurationByUuid(processorUuid); From e2a351397f0b80c78b8c35ec7f983e9722deb783 Mon Sep 17 00:00:00 2001 From: icrc-loliveira <68058940+icrc-loliveira@users.noreply.github.com> Date: Wed, 29 Jun 2022 15:18:05 +0100 Subject: [PATCH 096/143] REPORT-873: SQL reports to use cursors to iterate through datasets. (#213) Co-authored-by: Luis Oliveira --- .../common/ResultSetIteratorTest.java | 91 +++++++++++++ .../reporting/common/ResultSetIterator.java | 115 +++++++++++++++++ .../module/reporting/common/SqlRunner.java | 104 +++++++++++---- .../reporting/dataset/IterableSqlDataSet.java | 76 +++++++++++ .../IterableSqlDataSetDefinition.java | 22 ++++ .../IterableSqlDataSetEvaluator.java | 118 +++++++++++++++++ .../evaluator/SqlFileDataSetEvaluator.java | 108 ++++++++-------- .../evaluation/querybuilder/QueryBuilder.java | 2 +- .../querybuilder/SqlQueryBuilder.java | 14 +- .../service/EvaluationServiceImpl.java | 2 +- api/src/main/resources/messages.properties | 5 + ...bleSqlDataSetDefinitionMappingHandler.java | 29 +++++ .../datasets/IterableSqlDataSetEditor.java | 97 ++++++++++++++ .../datasets/iterableSqlDataSetEditor.jsp | 121 ++++++++++++++++++ 14 files changed, 817 insertions(+), 87 deletions(-) create mode 100644 api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/dataset/IterableSqlDataSet.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/dataset/definition/IterableSqlDataSetDefinition.java create mode 100644 api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java create mode 100644 omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/IterableSqlDataSetDefinitionMappingHandler.java create mode 100644 omod/src/main/java/org/openmrs/module/reporting/web/datasets/IterableSqlDataSetEditor.java create mode 100644 omod/src/main/webapp/datasets/iterableSqlDataSetEditor.jsp diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java new file mode 100644 index 0000000000..a4a1afb0c8 --- /dev/null +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java @@ -0,0 +1,91 @@ +package org.openmrs.module.reporting.common; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openmrs.module.reporting.dataset.DataSetRow; +import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; + +import javax.sql.rowset.RowSetMetaDataImpl; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + + +public class ResultSetIteratorTest { + + //@Mock + private SqlFileDataSetEvaluator mockEvaluator; + + //@Mock + private ResultSet mockResultSet; + + //@Mock + private Statement mockStatement; + + private ResultSetIterator resultSetIterator; + + @Before + public void setUp() throws SQLException { + mockEvaluator = mock(SqlFileDataSetEvaluator.class); + mockResultSet = mock(ResultSet.class); + mockStatement = mock(Statement.class); + resultSetIterator = new ResultSetIterator(createMetadata(), mockResultSet, mockEvaluator, mockStatement); + mockResultSet(); + } + + @Test + public void shouldRead3LinesWithHasNext() { + List rows = new LinkedList(); + for (Iterator i = resultSetIterator; i.hasNext(); ) { + DataSetRow row = (DataSetRow) i.next(); + rows.add(row); + } + Assert.assertEquals(3, rows.size()); + Assert.assertEquals("result_01", rows.get(0).getColumnValue("Column_01")); + Assert.assertEquals("result_02", rows.get(0).getColumnValue("Column_02")); + Assert.assertEquals("result_03", rows.get(1).getColumnValue("Column_01")); + Assert.assertEquals("result_04", rows.get(1).getColumnValue("Column_02")); + Assert.assertEquals("result_05", rows.get(2).getColumnValue("Column_01")); + Assert.assertEquals("result_06", rows.get(2).getColumnValue("Column_02")); + } + + @Test + public void shouldRead3LinesWithoutHasNext() { + List rows = new LinkedList(); + DataSetRow row = resultSetIterator.next(); + while (row != null) { + rows.add(row); + row = resultSetIterator.next(); + } + + Assert.assertEquals(3, rows.size()); + Assert.assertEquals("result_01", rows.get(0).getColumnValue("Column_01")); + Assert.assertEquals("result_02", rows.get(0).getColumnValue("Column_02")); + Assert.assertEquals("result_03", rows.get(1).getColumnValue("Column_01")); + Assert.assertEquals("result_04", rows.get(1).getColumnValue("Column_02")); + Assert.assertEquals("result_05", rows.get(2).getColumnValue("Column_01")); + Assert.assertEquals("result_06", rows.get(2).getColumnValue("Column_02")); + } + + private ResultSetMetaData createMetadata() throws SQLException { + RowSetMetaDataImpl metaData = new RowSetMetaDataImpl(); + metaData.setColumnCount(2); + metaData.setColumnLabel(1, "Column_01"); + metaData.setColumnLabel(2, "Column_02"); + return metaData; + } + + private void mockResultSet() throws SQLException { + when(mockResultSet.next()).thenReturn(true, true, true, false); + when(mockResultSet.getObject(1)).thenReturn("result_01", "result_03", "result_05"); + when(mockResultSet.getObject(2)).thenReturn("result_02", "result_04", "result_06"); + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java b/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java new file mode 100644 index 0000000000..a0468abe04 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java @@ -0,0 +1,115 @@ +package org.openmrs.module.reporting.common; + +import org.openmrs.api.APIException; +import org.openmrs.module.reporting.dataset.DataSetColumn; +import org.openmrs.module.reporting.dataset.DataSetRow; + +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.NoSuchElementException; + +import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ResultSetIterator implements Iterator { + private ResultSet resultSet; + private List columns; + private Statement statement; + private SqlFileDataSetEvaluator evaluator; + private static final Logger log = LoggerFactory.getLogger(ResultSetIterator.class); + private boolean isNextUsed = true; + private boolean hasNext = true; + + + public ResultSetIterator(ResultSetMetaData metadata, ResultSet resultSet, SqlFileDataSetEvaluator evaluator, Statement statement) throws SQLException { + this.resultSet = resultSet; + this.evaluator = evaluator; + this.statement = statement; + this.createDataSetColumns(metadata); + } + + @Override + public boolean hasNext() { + if (isNextUsed && hasNext) { + isNextUsed = false; + return rawNext(); + } + return hasNext; + } + + @Override + public DataSetRow next() throws NoSuchElementException { + try { + if (isNextUsed) { + if (rawNext()) { + return createDataSetRow(); + }else{ + return null; + } + } else { + isNextUsed = true; + return createDataSetRow(); + } + } catch (SQLException e) { + closeConnection(); + throw new APIException("Failed to fetch the next result from the database.", e); + } + } + + private boolean rawNext() { + try { + if (resultSet.next()) { + return true; + } else { + hasNext = false; + closeConnection(); + return false; + } + } catch (SQLException e) { + closeConnection(); + throw new APIException("Failed to fetch the next result from the database.", e); + } + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + private DataSetRow createDataSetRow() throws SQLException { + DataSetRow dataSetRow = new DataSetRow(); + for (int i = 0; i < columns.size(); i++) { + dataSetRow.addColumnValue(columns.get(i), resultSet.getObject(i + 1)); + } + return dataSetRow; + } + + public void closeConnection() { + try { + if (statement != null) { + statement.close(); + } + evaluator.closeConnection(); + } catch (Exception ex) { + log.error("Failed to close ResultSetIterator connection.", ex); + } + } + + public List getColumns() { + return columns; + } + + private void createDataSetColumns(ResultSetMetaData metadata) throws SQLException { + columns = new LinkedList(); + for (int i = 1; i <= metadata.getColumnCount(); i++) { + String columnName = metadata.getColumnLabel(i); + columns.add(new DataSetColumn(columnName, columnName, Object.class)); + } + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java index 678e4d0263..39b8dca10c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java @@ -15,11 +15,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.OpenmrsObject; +import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; import org.openmrs.module.reporting.report.util.ReportUtil; import java.io.File; import java.io.IOException; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; @@ -36,24 +36,24 @@ */ public class SqlRunner { - private static Log log = LogFactory.getLog(SqlRunner.class); + private static Log log = LogFactory.getLog(SqlRunner.class); // Regular expression to identify a change in the delimiter. This ignores spaces, allows delimiter in comment, allows an equals-sign private static final Pattern DELIMITER_PATTERN = Pattern.compile("^\\s*(--)?\\s*delimiter\\s*=?\\s*([^\\s]+)+\\s*.*$", Pattern.CASE_INSENSITIVE); //*********** INSTANCE PROPERTIES ****************** - private Connection connection; + private SqlFileDataSetEvaluator evaluator; private String delimiter = ";"; //*********** CONSTRUCTORS ****************** - public SqlRunner(Connection connection) { - this.connection = connection; + public SqlRunner(SqlFileDataSetEvaluator evaluator) { + this.evaluator = evaluator; } - public SqlRunner(Connection connection, String delimiter) { - this(connection); + public SqlRunner(SqlFileDataSetEvaluator evaluator, String delimiter) { + this(evaluator); this.delimiter = delimiter; } @@ -65,6 +65,14 @@ public SqlResult executeSqlResource(String resourceName, Map par return executeSql(sql, parameterValues); } + /** + * Executes a Sql Script located under resources + */ + public ResultSetIterator executeSqlResourceToIterator(String resourceName, Map parameterValues) { + String sql = ReportUtil.readStringFromResource(resourceName); + return executeSqlToIterator(sql, parameterValues); + } + /** * Executes a Sql Script located as a file */ @@ -78,6 +86,19 @@ public SqlResult executeSqlFile(File sqlFile, Map parameterValue } } + /** + * Executes a Sql Script located as a file + */ + public ResultSetIterator executeSqlFileToIterator(File sqlFile, Map parameterValues) { + try { + String sql = FileUtils.readFileToString(sqlFile, "UTF-8"); + return executeSqlToIterator(sql, parameterValues); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load file: " + sqlFile, e); + } + } + /** * Executes a Sql Script */ @@ -93,13 +114,13 @@ public SqlResult executeSql(String sql, Map parameterValues) { Boolean originalAutoCommit = null; try { - originalAutoCommit = connection.getAutoCommit(); - connection.setAutoCommit(false); + originalAutoCommit = evaluator.getConnection().getAutoCommit(); + evaluator.getConnection().setAutoCommit(false); for (String sqlStatement : sqlStatements) { Statement statement = null; try { - statement = connection.createStatement(); + statement = evaluator.getConnection().createStatement(); log.debug("Executing: " + sqlStatement); statement.execute(sqlStatement); ResultSet resultSet = statement.getResultSet(); @@ -145,6 +166,54 @@ public SqlResult executeSql(String sql, Map parameterValues) { return result; } + /** + * Executes a Sql Script + */ + public ResultSetIterator executeSqlToIterator(String sql, Map parameterValues) { + + ResultSetIterator iterator = null; + log.info("Executing SQL..."); + + List sqlStatements = new ArrayList(); + sqlStatements.addAll(parseParametersIntoStatements(parameterValues)); + sqlStatements.addAll(parseSqlIntoStatements(sql)); + + Boolean originalAutoCommit = null; + + try { + originalAutoCommit = evaluator.getConnection().getAutoCommit(); + evaluator.getConnection().setAutoCommit(false); + + for (String sqlStatement : sqlStatements) { + Statement statement = null; + try { + statement = evaluator.getConnection().createStatement(); + // If is the last statement set setFetchSize + if (sqlStatement.equals(sqlStatements.get(sqlStatements.size() - 1))) { + statement.setFetchSize(10); + } + log.debug("Executing: {} " + sqlStatement); + statement.executeQuery(sqlStatement); + ResultSet resultSet = statement.getResultSet(); + + if (resultSet != null) { + ResultSetMetaData rsmd = resultSet.getMetaData(); + iterator = new ResultSetIterator(rsmd, resultSet, evaluator, statement); + } + } catch (Exception e) { + closeStatement(statement); + throw e; + } + } + } catch (Exception e) { + log.error("An error occurred while trying to execute the query.", e); + } finally { + resetAutocommit(originalAutoCommit); + } + + return iterator; + } + protected void closeStatement(Statement statement) { try { if (statement != null) { @@ -158,7 +227,7 @@ protected void closeStatement(Statement statement) { protected void commit() { try { - connection.commit(); + evaluator.getConnection().commit(); } catch (Exception e) { log.warn("An error occurred while trying to commit", e); @@ -167,7 +236,7 @@ protected void commit() { protected void rollback() { try { - connection.rollback(); + evaluator.getConnection().rollback(); } catch (Exception e) { log.warn("An error occurred while trying to rollback a connection", e); @@ -177,7 +246,7 @@ protected void rollback() { protected void resetAutocommit(Boolean autocommit) { try { if (autocommit != null) { - connection.setAutoCommit(autocommit); + evaluator.getConnection().setAutoCommit(autocommit); } } catch (Exception e) { @@ -304,15 +373,6 @@ protected String getNewDelimiter(String line) { } //************* PROPERTY ACCESS ******************* - - public Connection getConnection() { - return connection; - } - - public void setConnection(Connection connection) { - this.connection = connection; - } - public String getDelimiter() { return delimiter; } diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/IterableSqlDataSet.java b/api/src/main/java/org/openmrs/module/reporting/dataset/IterableSqlDataSet.java new file mode 100644 index 0000000000..dbf0d99f17 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/IterableSqlDataSet.java @@ -0,0 +1,76 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + *

+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.dataset; + +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.IterableSqlDataSetDefinition; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.common.ResultSetIterator; + +import java.util.Iterator; + +/** + * This is a {@link DataSet} that allows you to request the rows for a subset of the + * input cohort, and it will generate those rows on demand (by delegating to a + * {@link IterableDataSetEvaluator}). + */ +public class IterableSqlDataSet implements DataSet { + + ResultSetIterator dataSetRowIterator; + SimpleDataSetMetaData metadata; + EvaluationContext context; + IterableSqlDataSetDefinition definition; + + /** + * @param evalContext + * @param definition + */ + public IterableSqlDataSet(EvaluationContext evalContext, IterableSqlDataSetDefinition definition, ResultSetIterator iterator) { + this.context = evalContext; + this.definition = definition; + this.dataSetRowIterator = iterator; + mapMetaData(); + } + + /** + * @see DataSet#iterator() + */ + public Iterator iterator() { + return dataSetRowIterator; + } + + /** + * @see DataSet#getMetaData() + */ + public DataSetMetaData getMetaData() { + return metadata; + } + + /** + * @see DataSet#getContext() + */ + public EvaluationContext getContext() { + return context; + } + + /** + * @see DataSet#getDefinition() + */ + public DataSetDefinition getDefinition() { + return definition; + } + + private void mapMetaData(){ + metadata = new SimpleDataSetMetaData(); + for(DataSetColumn column: dataSetRowIterator.getColumns()){ + metadata.addColumn(new DataSetColumn(column.getName(),column.getLabel(),column.getDataType())); + } + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/IterableSqlDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/IterableSqlDataSetDefinition.java new file mode 100644 index 0000000000..af98495705 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/IterableSqlDataSetDefinition.java @@ -0,0 +1,22 @@ +/** + * The contents of this file are subject to the OpenMRS Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://license.openmrs.org + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * Copyright (C) OpenMRS, LLC. All Rights Reserved. + */ +package org.openmrs.module.reporting.dataset.definition; + +/** + * Evaluates a sql script found at the configured file path or resource path or with the sql contents specified + * By default, this will utilize the database connection properties in the openmrs runtime properties + * This can use an alternative database connection by specifying the file. Property names follow those in openmrs runtime properties + */ +public class IterableSqlDataSetDefinition extends SqlFileDataSetDefinition { +} diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java new file mode 100644 index 0000000000..808c2a05b7 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java @@ -0,0 +1,118 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + *

+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.dataset.definition.evaluator; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.openmrs.annotation.Handler; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.ObjectUtil; +import org.openmrs.module.reporting.common.SqlRunner; +import org.openmrs.module.reporting.dataset.DataSet; +import org.openmrs.module.reporting.dataset.IterableSqlDataSet; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.IterableSqlDataSetDefinition; +import org.openmrs.module.reporting.evaluation.EvaluationContext; +import org.openmrs.module.reporting.evaluation.EvaluationException; +import org.openmrs.module.reporting.common.ResultSetIterator; + +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; + +/** + * The logic that evaluates a {@link IterableSqlDataSetDefinition} and produces an {@link DataSet} + * + * @see IterableSqlDataSetDefinition + */ +@Handler(supports = {IterableSqlDataSetDefinition.class}, order = 50) +public class IterableSqlDataSetEvaluator extends SqlFileDataSetEvaluator { + + private static final Logger log = LoggerFactory.getLogger(IterableSqlDataSetEvaluator.class); + + /** + * Public constructor + */ + public IterableSqlDataSetEvaluator() { + } + + /** + * @should evaluate a IterableSqlDataSetDefinition + * @should evaluate a IterableSqlDataSetDefinition with parameters + * @should evaluate a IterableSqlDataSetDefinition with in statement + * @should protect SQL Query Against database modifications + * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) + */ + @Override + public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException { + + context = ObjectUtil.nvl(context, new EvaluationContext()); + IterableSqlDataSetDefinition sqlDsd = (IterableSqlDataSetDefinition) dataSetDefinition; + String sqlQuery = sqlDsd.getSql(); + + IterableSqlDataSetDefinition definition = (IterableSqlDataSetDefinition) dataSetDefinition; + Properties connectionProperties = getConnectionProperties(definition.getConnectionPropertyFile()); + Iterator iterator = null; + Connection connection = null; + + try { + createConnection(connectionProperties); + SqlRunner runner = new SqlRunner(this); + Map parameterValues = constructParameterValues(definition, context); + + if (StringUtils.isNotBlank(definition.getSqlFile())) { + File sqlFile = new File(definition.getSqlFile()); + if (!sqlFile.exists()) { + throw new EvaluationException("Unable to find Sql File to execute: " + definition.getSqlFile()); + } + log.info("Executing SQL File at " + sqlFile + " with parameters " + parameterValues); + iterator = runner.executeSqlFileToIterator(sqlFile, parameterValues); + } else if (StringUtils.isNotBlank(definition.getSqlResource())) { + log.info("Executing SQL Resource at " + definition.getSqlResource() + " with parameters " + parameterValues); + iterator = runner.executeSqlResourceToIterator(definition.getSqlResource(), parameterValues); + } else if (StringUtils.isNotBlank(definition.getSql())) { + log.info("Executing SQL with parameters " + parameterValues); + iterator = runner.executeSqlToIterator(definition.getSql(), parameterValues); + } else { + throw new EvaluationException("A SqlFileDataSetDefinition must define either a SQL File or SQL Resource"); + } + + } catch (EvaluationException ee) { + throw ee; + } catch (Exception e) { + throw new EvaluationException("An error occurred while evaluating a SqlFileDataSetDefinition", e); + } + + return new IterableSqlDataSet(context, sqlDsd, (ResultSetIterator) iterator); + } + + /** + * @return a new connection given a set of connection properties + */ + @Override + protected void createConnection(Properties connectionProperties) throws EvaluationException { + try { + String driver = connectionProperties.getProperty("connection.driver_class", "com.mysql.jdbc.Driver"); + String url = connectionProperties.getProperty("connection.url"); + url += "&useCursorFetch=true"; + String user = connectionProperties.getProperty("connection.username"); + String password = connectionProperties.getProperty("connection.password"); + Context.loadClass(driver); + this.connection = DriverManager.getConnection(url, user, password); + } catch (Exception e) { + throw new EvaluationException("Unable to create a new connection to the database", e); + } + } + +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java index 5b8bebef99..6728630ff5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java @@ -3,12 +3,12 @@ * Version 1.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://license.openmrs.org - * + *

* Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. - * + *

* Copyright (C) OpenMRS, LLC. All Rights Reserved. */ package org.openmrs.module.reporting.dataset.definition.evaluator; @@ -46,27 +46,27 @@ /** * Evaluates a SqlFileDataSetDefinition and produces results */ -@Handler(supports={SqlFileDataSetDefinition.class}) +@Handler(supports = {SqlFileDataSetDefinition.class}) public class SqlFileDataSetEvaluator implements DataSetEvaluator { + protected Log log = LogFactory.getLog(this.getClass()); - protected Log log = LogFactory.getLog(this.getClass()); - - /** - * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) - */ - public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException { - - context = ObjectUtil.nvl(context, new EvaluationContext()); + protected Connection connection; + + /** + * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) + */ + public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException { + + context = ObjectUtil.nvl(context, new EvaluationContext()); SimpleDataSet data = new SimpleDataSet(dataSetDefinition, context); SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) dataSetDefinition; Properties connectionProperties = getConnectionProperties(dsd.getConnectionPropertyFile()); - Connection connection = null; try { - connection = createConnection(connectionProperties); + createConnection(connectionProperties); - SqlRunner runner = new SqlRunner(connection); + SqlRunner runner = new SqlRunner(this); SqlResult resultData = null; Map parameterValues = constructParameterValues(dsd, context); @@ -77,16 +77,13 @@ public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext c } log.info("Executing SQL File at " + sqlFile + " with parameters " + parameterValues); resultData = runner.executeSqlFile(sqlFile, parameterValues); - } - else if (StringUtils.isNotBlank(dsd.getSqlResource())) { + } else if (StringUtils.isNotBlank(dsd.getSqlResource())) { log.info("Executing SQL Resource at " + dsd.getSqlResource() + " with parameters " + parameterValues); resultData = runner.executeSqlResource(dsd.getSqlResource(), parameterValues); - } - else if (StringUtils.isNotBlank(dsd.getSql())) { + } else if (StringUtils.isNotBlank(dsd.getSql())) { log.info("Executing SQL with parameters " + parameterValues); resultData = runner.executeSql(dsd.getSql(), parameterValues); - } - else { + } else { throw new EvaluationException("A SqlFileDataSetDefinition must define either a SQL File or SQL Resource"); } @@ -107,44 +104,32 @@ else if (StringUtils.isNotBlank(dsd.getSql())) { } data.addRow(row); } - } - catch (EvaluationException ee) { + } catch (EvaluationException ee) { throw ee; - } - catch (Exception e) { + } catch (Exception e) { throw new EvaluationException("An error occurred while evaluating a SqlFileDataSetDefinition", e); - } - finally { - try { - if (connection != null) { - connection.close(); - } - } - catch (Exception e) { - log.warn("Error closing the database connection for SqlFileDataSetEvaluator", e); - } + } finally { + closeConnection(); } - return data; - } + return data; + } /** * @return the connection properties to use */ - protected Properties getConnectionProperties(String connectionPropertyFile) throws EvaluationException { - Properties properties = Context.getRuntimeProperties(); - if (StringUtils.isNotBlank(connectionPropertyFile)) { + protected Properties getConnectionProperties(String connectionPropertyFile) throws EvaluationException { + Properties properties = Context.getRuntimeProperties(); + if (StringUtils.isNotBlank(connectionPropertyFile)) { properties = new Properties(); InputStream is = null; try { File file = new File(OpenmrsUtil.getApplicationDataDirectory(), connectionPropertyFile); is = new FileInputStream(file); properties.load(is); - } - catch (Exception e) { + } catch (Exception e) { throw new EvaluationException("Unable to load connection properties from file <" + connectionPropertyFile + ">", e); - } - finally { + } finally { IOUtils.closeQuietly(is); } } @@ -154,17 +139,16 @@ protected Properties getConnectionProperties(String connectionPropertyFile) thro /** * @return a new connection given a set of connection properties */ - protected Connection createConnection(Properties connectionProperties) throws EvaluationException { - try { + protected void createConnection(Properties connectionProperties) throws EvaluationException { + try { String driver = connectionProperties.getProperty("connection.driver_class", "com.mysql.jdbc.Driver"); String url = connectionProperties.getProperty("connection.url"); String user = connectionProperties.getProperty("connection.username"); String password = connectionProperties.getProperty("connection.password"); Context.loadClass(driver); - return DriverManager.getConnection(url, user, password); - } - catch (Exception e) { - throw new EvaluationException("Unable to create a new connection to the database", e); + connection = DriverManager.getConnection(url, user, password); + } catch (Exception e) { + throw new EvaluationException("Unable to create a new connection to the database", e); } } @@ -178,16 +162,28 @@ protected Map constructParameterValues(SqlFileDataSetDefinition Object o = ret.get(key); if (o instanceof OpenmrsMetadata) { if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.ID) { - ret.put(key, ((OpenmrsMetadata)o).getId()); - } - else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.UUID) { - ret.put(key, ((OpenmrsMetadata)o).getUuid()); - } - else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.NAME) { - ret.put(key, ((OpenmrsMetadata)o).getName()); + ret.put(key, ((OpenmrsMetadata) o).getId()); + } else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.UUID) { + ret.put(key, ((OpenmrsMetadata) o).getUuid()); + } else if (dsd.getMetadataParameterConversion() == MetadataParameterConversion.NAME) { + ret.put(key, ((OpenmrsMetadata) o).getName()); } } } return ret; } + + public void closeConnection() { + try { + if (connection != null) { + connection.close(); + } + } catch (Exception e) { + log.warn("Error closing the database connection for SqlFileDataSetEvaluator", e); + } + } + + public Connection getConnection() { + return connection; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java index 23252e4706..70c6fdc3f3 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/QueryBuilder.java @@ -10,7 +10,7 @@ package org.openmrs.module.reporting.evaluation.querybuilder; import org.hibernate.Query; -import org.openmrs.api.db.hibernate.DbSessionFactory; +import org.openmrs.api.db.hibernate.DbSessionFactory; import org.openmrs.module.reporting.dataset.DataSetColumn; import org.openmrs.module.reporting.evaluation.EvaluationContext; diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java index c944e986f3..6dccb8ed34 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/SqlQueryBuilder.java @@ -123,10 +123,10 @@ public String getSqlQuery() { @Override public List getColumns(DbSessionFactory sessionFactory) { final List l = new ArrayList(); - + try { sessionFactory.getCurrentSession().doWork(new Work() { - + @Override public void execute(Connection connection) throws SQLException { PreparedStatement statement = null; @@ -152,20 +152,20 @@ public void execute(Connection connection) throws SQLException { catch (Exception e) { throw new IllegalArgumentException("Unable to retrieve columns for query", e); } - + return l; } @Override public List evaluateToList(DbSessionFactory sessionFactory, EvaluationContext context) { - + final List ret = new ArrayList(); EvaluationProfiler profiler = new EvaluationProfiler(context); profiler.logBefore("EXECUTING_QUERY", toString()); - + try { sessionFactory.getCurrentSession().doWork(new Work() { - + @Override public void execute(Connection connection) throws SQLException { PreparedStatement statement = null; @@ -198,7 +198,7 @@ public void execute(Connection connection) throws SQLException { profiler.logError("EXECUTING_QUERY", toString(), e); throw new IllegalArgumentException("Unable to execute query", e); } - + profiler.logAfter("EXECUTING_QUERY", "Completed successfully with " + ret.size() + " results"); return ret; } diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java index 00754786a1..48c93af159 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/service/EvaluationServiceImpl.java @@ -9,7 +9,7 @@ */ package org.openmrs.module.reporting.evaluation.service; -import org.openmrs.api.db.hibernate.DbSessionFactory; +import org.openmrs.api.db.hibernate.DbSessionFactory; import org.openmrs.api.context.Context; import org.openmrs.api.impl.BaseOpenmrsService; import org.openmrs.module.reporting.dataset.DataSetColumn; diff --git a/api/src/main/resources/messages.properties b/api/src/main/resources/messages.properties index 79fe59c367..66e46db39a 100644 --- a/api/src/main/resources/messages.properties +++ b/api/src/main/resources/messages.properties @@ -519,8 +519,13 @@ reporting.ScriptedCompositionPatientDataDefinition=Composition #--------- DATA SET DEFINITION LOCALIZATION ---------- +reporting.button.save=Save +reporting.button.close=Close +reporting.button.preview=Preview reporting.DataExportDataSetDefinition=Data Export Dataset reporting.SqlDataSetDefinition=SQL Dataset +reporting.IterableSqlDataSetDefinition.saved=Saved Iterable SQL Dataset Definition +reporting.IterableSqlDataSetDefinition=Iterable SQL Dataset reporting.SqlDataSetDefinition.saved=Saved SQL Dataset Definition reporting.CohortCrossTabDataSetDefinition=Cohort Crosstab Dataset reporting.CohortIndicatorDataSetDefinition=Period Indicator Report Dataset diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/IterableSqlDataSetDefinitionMappingHandler.java b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/IterableSqlDataSetDefinitionMappingHandler.java new file mode 100644 index 0000000000..3a49d76c48 --- /dev/null +++ b/omod/src/main/java/org/openmrs/module/reporting/web/controller/mapping/IterableSqlDataSetDefinitionMappingHandler.java @@ -0,0 +1,29 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.web.controller.mapping; + +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.dataset.definition.IterableSqlDataSetDefinition; +import org.openmrs.module.reporting.evaluation.Definition; + +/** + * Handler that determines what pages are redirected for creating and editing IterableSqlDataSetDefinition + */ +@Handler(supports= IterableSqlDataSetDefinition.class, order=50) +public class IterableSqlDataSetDefinitionMappingHandler extends DefinitionMappingHandler { + + /** + * @see DefinitionMappingHandler#getCreateUrl(Class) + */ + public String getCreateUrl(Class type) { + return "/module/reporting/datasets/iterableSqlDataSetEditor.form?type="+type.getName(); + } +} + diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/IterableSqlDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/IterableSqlDataSetEditor.java new file mode 100644 index 0000000000..a02360de68 --- /dev/null +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/IterableSqlDataSetEditor.java @@ -0,0 +1,97 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + *

+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.web.datasets; + +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.cohort.query.service.CohortQueryService; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.IterableSqlDataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionService; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.web.WebConstants; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.context.request.WebRequest; + +import javax.servlet.http.HttpSession; +import java.util.List; + +@Controller +public class IterableSqlDataSetEditor { + + @RequestMapping("/module/reporting/datasets/iterableSqlDataSetEditor") + public void showForm(ModelMap model, + @RequestParam(value = "uuid", required = false) String uuid, + @RequestParam(value = "copyFromUuid", required = false) String copyFromUuid) { + if (uuid == null) { + model.addAttribute("definition", new IterableSqlDataSetDefinition()); + } else { + DataSetDefinition def = Context.getService(DataSetDefinitionService.class).getDefinitionByUuid(uuid); + if (def instanceof IterableSqlDataSetDefinition) { + IterableSqlDataSetDefinition definition = (IterableSqlDataSetDefinition) def; + model.addAttribute("definition", definition); + } else { + throw new RuntimeException("This definition does not correspond to an IterableSqlDataSetDefinition."); + } + } + } + + @RequestMapping("/module/reporting/datasets/iterableSqlDataSetDefinitionAssignQueryString") + public String saveQueryString( + HttpSession httpSession, + WebRequest webRequest, + @RequestParam("uuid") String uuid, + @RequestParam("queryString") String queryString) { + + DataSetDefinition def = Context.getService(DataSetDefinitionService.class).getDefinitionByUuid(uuid); + IterableSqlDataSetDefinition definition = (IterableSqlDataSetDefinition) def; + definition.setSql(queryString); + + List parameters = Context.getService(CohortQueryService.class).getNamedParameters(queryString); + for (Parameter parameter : parameters) { + if (definition.getParameter(parameter.getName()) == null) + definition.addParameter(parameter); + } + + // Save the definition + Context.getService(DataSetDefinitionService.class).saveDefinition(definition); + httpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, "reporting.IterableSqlDataSetDefinition.saved"); + httpSession.setAttribute(WebConstants.OPENMRS_MSG_ARGS, queryString); + return "redirect:iterableSqlDataSetEditor.form?uuid=" + uuid; + } + + /** + * Copies the SQL DataSet definition with the given uuid into another one with the same + * parameters and searches, but blank name/description and SQL string + * + * @return + */ + @RequestMapping("/module/reporting/datasets/iterableSqlDataSetDefinitionClone") + public String cloneDefinition(WebRequest request, + @RequestParam("name") String name, + @RequestParam(value = "description", required = false) String description, + @RequestParam("copyFromUuid") String copyFromUuid) { + DataSetDefinition def = Context.getService(DataSetDefinitionService.class).getDefinitionByUuid(copyFromUuid); + IterableSqlDataSetDefinition from = (IterableSqlDataSetDefinition) def; + + IterableSqlDataSetDefinition clone = new IterableSqlDataSetDefinition(); + clone.setId(null); + clone.setUuid(null); + clone.setName(name); + clone.setDescription(description); + clone.setParameters(from.getParameters()); + clone.setSql(from.getSql()); + Context.getService(DataSetDefinitionService.class).saveDefinition(clone); + request.setAttribute(WebConstants.OPENMRS_MSG_ATTR, "Saved as a new copy", WebRequest.SCOPE_SESSION); + return "redirect:iterableSqlDataSetEditor.form?uuid=" + clone.getUuid(); + } +} diff --git a/omod/src/main/webapp/datasets/iterableSqlDataSetEditor.jsp b/omod/src/main/webapp/datasets/iterableSqlDataSetEditor.jsp new file mode 100644 index 0000000000..4175a14eef --- /dev/null +++ b/omod/src/main/webapp/datasets/iterableSqlDataSetEditor.jsp @@ -0,0 +1,121 @@ +<%@ include file="/WEB-INF/template/include.jsp"%> + +<%@ include file="../manage/localHeader.jsp"%> + + + + + + + + + + + +

+
+ + + + +
+ +
+ +
+ + + + + + + + + +
+ + + + + + + +
+ +
+ + + +
+ + "/> + " + onClick="window.location='${pageContext.request.contextPath}/module/reporting/definition/manageDefinitions.form?type=org.openmrs.module.reporting.dataset.definition.DataSetDefinition';"/> + + + + + +
+
+
+ +
+
+ +
+ +
+ + +<%@ include file="/WEB-INF/template/footer.jsp" %> From 8efc6bb7b657b3bd78ac8fe29353573dd0226b69 Mon Sep 17 00:00:00 2001 From: Anjula Shanaka Date: Thu, 28 Jul 2022 13:36:53 +0530 Subject: [PATCH 097/143] Add the missing api module dependency (#236) Remove unnecessary dependency Change the OMRS version for api-1.10 --- api/pom.xml | 4 ++-- omod/pom.xml | 5 +++++ omod/src/main/resources/config.xml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index addb9625a1..58a09f26b7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -18,6 +18,6 @@ ${reportingCompatibilityVersion} provided
- + - \ No newline at end of file + diff --git a/omod/pom.xml b/omod/pom.xml index 6f2744d912..659ff4f850 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -16,6 +16,11 @@ ${project.parent.artifactId}-api ${project.parent.version} + + ${project.parent.groupId} + ${project.parent.artifactId}-api-1.10 + ${project.parent.version} + ${project.parent.groupId} ${project.parent.artifactId}-api-1.9 diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index 3a4e783b1d..8811270210 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -181,7 +181,7 @@ /lib/reporting-api-1.10.* - 1.10.6 - 2.2.* + 1.10.6 - 1.9.* /lib/reporting-api-2.0.* From 83c37b592788e60d878c704b66f1ae54ac9c7914 Mon Sep 17 00:00:00 2001 From: Anjula Shanaka Date: Mon, 5 Sep 2022 21:30:21 +0530 Subject: [PATCH 098/143] Update the openmrs version for the api 1.10 (#237) --- omod/src/main/resources/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index 8811270210..ee045ce0ce 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -181,7 +181,7 @@ /lib/reporting-api-1.10.* - 1.10.6 - 1.9.* + 1.10.6 - 9.* /lib/reporting-api-2.0.* From 51b7d979c168bf815f76d02973384e8ebf0054c9 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 27 Sep 2022 12:26:23 +0000 Subject: [PATCH 099/143] [maven-release-plugin] prepare release 1.25.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index fd70b46f4c..1471b991d8 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 81c8913e55..176b66679a 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 32eafbdb7a..17cb8ea82a 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 9841020e39..d6fb5bcee6 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 8c62b6fc9a..6f4203dd2a 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index ae9fd5fa79..c8c2cd8051 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 58a09f26b7..5a8797948a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 659ff4f850..cc7cc4f40f 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 661228f645..495aae7ba2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.25.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.25.0 From c37c9abcb2a47e786d771465aecfa136063058e8 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Tue, 27 Sep 2022 12:26:27 +0000 Subject: [PATCH 100/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 1471b991d8..4e7e1ebc2c 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 176b66679a..0f1c02cb5d 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 17cb8ea82a..ebcf8edcfb 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index d6fb5bcee6..47a519d330 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 6f4203dd2a..e1d2a7674e 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index c8c2cd8051..aa5a2887a3 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 5a8797948a..24d4751b33 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index cc7cc4f40f..fdc089d2cd 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 495aae7ba2..6c2269f141 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0 + 1.26.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.25.0 + HEAD From 298d4a13a240624abd6142cb54f5e3f5c0411ecf Mon Sep 17 00:00:00 2001 From: Ian <52504170+ibacher@users.noreply.github.com> Date: Fri, 3 Mar 2023 08:29:55 -0500 Subject: [PATCH 101/143] Fix POM version --- api-tests-2.4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml index 427edda2c9..3cf94963a7 100644 --- a/api-tests-2.4/pom.xml +++ b/api-tests-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.25.0-SNAPSHOT + 1.26.0-SNAPSHOT reporting-api-tests-2.4 From 7246966407519ddc7f2c040818db698fab07b807 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 3 Mar 2023 08:52:37 -0500 Subject: [PATCH 102/143] REPORT-895 - Remove use of instance variable for connection object (#240) --- .../common/ResultSetIteratorTest.java | 11 +--- .../reporting/common/ResultSetIterator.java | 26 +++++---- .../module/reporting/common/SqlRunner.java | 42 ++++++++------ .../evaluator/DataSetEvaluator.java | 2 +- .../IterableSqlDataSetEvaluator.java | 55 ++++++------------- .../evaluator/SqlFileDataSetEvaluator.java | 48 +++++++--------- 6 files changed, 82 insertions(+), 102 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java index a4a1afb0c8..27e18c091d 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/common/ResultSetIteratorTest.java @@ -4,7 +4,6 @@ import org.junit.Before; import org.junit.Test; import org.openmrs.module.reporting.dataset.DataSetRow; -import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; import javax.sql.rowset.RowSetMetaDataImpl; import java.sql.ResultSet; @@ -21,23 +20,19 @@ public class ResultSetIteratorTest { - //@Mock - private SqlFileDataSetEvaluator mockEvaluator; - - //@Mock private ResultSet mockResultSet; - //@Mock private Statement mockStatement; private ResultSetIterator resultSetIterator; @Before public void setUp() throws SQLException { - mockEvaluator = mock(SqlFileDataSetEvaluator.class); mockResultSet = mock(ResultSet.class); mockStatement = mock(Statement.class); - resultSetIterator = new ResultSetIterator(createMetadata(), mockResultSet, mockEvaluator, mockStatement); + when(mockResultSet.getStatement()).thenReturn(mockStatement); + when(mockResultSet.getMetaData()).thenReturn(createMetadata()); + resultSetIterator = new ResultSetIterator(mockResultSet); mockResultSet(); } diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java b/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java index a0468abe04..2f8b77c5d8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ResultSetIterator.java @@ -3,7 +3,10 @@ import org.openmrs.api.APIException; import org.openmrs.module.reporting.dataset.DataSetColumn; import org.openmrs.module.reporting.dataset.DataSetRow; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; @@ -13,25 +16,22 @@ import java.util.List; import java.util.NoSuchElementException; -import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - public class ResultSetIterator implements Iterator { + + private static final Logger log = LoggerFactory.getLogger(ResultSetIterator.class); + private ResultSet resultSet; private List columns; + private Connection connection; private Statement statement; - private SqlFileDataSetEvaluator evaluator; - private static final Logger log = LoggerFactory.getLogger(ResultSetIterator.class); private boolean isNextUsed = true; private boolean hasNext = true; - - public ResultSetIterator(ResultSetMetaData metadata, ResultSet resultSet, SqlFileDataSetEvaluator evaluator, Statement statement) throws SQLException { + public ResultSetIterator(ResultSet resultSet) throws SQLException { this.resultSet = resultSet; - this.evaluator = evaluator; - this.statement = statement; - this.createDataSetColumns(metadata); + this.statement = resultSet.getStatement(); + this.connection = resultSet.getStatement().getConnection(); + this.createDataSetColumns(resultSet.getMetaData()); } @Override @@ -95,7 +95,9 @@ public void closeConnection() { if (statement != null) { statement.close(); } - evaluator.closeConnection(); + if (connection != null) { + connection.close(); + } } catch (Exception ex) { log.error("Failed to close ResultSetIterator connection.", ex); } diff --git a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java index 39b8dca10c..a79f1e798e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/SqlRunner.java @@ -15,11 +15,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.OpenmrsObject; -import org.openmrs.module.reporting.dataset.definition.evaluator.SqlFileDataSetEvaluator; import org.openmrs.module.reporting.report.util.ReportUtil; import java.io.File; import java.io.IOException; +import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; @@ -43,17 +43,17 @@ public class SqlRunner { //*********** INSTANCE PROPERTIES ****************** - private SqlFileDataSetEvaluator evaluator; + private Connection connection; private String delimiter = ";"; //*********** CONSTRUCTORS ****************** - public SqlRunner(SqlFileDataSetEvaluator evaluator) { - this.evaluator = evaluator; + public SqlRunner(Connection connection) { + this.connection = connection; } - public SqlRunner(SqlFileDataSetEvaluator evaluator, String delimiter) { - this(evaluator); + public SqlRunner(Connection connection, String delimiter) { + this(connection); this.delimiter = delimiter; } @@ -114,13 +114,13 @@ public SqlResult executeSql(String sql, Map parameterValues) { Boolean originalAutoCommit = null; try { - originalAutoCommit = evaluator.getConnection().getAutoCommit(); - evaluator.getConnection().setAutoCommit(false); + originalAutoCommit = connection.getAutoCommit(); + connection.setAutoCommit(false); for (String sqlStatement : sqlStatements) { Statement statement = null; try { - statement = evaluator.getConnection().createStatement(); + statement = connection.createStatement(); log.debug("Executing: " + sqlStatement); statement.execute(sqlStatement); ResultSet resultSet = statement.getResultSet(); @@ -181,13 +181,13 @@ public ResultSetIterator executeSqlToIterator(String sql, Map pa Boolean originalAutoCommit = null; try { - originalAutoCommit = evaluator.getConnection().getAutoCommit(); - evaluator.getConnection().setAutoCommit(false); + originalAutoCommit = connection.getAutoCommit(); + connection.setAutoCommit(false); for (String sqlStatement : sqlStatements) { Statement statement = null; try { - statement = evaluator.getConnection().createStatement(); + statement = connection.createStatement(); // If is the last statement set setFetchSize if (sqlStatement.equals(sqlStatements.get(sqlStatements.size() - 1))) { statement.setFetchSize(10); @@ -197,8 +197,7 @@ public ResultSetIterator executeSqlToIterator(String sql, Map pa ResultSet resultSet = statement.getResultSet(); if (resultSet != null) { - ResultSetMetaData rsmd = resultSet.getMetaData(); - iterator = new ResultSetIterator(rsmd, resultSet, evaluator, statement); + iterator = new ResultSetIterator(resultSet); } } catch (Exception e) { closeStatement(statement); @@ -227,7 +226,7 @@ protected void closeStatement(Statement statement) { protected void commit() { try { - evaluator.getConnection().commit(); + connection.commit(); } catch (Exception e) { log.warn("An error occurred while trying to commit", e); @@ -236,7 +235,7 @@ protected void commit() { protected void rollback() { try { - evaluator.getConnection().rollback(); + connection.rollback(); } catch (Exception e) { log.warn("An error occurred while trying to rollback a connection", e); @@ -246,7 +245,7 @@ protected void rollback() { protected void resetAutocommit(Boolean autocommit) { try { if (autocommit != null) { - evaluator.getConnection().setAutoCommit(autocommit); + connection.setAutoCommit(autocommit); } } catch (Exception e) { @@ -373,6 +372,15 @@ protected String getNewDelimiter(String line) { } //************* PROPERTY ACCESS ******************* + + public Connection getConnection() { + return connection; + } + + public void setConnection(Connection connection) { + this.connection = connection; + } + public String getDelimiter() { return delimiter; } diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java index eea2489bd2..64e0011efc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataSetEvaluator.java @@ -30,7 +30,7 @@ public interface DataSetEvaluator extends DefinitionEvaluator * Evaluate a DataSet for the given EvaluationContext * * @param dataSetDefinition - * @param inputCohortencounter_datetime + * @param evalContext * @return the evaluated DataSet */ public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext evalContext) throws EvaluationException; diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java index 808c2a05b7..05ea945008 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/IterableSqlDataSetEvaluator.java @@ -10,11 +10,9 @@ package org.openmrs.module.reporting.dataset.definition.evaluator; import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.openmrs.annotation.Handler; -import org.openmrs.api.context.Context; import org.openmrs.module.reporting.common.ObjectUtil; +import org.openmrs.module.reporting.common.ResultSetIterator; import org.openmrs.module.reporting.common.SqlRunner; import org.openmrs.module.reporting.dataset.DataSet; import org.openmrs.module.reporting.dataset.IterableSqlDataSet; @@ -22,12 +20,11 @@ import org.openmrs.module.reporting.dataset.definition.IterableSqlDataSetDefinition; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.EvaluationException; -import org.openmrs.module.reporting.common.ResultSetIterator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.sql.Connection; -import java.sql.DriverManager; -import java.util.Iterator; import java.util.Map; import java.util.Properties; @@ -41,12 +38,6 @@ public class IterableSqlDataSetEvaluator extends SqlFileDataSetEvaluator { private static final Logger log = LoggerFactory.getLogger(IterableSqlDataSetEvaluator.class); - /** - * Public constructor - */ - public IterableSqlDataSetEvaluator() { - } - /** * @should evaluate a IterableSqlDataSetDefinition * @should evaluate a IterableSqlDataSetDefinition with parameters @@ -58,17 +49,12 @@ public IterableSqlDataSetEvaluator() { public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException { context = ObjectUtil.nvl(context, new EvaluationContext()); - IterableSqlDataSetDefinition sqlDsd = (IterableSqlDataSetDefinition) dataSetDefinition; - String sqlQuery = sqlDsd.getSql(); - IterableSqlDataSetDefinition definition = (IterableSqlDataSetDefinition) dataSetDefinition; - Properties connectionProperties = getConnectionProperties(definition.getConnectionPropertyFile()); - Iterator iterator = null; - Connection connection = null; - + ResultSetIterator iterator; + Connection connection; try { - createConnection(connectionProperties); - SqlRunner runner = new SqlRunner(this); + connection = getConnection(definition, context); + SqlRunner runner = new SqlRunner(connection); Map parameterValues = constructParameterValues(definition, context); if (StringUtils.isNotBlank(definition.getSqlFile())) { @@ -87,32 +73,27 @@ public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext c } else { throw new EvaluationException("A SqlFileDataSetDefinition must define either a SQL File or SQL Resource"); } - - } catch (EvaluationException ee) { + } + catch (EvaluationException ee) { throw ee; - } catch (Exception e) { + } + catch (Exception e) { throw new EvaluationException("An error occurred while evaluating a SqlFileDataSetDefinition", e); } - return new IterableSqlDataSet(context, sqlDsd, (ResultSetIterator) iterator); + return new IterableSqlDataSet(context, definition, iterator); } /** * @return a new connection given a set of connection properties */ @Override - protected void createConnection(Properties connectionProperties) throws EvaluationException { - try { - String driver = connectionProperties.getProperty("connection.driver_class", "com.mysql.jdbc.Driver"); - String url = connectionProperties.getProperty("connection.url"); - url += "&useCursorFetch=true"; - String user = connectionProperties.getProperty("connection.username"); - String password = connectionProperties.getProperty("connection.password"); - Context.loadClass(driver); - this.connection = DriverManager.getConnection(url, user, password); - } catch (Exception e) { - throw new EvaluationException("Unable to create a new connection to the database", e); + protected Properties getConnectionProperties(String connectionPropertyFile) throws EvaluationException { + Properties p = super.getConnectionProperties(connectionPropertyFile); + String url = p.getProperty("connection.url"); + if (url != null && !url.contains("useCursorFetch")) { + p.setProperty("connection.url", url + "&useCursorFetch=true"); } + return p; } - } \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java index 6728630ff5..6c9d0de447 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/SqlFileDataSetEvaluator.java @@ -50,8 +50,6 @@ public class SqlFileDataSetEvaluator implements DataSetEvaluator { protected Log log = LogFactory.getLog(this.getClass()); - protected Connection connection; - /** * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) */ @@ -62,11 +60,10 @@ public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext c SqlFileDataSetDefinition dsd = (SqlFileDataSetDefinition) dataSetDefinition; - Properties connectionProperties = getConnectionProperties(dsd.getConnectionPropertyFile()); + Connection connection = null; try { - createConnection(connectionProperties); - - SqlRunner runner = new SqlRunner(this); + connection = getConnection(dsd, context); + SqlRunner runner = new SqlRunner(connection); SqlResult resultData = null; Map parameterValues = constructParameterValues(dsd, context); @@ -104,12 +101,21 @@ public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext c } data.addRow(row); } - } catch (EvaluationException ee) { + } + catch (EvaluationException ee) { throw ee; - } catch (Exception e) { + } + catch (Exception e) { throw new EvaluationException("An error occurred while evaluating a SqlFileDataSetDefinition", e); - } finally { - closeConnection(); + } + finally { + try { + if (connection != null) { + connection.close(); + } + } catch (Exception e) { + log.warn("Error closing the database connection for SqlFileDataSetEvaluator", e); + } } return data; @@ -139,15 +145,17 @@ protected Properties getConnectionProperties(String connectionPropertyFile) thro /** * @return a new connection given a set of connection properties */ - protected void createConnection(Properties connectionProperties) throws EvaluationException { + protected Connection getConnection(SqlFileDataSetDefinition dsd, EvaluationContext context) throws EvaluationException { + Properties connectionProperties = getConnectionProperties(dsd.getConnectionPropertyFile()); try { String driver = connectionProperties.getProperty("connection.driver_class", "com.mysql.jdbc.Driver"); String url = connectionProperties.getProperty("connection.url"); String user = connectionProperties.getProperty("connection.username"); String password = connectionProperties.getProperty("connection.password"); Context.loadClass(driver); - connection = DriverManager.getConnection(url, user, password); - } catch (Exception e) { + return DriverManager.getConnection(url, user, password); + } + catch (Exception e) { throw new EvaluationException("Unable to create a new connection to the database", e); } } @@ -172,18 +180,4 @@ protected Map constructParameterValues(SqlFileDataSetDefinition } return ret; } - - public void closeConnection() { - try { - if (connection != null) { - connection.close(); - } - } catch (Exception e) { - log.warn("Error closing the database connection for SqlFileDataSetEvaluator", e); - } - } - - public Connection getConnection() { - return connection; - } } From c73eca2567b959bf145bb0e928b24206f615c670 Mon Sep 17 00:00:00 2001 From: Mark Goodrich Date: Tue, 18 Apr 2023 12:38:40 -0600 Subject: [PATCH 103/143] REPORT-896: Update Version of Joda Time Library (#243) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c2269f141..b13117eb72 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ 2.1.1 3.12 1.8.7 - 2.3 + 2.12.5 1.1.2 1.7.0 UTF-8 From 237d85c05730fed7c4d3d50ab27e962aeec6f446 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Tue, 6 Jun 2023 16:12:55 +0300 Subject: [PATCH 104/143] LUI-189 Include suffix in controller urls --- .../web/indicator/EditCohortIndicatorController.java | 6 +++--- .../reporting/web/indicator/EditSqlIndicatorController.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java index 6719be699d..c3b33d30e4 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditCohortIndicatorController.java @@ -25,7 +25,7 @@ @Controller public class EditCohortIndicatorController { - @RequestMapping("/module/reporting/indicators/editCohortIndicator") + @RequestMapping("/module/reporting/indicators/editCohortIndicator.form") public void editCohortIndicator(ModelMap model, @RequestParam(value="uuid", required=false) String uuid) { if (uuid == null) { @@ -37,7 +37,7 @@ public void editCohortIndicator(ModelMap model, } } - @RequestMapping("/module/reporting/indicators/saveBaseCohortIndicator") + @RequestMapping("/module/reporting/indicators/saveBaseCohortIndicator.form") public String saveBaseCohortIndicator(ModelMap model, @RequestParam(value="uuid", required=false) String uuid, @RequestParam(value="name", required=true) String name, @@ -79,7 +79,7 @@ public String saveBaseCohortIndicator(ModelMap model, } } - @RequestMapping("/module/reporting/indicators/saveLogicCohortIndicator") + @RequestMapping("/module/reporting/indicators/saveLogicCohortIndicator.form") @SuppressWarnings("unchecked") public String saveLogicCohortIndicator(ModelMap model, @RequestParam(value="uuid", required=true) String uuid, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java index 0e141a488e..72349607df 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/indicator/EditSqlIndicatorController.java @@ -29,7 +29,7 @@ @Controller public class EditSqlIndicatorController { - @RequestMapping("/module/reporting/indicators/editSqlIndicator") + @RequestMapping("/module/reporting/indicators/editSqlIndicator.form") public void showForm(ModelMap model, @RequestParam(value="uuid", required=false) String uuid, @RequestParam(value="copyFromUuid", required=false) String copyFromUuid) { @@ -48,7 +48,7 @@ public void showForm(ModelMap model, } } - @RequestMapping("/module/reporting/indicators/saveSqlIndicatorQueryString") + @RequestMapping("/module/reporting/indicators/saveSqlIndicatorQueryString.form") public String saveQueryString( HttpSession httpSession, WebRequest webRequest, @@ -77,7 +77,7 @@ public String saveQueryString( * Copies the SQL Indicator with the given uuid into another one with the same * parameters and searches, but blank name/description and SQL string */ - @RequestMapping("/module/reporting/indicators/cloneSqlIndicator") + @RequestMapping("/module/reporting/indicators/cloneSqlIndicator.form") public String cloneDefinition(WebRequest request, @RequestParam("name") String name, @RequestParam(value="description", required=false) String description, From f5f3cfca1b67668cfcc344260f611673b0bd6cd1 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 9 Aug 2023 17:31:41 -0400 Subject: [PATCH 105/143] REPORT-899 ReportLoader should not set parameters to required=false by default (#246) --- .../java/org/openmrs/module/reporting/config/ReportLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index 192e053471..ac65719771 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -129,7 +129,7 @@ public static List constructParameters(List para p.setLabel(parameterDescriptor.getLabel()); p.setType(parameterType); p.setDefaultValue(getParameterValue(parameterType, parameterDescriptor.getValue())); - p.setRequired(BooleanUtils.isTrue(parameterDescriptor.getRequired())); + p.setRequired(BooleanUtils.isNotFalse(parameterDescriptor.getRequired())); parameters.add(p); } catch (Exception e) { throw new RuntimeException("Unable to configure parameter " + parameterDescriptor.getKey(), e); From 2b982e1da41191871af401fedabbd1f783950c64 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 29 Aug 2023 09:07:24 -0400 Subject: [PATCH 106/143] REPORT-900 - HQL Query Builder should support entity names that differ from class names --- .../evaluation/querybuilder/HqlQueryBuilder.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java index 4a858ebae1..ea60309a8c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java +++ b/api/src/main/java/org/openmrs/module/reporting/evaluation/querybuilder/HqlQueryBuilder.java @@ -52,7 +52,7 @@ public class HqlQueryBuilder implements QueryBuilder { protected Log log = LogFactory.getLog(getClass()); - private Map> fromTypes = new LinkedHashMap>(); + private Map fromTypes = new LinkedHashMap(); private boolean includeVoided = false; private List columns = new ArrayList(); private List joinClauses = new ArrayList(); @@ -93,13 +93,18 @@ public HqlQueryBuilder from(Class fromType) { } public HqlQueryBuilder from(Class fromType, String fromAlias) { - fromTypes.put(fromAlias, fromType); + fromTypes.put(fromAlias, fromType.getName()); if (!includeVoided && Voidable.class.isAssignableFrom(fromType)) { whereEqual((ObjectUtil.notNull(fromAlias) ? fromAlias + "." : "")+"voided", false); } return this; } + public HqlQueryBuilder from(String entityName, String fromAlias) { + fromTypes.put(fromAlias, entityName); + return this; + } + public HqlQueryBuilder innerJoin(String property, String alias) { joinClauses.add("inner join " + property + " as " + alias); return this; @@ -534,7 +539,7 @@ else if (!ObjectUtil.containsWhitespace(column)) { for (int i=0; i Date: Thu, 7 Sep 2023 15:18:17 +0000 Subject: [PATCH 107/143] [maven-release-plugin] prepare release 1.26.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 4e7e1ebc2c..96541f57f8 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 0f1c02cb5d..916203b397 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index ebcf8edcfb..ec0eec4f8a 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 47a519d330..e88010adfe 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index e1d2a7674e..04914558bd 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index aa5a2887a3..448756c857 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 24d4751b33..3bc1550aec 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index fdc089d2cd..a911f31eab 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index b13117eb72..eab90de971 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.26.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.26.0 From 1fe2f2fbb2864e995ded5220348baec60fa47b73 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Thu, 7 Sep 2023 15:18:19 +0000 Subject: [PATCH 108/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 96541f57f8..77530a8c35 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 916203b397..1db1ce3b68 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index ec0eec4f8a..7e183c8c26 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index e88010adfe..ef6d8fb4ac 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 04914558bd..4229c9f87b 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 448756c857..0378bfada3 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 3bc1550aec..517596edc4 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index a911f31eab..93ee9c4ac0 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index eab90de971..6371066955 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0 + 1.27.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.26.0 + HEAD From 8d6efaaa67d0b4316c83fb0f7641f6293e900775 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Mon, 23 Oct 2023 22:18:14 +0300 Subject: [PATCH 109/143] REPORT-902 Add MariaDb into changeSet Entries --- api/src/main/resources/liquibase.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index c9e9c06bcb..75b128df0d 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -109,7 +109,7 @@ - + SELECT count(*) FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU @@ -120,7 +120,7 @@ - + From c0264d4cc441685edf1b3332bfd464d69c8f2e42 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 3 Nov 2023 09:37:15 -0400 Subject: [PATCH 110/143] REPORT-903 - Enable configuring parameter "widgetConfiguration" from yaml report definitions --- .../reporting/config/ParameterDescriptor.java | 13 +++++++++++++ .../module/reporting/config/ReportLoader.java | 1 + 2 files changed, 14 insertions(+) diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java index 8f4f5cab94..6af071d006 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ParameterDescriptor.java @@ -2,6 +2,8 @@ import org.codehaus.jackson.annotate.JsonProperty; +import java.util.Properties; + public class ParameterDescriptor { @JsonProperty @@ -19,6 +21,9 @@ public class ParameterDescriptor { @JsonProperty private Boolean required; + @JsonProperty + private Properties widgetConfiguration; + public String getKey() { return key; } @@ -58,4 +63,12 @@ public Boolean getRequired() { public void setRequired(Boolean required) { this.required = required; } + + public Properties getWidgetConfiguration() { + return widgetConfiguration; + } + + public void setWidgetConfiguration(Properties widgetConfiguration) { + this.widgetConfiguration = widgetConfiguration; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index ac65719771..d8fedb69ad 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -130,6 +130,7 @@ public static List constructParameters(List para p.setType(parameterType); p.setDefaultValue(getParameterValue(parameterType, parameterDescriptor.getValue())); p.setRequired(BooleanUtils.isNotFalse(parameterDescriptor.getRequired())); + p.setWidgetConfiguration(parameterDescriptor.getWidgetConfiguration()); parameters.add(p); } catch (Exception e) { throw new RuntimeException("Unable to configure parameter " + parameterDescriptor.getKey(), e); From 3083d1d3add02a89de2df11992df379586435bbc Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Fri, 30 Aug 2024 14:17:55 +0300 Subject: [PATCH 111/143] TRUNK-6188: Add whitelisting for components loaded via XStream --- .../serializer/ReportingSerializer.java | 18 ++++++++++++++++++ omod/src/main/resources/config.xml | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 4e1a248cb8..9813838119 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -17,16 +17,20 @@ import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.mapper.Mapper; import com.thoughtworks.xstream.mapper.MapperWrapper; + +import org.openmrs.api.context.Context; import org.openmrs.module.serialization.xstream.XStreamShortSerializer; import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; import org.openmrs.module.serialization.xstream.mapper.HibernateCollectionMapper; import org.openmrs.module.serialization.xstream.mapper.JavassistMapper; import org.openmrs.module.serialization.xstream.mapper.NullValueMapper; import org.openmrs.serialization.SerializationException; +import org.openmrs.serialization.SimpleXStreamSerializer; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; +import java.lang.reflect.Method; public class ReportingSerializer extends XStreamShortSerializer { @@ -80,6 +84,8 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) { xstream.registerConverter(new IndicatorConverter(mapper, converterLookup)); xstream.registerConverter(new ReportDefinitionConverter(mapper, converterLookup)); + + setupXStreamSecurity(xstream); } @Override @@ -111,4 +117,16 @@ public void serializeToStream(Object object, OutputStream out) { } } + private void setupXStreamSecurity(XStream xstream) throws SerializationException { + SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); + if (serializer != null) { + try { + Method method = serializer.getClass().getMethod("initXStream", XStream.class); + method.invoke(serializer, xstream); + } + catch (Exception ex) { + throw new SerializationException("Failed to set up XStream Security", ex); + } + } + } } diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index ee045ce0ce..e2ddf1484c 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -153,6 +153,11 @@ false If true, this will automatically load reports defined by report descriptors in .OpenMRS/configuration/reports/reportdescriptors at startup + + reporting.serializer.whitelist.types + org.openmrs.module.reporting.evaluation.parameter.Parameter,org.openmrs.module.reporting.data.converter.PropertyConverter,org.openmrs.module.reporting.data.converter.ObjectFormatter,org.openmrs.module.reporting.data.converter.DateConverter,org.openmrs.module.reporting.data.converter.ChainedConverter,org.openmrs.module.reporting.common.SortCriteria$SortElement,org.openmrs.module.reporting.evaluation.parameter.Mapped + + From 6f88dc8f9c9dbc5af18ebab4f4e16bd3fdeea333 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Fri, 30 Aug 2024 15:39:11 +0300 Subject: [PATCH 112/143] Fix failing build --- api-tests-2.4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml index 3cf94963a7..1084b9051e 100644 --- a/api-tests-2.4/pom.xml +++ b/api-tests-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.26.0-SNAPSHOT + 1.27.0-SNAPSHOT reporting-api-tests-2.4 From 09b4f6cee781c29be8fc66d847691a1f1d615587 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Fri, 30 Aug 2024 16:18:42 +0300 Subject: [PATCH 113/143] TRUNK-6188 fix failing tests --- .../serializer/ReportingSerializer.java | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 9813838119..da4e3e7bbc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -9,15 +9,12 @@ */ package org.openmrs.module.reporting.serializer; -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.converters.ConverterLookup; -import com.thoughtworks.xstream.converters.DataHolder; -import com.thoughtworks.xstream.core.MapBackedDataHolder; -import com.thoughtworks.xstream.io.HierarchicalStreamReader; -import com.thoughtworks.xstream.io.xml.DomDriver; -import com.thoughtworks.xstream.mapper.Mapper; -import com.thoughtworks.xstream.mapper.MapperWrapper; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Method; +import org.openmrs.api.APIException; import org.openmrs.api.context.Context; import org.openmrs.module.serialization.xstream.XStreamShortSerializer; import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; @@ -27,10 +24,14 @@ import org.openmrs.serialization.SerializationException; import org.openmrs.serialization.SimpleXStreamSerializer; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Method; +import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.converters.ConverterLookup; +import com.thoughtworks.xstream.converters.DataHolder; +import com.thoughtworks.xstream.core.MapBackedDataHolder; +import com.thoughtworks.xstream.io.HierarchicalStreamReader; +import com.thoughtworks.xstream.io.xml.DomDriver; +import com.thoughtworks.xstream.mapper.Mapper; +import com.thoughtworks.xstream.mapper.MapperWrapper; public class ReportingSerializer extends XStreamShortSerializer { @@ -118,15 +119,20 @@ public void serializeToStream(Object object, OutputStream out) { } private void setupXStreamSecurity(XStream xstream) throws SerializationException { - SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); - if (serializer != null) { - try { - Method method = serializer.getClass().getMethod("initXStream", XStream.class); - method.invoke(serializer, xstream); - } - catch (Exception ex) { - throw new SerializationException("Failed to set up XStream Security", ex); + try { + SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); + if (serializer != null) { + try { + Method method = serializer.getClass().getMethod("initXStream", XStream.class); + method.invoke(serializer, xstream); + } + catch (Exception ex) { + throw new SerializationException("Failed to set up XStream Security", ex); + } } - } + } + catch (APIException ex) { + //Ignore APIException("Error during getting registered component) for platform versions below 2.7.0 + } } } From 6db57c43d7f325e453a20c341ac90a55ecfc16fc Mon Sep 17 00:00:00 2001 From: mogoodrich Date: Tue, 3 Sep 2024 18:07:28 -0400 Subject: [PATCH 114/143] revert: TRUNK-6188: Add whitelisting for components loaded via Xstream --- .../serializer/ReportingSerializer.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index da4e3e7bbc..6b3f761de2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -85,8 +85,6 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) { xstream.registerConverter(new IndicatorConverter(mapper, converterLookup)); xstream.registerConverter(new ReportDefinitionConverter(mapper, converterLookup)); - - setupXStreamSecurity(xstream); } @Override @@ -117,22 +115,4 @@ public void serializeToStream(Object object, OutputStream out) { throw new IllegalStateException("Unsupported encoding", e); } } - - private void setupXStreamSecurity(XStream xstream) throws SerializationException { - try { - SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); - if (serializer != null) { - try { - Method method = serializer.getClass().getMethod("initXStream", XStream.class); - method.invoke(serializer, xstream); - } - catch (Exception ex) { - throw new SerializationException("Failed to set up XStream Security", ex); - } - } - } - catch (APIException ex) { - //Ignore APIException("Error during getting registered component) for platform versions below 2.7.0 - } - } } From bd25e82ab78c04a1a68d9c5bcd9c8be4f00355ea Mon Sep 17 00:00:00 2001 From: Wikum Weerakutti Date: Fri, 22 Nov 2024 22:44:51 +0900 Subject: [PATCH 115/143] TRUNK-6218: Enable XStream whitelisting on OpenMRS Core 2.7.0 and after (#253) --- .../serializer/ReportingSerializer.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 6b3f761de2..77902707fe 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -16,6 +16,7 @@ import org.openmrs.api.APIException; import org.openmrs.api.context.Context; +import org.openmrs.module.VersionComparator; import org.openmrs.module.serialization.xstream.XStreamShortSerializer; import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; import org.openmrs.module.serialization.xstream.mapper.HibernateCollectionMapper; @@ -32,6 +33,7 @@ import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.mapper.Mapper; import com.thoughtworks.xstream.mapper.MapperWrapper; +import org.openmrs.util.OpenmrsConstants; public class ReportingSerializer extends XStreamShortSerializer { @@ -85,6 +87,11 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) { xstream.registerConverter(new IndicatorConverter(mapper, converterLookup)); xstream.registerConverter(new ReportDefinitionConverter(mapper, converterLookup)); + + // Only setup XStreamSecurity only on versions that are after 2.7.0 + if (new VersionComparator().compare(OpenmrsConstants.OPENMRS_VERSION, "2.7.0") >= 0) { + setupXStreamSecurity(xstream); + } } @Override @@ -115,4 +122,22 @@ public void serializeToStream(Object object, OutputStream out) { throw new IllegalStateException("Unsupported encoding", e); } } + + private void setupXStreamSecurity(XStream xstream) throws SerializationException { + try { + SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); + if (serializer != null) { + try { + Method method = serializer.getClass().getMethod("initXStream", XStream.class); + method.invoke(serializer, xstream); + } + catch (Exception ex) { + throw new SerializationException("Failed to set up XStream Security", ex); + } + } + } + catch (APIException ex) { + //Ignore APIException("Error during getting registered component) for platform versions below 2.7.0 + } + } } From d37011aff142c181d0941f51f6144b1220fbefe8 Mon Sep 17 00:00:00 2001 From: pwargulak Date: Thu, 2 Jan 2025 14:49:47 +0100 Subject: [PATCH 116/143] REPORT-906: Add pagination support to ReportRequest read methods (#251) Also related to O3-1494 --------- Co-authored-by: druchniewicz --- .../report/service/ReportServiceTest.java | 109 +++++++++++++++++- .../ReportTestDataset-openmrs-1.10.xml | 26 +++-- .../ReportTestDataset-openmrs-1.11.xml | 24 ++-- .../ReportTestDataset-openmrs-1.12.xml | 24 ++-- .../include/ReportTestDataset-openmrs-1.9.xml | 22 +++- .../include/ReportTestDataset-openmrs-2.0.xml | 26 +++-- .../include/ReportTestDataset-openmrs-2.1.xml | 28 +++-- .../include/ReportTestDataset-openmrs-2.2.xml | 22 +++- .../include/ReportTestDataset-openmrs-2.3.xml | 22 +++- .../include/ReportTestDataset-openmrs-2.4.xml | 22 +++- .../report/service/ReportService.java | 56 +++++++++ .../report/service/ReportServiceImpl.java | 19 ++- .../report/service/db/HibernateReportDAO.java | 65 +++++++---- .../report/service/db/ReportDAO.java | 11 +- 14 files changed, 386 insertions(+), 90 deletions(-) diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java index fcd90d4f4b..1f460db5a4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/report/service/ReportServiceTest.java @@ -42,14 +42,17 @@ import java.io.File; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Properties; import java.util.UUID; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; public class ReportServiceTest extends BaseModuleContextSensitiveTest { @@ -521,4 +524,108 @@ public void purgeReportDesignsForReportDefinition_shouldDeleteAllAssociatedRepor assertNull(rs.getReportDesignByUuid("d7a82b63-1066-4c1d-9b43-b405851fc467")); assertNull(rs.getReportDesignByUuid("e7a82b63-1066-4c1d-9b43-b405851fc467")); } -} \ No newline at end of file + + @Test + public void getReportRequests_shouldReturnCorrectReportRequests() { + final ReportService rs = Context.getService(ReportService.class); + final List reportRequests = rs.getReportRequests(null, null, null, 0,2); + + assertEquals(2, reportRequests.size()); + + final List resultUuids = mapToReportRequestUuids(reportRequests); + assertTrue(resultUuids.contains("fce15a1b-4618-4f65-bfe9-8bb60a85c110")); + assertTrue(resultUuids.contains("b0a82b63-1066-4c1d-9b43-b405851fc467")); + } + + @Test + public void getReportRequestsCount_shouldReturnTotalCount() { + final ReportService rs = Context.getService(ReportService.class); + final long totalCount = rs.getReportRequestsCount(null, null, null); + + assertEquals(4, totalCount); + } + + @Test + public void getReportRequests_shouldReturnCorrectReportRequestsForGivenReportDefinition() { + final ReportService rs = Context.getService(ReportService.class); + final ReportDefinition testReportDefinition = + rs.getReportDesignByUuid("d7a82b63-1066-4c1d-9b43-b405851fc467").getReportDefinition(); + final List reportRequests = rs.getReportRequests(testReportDefinition, null, null, 0,2); + + assertEquals(2, reportRequests.size()); + + final List resultUuids = mapToReportRequestUuids(reportRequests); + assertTrue(resultUuids.contains("h8a82b63-1066-4c1d-9b43-b405851fc467")); + assertTrue(resultUuids.contains("b0a82b63-1066-4c1d-9b43-b405851fc467")); + } + + @Test + public void getReportRequestsCount_shouldReturnCorrectTotalCountForReportDefinitionFilter() { + final ReportService rs = Context.getService(ReportService.class); + final ReportDefinition testReportDefinition = + rs.getReportDesignByUuid("d7a82b63-1066-4c1d-9b43-b405851fc467").getReportDefinition(); + final long totalCount = rs.getReportRequestsCount(testReportDefinition, null, null); + + assertEquals(2, totalCount); + } + + @Test + public void getReportRequests_shouldReturnCorrectReportRequestsForRequestedWithinDates() { + final ReportService rs = Context.getService(ReportService.class); + final Date from = newDate(2013, Calendar.JANUARY, 21, 14, 8, 48); + final Date to = newDate(2013, Calendar.JANUARY, 21, 14, 8, 49); + final List reportRequests = rs.getReportRequests(null, from, to, 0,2); + + assertEquals(2, reportRequests.size()); + + final List resultUuids = mapToReportRequestUuids(reportRequests); + assertTrue(resultUuids.contains("b0a82b63-1066-4c1d-9b43-b405851fc467")); + assertTrue(resultUuids.contains("d9a82b63-1066-4c1d-9b43-b405851fc467")); + } + + @Test + public void getReportRequestsCount_shouldReturnCorrectTotalCountForRequestedWithinDatesFilter() { + final ReportService rs = Context.getService(ReportService.class); + final Date from = newDate(2013, Calendar.JANUARY, 21, 14, 8, 48); + final Date to = newDate(2013, Calendar.JANUARY, 21, 14, 8, 49); + final long totalCount = rs.getReportRequestsCount(null, from, to); + + assertEquals(2, totalCount); + } + + @Test + public void getReportRequests_shouldReturnAPartialPageOfReportRequests() { + final ReportService rs = Context.getService(ReportService.class); + final List reportRequests = rs.getReportRequests(null, null, null, 0, 2, ReportRequest.Status.FAILED); + + assertEquals(1, reportRequests.size()); + + final List resultUuids = mapToReportRequestUuids(reportRequests); + assertTrue(resultUuids.contains("fce15a1b-4618-4f65-bfe9-8bb60a85c110")); + } + + @Test + public void getReportRequestsCount_shouldReturnCorrectTotalCountForStatusFilter() { + final ReportService rs = Context.getService(ReportService.class); + final long totalCount = rs.getReportRequestsCount(null, null, null, ReportRequest.Status.FAILED); + + assertEquals(1, totalCount); + } + + private List mapToReportRequestUuids(List reportRequests) { + List reportRequestUuids = new ArrayList(); + + for (ReportRequest reportRequest : reportRequests) { + reportRequestUuids.add(reportRequest.getUuid()); + } + + return reportRequestUuids; + } + + private Date newDate(int year, int month, int day, int hour, int minute, int second) { + final Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.set(year, month, day, hour, minute, second); + return cal.getTime(); + } +} diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml index 9563778ab6..0504594c94 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml @@ -523,11 +523,21 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - - - \ No newline at end of file + + + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml index e66c1fd330..ebe5f05ab8 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml @@ -545,11 +545,21 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + - \ No newline at end of file + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml index e66c1fd330..ebe5f05ab8 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml @@ -545,11 +545,21 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + - \ No newline at end of file + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml index 434acb502a..236aadb7ea 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml @@ -529,11 +529,21 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml index 6da1c292fd..7d6f1e489a 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml @@ -553,11 +553,21 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - - - \ No newline at end of file + + + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml index 2311993e7e..60139af0ae 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml @@ -553,12 +553,22 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - - - - \ No newline at end of file + + + + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml index bb308ce0b9..e89f14375f 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml @@ -553,12 +553,22 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml index bb308ce0b9..e89f14375f 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml @@ -553,12 +553,22 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml index bb308ce0b9..e89f14375f 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml @@ -553,12 +553,22 @@ properties="#Mon Jan 21 14:08:47 CET 2013" creator="1" date_created="2013-01-21 14:08:47" retired="0" /> - - - + + + + diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java index fac343a05a..5e4b2400c4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportService.java @@ -127,6 +127,16 @@ public interface ReportService extends OpenmrsService { public ReportRequest getReportRequestByUuid(String uuid); /** + * Get Report Requests by Report Definition, request date, having given status. + * The list is sorted descending by evaluateCompleteDatetime, evaluateStartDatetime, priority, requestDate. + * + * @param reportDefinition a Report Definition filter, nullable + * @param requestOnOrAfter a Date used to limit result to ReportRequests which ware requested on or after + * (greater or equal filter), nullable + * @param requestOnOrBefore a Date used to limit result to ReportRequests which ware requested on or before + * (lower or equal filter), nullable + * @param statuses an array of Status, used to limit result to ReportRequests with status included in the array, null + * or empty array means that all statuses are included, nullable * @return all {@link ReportRequest} in the system that match the passed parameters * @should retrieve report requests by definition */ @@ -134,12 +144,58 @@ public interface ReportService extends OpenmrsService { public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status...statuses); /** + * Get Report Requests by Report Definition, request date, having given status, limit result to at most {@code + * mostRecentNum} elements. + * The list is sorted descending by evaluateCompleteDatetime, evaluateStartDatetime, priority, requestDate. + * + * @param reportDefinition a Report Definition filter, nullable + * @param requestOnOrAfter a Date used to limit result to ReportRequests which ware requested on or after + * (greater or equal filter), nullable + * @param requestOnOrBefore a Date used to limit result to ReportRequests which ware requested on or before + * (lower or equal filter), nullable + * @param mostRecentNum maximum number of results, a null value means all records are to be returned, nullable + * @param statuses an array of Status, used to limit result to ReportRequests with status included in the array, null + * or empty array means that all statuses are included, nullable * @return all {@link ReportRequest} in the system that match the passed parameters * @should retrieve report requests by definition */ @Transactional(readOnly = true) public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer mostRecentNum, Status...statuses); + /** + * Get Report Requests by Report Definition, request date, having given status. + * The list is sorted descending by evaluateCompleteDatetime, evaluateStartDatetime, priority, requestDate. + * + * @param reportDefinition a Report Definition filter, nullable + * @param requestOnOrAfter a Date used to limit result to ReportRequests which ware requested on or after + * (greater or equal filter), nullable + * @param requestOnOrBefore a Date used to limit result to ReportRequests which ware requested on or before + * (lower or equal filter), nullable + * @param firstResult the first result to be retrieved, nullable + * @param maxResults a limit upon the number of Report Requests to be retrieved, nullable + * @param statuses an array of Status, used to limit result to ReportRequests with status included in the array, null + * or empty array means that all statuses are included, nullable + * @return all {@link ReportRequest} in the system that match the passed parameters + * @since 1.27.0 + */ + @Transactional(readOnly = true) + public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer firstResult, Integer maxResults, Status...statuses); + + /** + * Gets a count of Report Requests that match by Report Definition, request date limits and status(-es). + * + * @param reportDefinition a Report Definition filter, nullable + * @param requestOnOrAfter a Date used to limit result to ReportRequests which ware requested on or after + * (greater or equal filter), nullable + * @param requestOnOrBefore a Date used to limit result to ReportRequests which ware requested on or before + * (lower or equal filter), nullable + * @param statuses an array of Status, used to limit result to ReportRequests with status included in the array, null + * or empty array means that all statuses are included, nullable + * @return the count of Report Requests that match the passed parameters + * @since 1.27.0 + */ + public long getReportRequestsCount(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status...statuses); + /** * Deletes the passed {@link ReportRequest} */ diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java index 41d9602c06..394ab83b0e 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/ReportServiceImpl.java @@ -220,7 +220,22 @@ public List getReportRequests(ReportDefinition reportDefinition, */ @Transactional(readOnly=true) public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer mostRecentNum, Status...statuses) { - return reportDAO.getReportRequests(reportDefinition, requestOnOrAfter, requestOnOrBefore, mostRecentNum, statuses); + return getReportRequests(reportDefinition, requestOnOrAfter, requestOnOrBefore, 0, mostRecentNum, statuses); + } + + /** + * @see ReportService#getReportRequests(ReportDefinition, Date, Date, Integer, Integer, Status...) + */ + @Override + @Transactional(readOnly = true) + public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer firstResult, Integer maxResults, Status... statuses) { + return reportDAO.getReportRequests(reportDefinition, requestOnOrAfter, requestOnOrBefore, firstResult, maxResults, statuses); + } + + @Override + @Transactional(readOnly = true) + public long getReportRequestsCount(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status... statuses) { + return reportDAO.getReportRequestsCount(reportDefinition, requestOnOrAfter, requestOnOrBefore, statuses); } /** @@ -838,4 +853,4 @@ public void setReportData(ReportData reportData) { this.reportData = reportData; } } -} \ No newline at end of file +} diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java index aabed07c71..459a2e97fc 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java @@ -15,6 +15,7 @@ import org.hibernate.Query; import org.hibernate.criterion.Expression; import org.hibernate.criterion.Order; +import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; import org.openmrs.api.db.DAOException; import org.openmrs.api.db.hibernate.DbSessionFactory; @@ -187,34 +188,35 @@ public ReportRequest getReportRequestByUuid(String uuid) { } /** - * @see ReportDAO#getReportRequests(ReportDefinition, Date, Date, Integer, Status...) + * @see ReportDAO#getReportRequests(ReportDefinition, Date, Date, Integer, Integer, Status...) */ @SuppressWarnings("unchecked") - public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer mostRecentNum, Status...statuses) { - Criteria c = sessionFactory.getCurrentSession().createCriteria(ReportRequest.class); - if (reportDefinition != null) { - c.add(Restrictions.eq("reportDefinition.definition", reportDefinition.getUuid())); - } - if (requestOnOrAfter != null) { - c.add(Restrictions.ge("requestDate", requestOnOrAfter)); - } - if (requestOnOrBefore != null) { - c.add(Restrictions.le("requestDate", requestOnOrBefore)); - } - if (statuses != null && statuses.length > 0) { - c.add(Restrictions.in("status", statuses)); + public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer firstResult, Integer maxResults, Status...statuses) { + final Criteria criteria = createReportRequestsBaseCriteria(reportDefinition, requestOnOrAfter, requestOnOrBefore, statuses); + + criteria.addOrder(Order.desc("evaluateCompleteDatetime")); + criteria.addOrder(Order.desc("evaluateStartDatetime")); + criteria.addOrder(Order.desc("priority")); + criteria.addOrder(Order.desc("requestDate")); + + if (firstResult != null) { + criteria.setFirstResult(firstResult); } - c.addOrder(Order.desc("evaluateCompleteDatetime")); - c.addOrder(Order.desc("evaluateStartDatetime")); - c.addOrder(Order.desc("priority")); - c.addOrder(Order.desc("requestDate")); - if (mostRecentNum != null) { - c.setMaxResults(mostRecentNum); + if(maxResults != null) { + criteria.setMaxResults(maxResults); } - return c.list(); + + return criteria.list(); } - + + @Override + public long getReportRequestsCount(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status... statuses) { + final Criteria criteria = createReportRequestsBaseCriteria(reportDefinition, requestOnOrAfter, requestOnOrBefore, statuses); + criteria.setProjection(Projections.rowCount()); + return ((Number) criteria.uniqueResult()).longValue(); + } + /** * @see ReportDAO#purgeReportRequest(ReportRequest) */ @@ -271,5 +273,24 @@ public DbSessionFactory getSessionFactory() { public void setSessionFactory(DbSessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } + + private Criteria createReportRequestsBaseCriteria(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status... statuses) { + Criteria criteria = sessionFactory.getCurrentSession().createCriteria(ReportRequest.class); + + if (reportDefinition != null) { + criteria.add(Restrictions.eq("reportDefinition.definition", reportDefinition.getUuid())); + } + if (requestOnOrAfter != null) { + criteria.add(Restrictions.ge("requestDate", requestOnOrAfter)); + } + if (requestOnOrBefore != null) { + criteria.add(Restrictions.le("requestDate", requestOnOrBefore)); + } + if (statuses != null && statuses.length > 0) { + criteria.add(Restrictions.in("status", statuses)); + } + + return criteria; + } } diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java index c36e465c07..142b464831 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDAO.java @@ -117,11 +117,18 @@ public List getReportDesigns(ReportDefinition reportDefinition, Cl * @return the {@link ReportRequest} with the passed uuid */ public ReportRequest getReportRequestByUuid(String uuid); - + + /** + * @return all {@link ReportRequest} in the system that match the passed parameters + * @see org.openmrs.module.reporting.report.service.ReportService#getReportRequests(ReportDefinition, Date, Date, Integer, Integer, Status...) + */ + public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer firstResult, Integer maxResults, Status...statuses); + /** * @return all {@link ReportRequest} in the system that match the passed parameters + * @see org.openmrs.module.reporting.report.service.ReportService#getReportRequestsCount(ReportDefinition, Date, Date, Status...) */ - public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer mostRecentNum, Status...statuses); + public long getReportRequestsCount(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Status...statuses); /** * Deletes the passed {@link ReportRequest} From e0737bb22ecc4f2721cdf9b029e11a8e43e8b58e Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Thu, 30 Jan 2025 10:57:25 -0500 Subject: [PATCH 117/143] TRUNK-6218: Defer setup of xstream security until needed --- .../serializer/ReportingSerializer.java | 80 +++++++++++-------- omod/src/main/resources/config.xml | 4 +- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 77902707fe..58b63e19f2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -9,22 +9,6 @@ */ package org.openmrs.module.reporting.serializer; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Method; - -import org.openmrs.api.APIException; -import org.openmrs.api.context.Context; -import org.openmrs.module.VersionComparator; -import org.openmrs.module.serialization.xstream.XStreamShortSerializer; -import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; -import org.openmrs.module.serialization.xstream.mapper.HibernateCollectionMapper; -import org.openmrs.module.serialization.xstream.mapper.JavassistMapper; -import org.openmrs.module.serialization.xstream.mapper.NullValueMapper; -import org.openmrs.serialization.SerializationException; -import org.openmrs.serialization.SimpleXStreamSerializer; - import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.converters.ConverterLookup; import com.thoughtworks.xstream.converters.DataHolder; @@ -33,12 +17,29 @@ import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.mapper.Mapper; import com.thoughtworks.xstream.mapper.MapperWrapper; -import org.openmrs.util.OpenmrsConstants; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.openmrs.api.context.Context; +import org.openmrs.module.serialization.xstream.XStreamShortSerializer; +import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; +import org.openmrs.module.serialization.xstream.mapper.HibernateCollectionMapper; +import org.openmrs.module.serialization.xstream.mapper.JavassistMapper; +import org.openmrs.module.serialization.xstream.mapper.NullValueMapper; +import org.openmrs.serialization.SerializationException; +import org.openmrs.serialization.SimpleXStreamSerializer; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Method; public class ReportingSerializer extends XStreamShortSerializer { private static ThreadLocal cache = new ThreadLocal(); + + private final Log log = LogFactory.getLog(this.getClass()); + + private boolean xstreamSecuritySetup = false; /** * @throws SerializationException @@ -87,15 +88,14 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) { xstream.registerConverter(new IndicatorConverter(mapper, converterLookup)); xstream.registerConverter(new ReportDefinitionConverter(mapper, converterLookup)); - - // Only setup XStreamSecurity only on versions that are after 2.7.0 - if (new VersionComparator().compare(OpenmrsConstants.OPENMRS_VERSION, "2.7.0") >= 0) { - setupXStreamSecurity(xstream); - } } @Override synchronized public T deserialize(String serializedObject, Class clazz) throws SerializationException { + if (!xstreamSecuritySetup) { + setupXStreamSecurity(); + xstreamSecuritySetup = true; + } boolean cacheOwner = cache.get() == null; if (cacheOwner) { cache.set(new MapBackedDataHolder()); @@ -123,21 +123,31 @@ public void serializeToStream(Object object, OutputStream out) { } } - private void setupXStreamSecurity(XStream xstream) throws SerializationException { + /** + * Sets up xstream security on the Reporting Serializer to match the OpenMRS core security configuration + */ + public void setupXStreamSecurity() throws SerializationException { + log.debug("Setting up xstream security on ReportingSerializer"); + SimpleXStreamSerializer serializer = null; try { - SimpleXStreamSerializer serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); - if (serializer != null) { - try { - Method method = serializer.getClass().getMethod("initXStream", XStream.class); - method.invoke(serializer, xstream); - } - catch (Exception ex) { - throw new SerializationException("Failed to set up XStream Security", ex); - } - } + serializer = Context.getRegisteredComponent("simpleXStreamSerializer", SimpleXStreamSerializer.class); + } + catch (Exception ignored) { + } + if (serializer == null) { + log.debug("Not setting up XStream security as no simpleXStreamSerializer component is found"); + return; + } + try { + Method method = serializer.getClass().getMethod("initXStream", XStream.class); + method.invoke(serializer, xstream); + log.info("XStream security initialized on ReportingSerializer"); + } + catch (NoSuchMethodException ignored) { + log.debug("Not setting up XStream Security as no initXStream method found on SimpleXStreamSerializer"); } - catch (APIException ex) { - //Ignore APIException("Error during getting registered component) for platform versions below 2.7.0 + catch (Exception e) { + throw new SerializationException("Failed to set up XStream Security on Reporting Serializer", e); } } } diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index e2ddf1484c..23e6193693 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -155,8 +155,8 @@ reporting.serializer.whitelist.types - org.openmrs.module.reporting.evaluation.parameter.Parameter,org.openmrs.module.reporting.data.converter.PropertyConverter,org.openmrs.module.reporting.data.converter.ObjectFormatter,org.openmrs.module.reporting.data.converter.DateConverter,org.openmrs.module.reporting.data.converter.ChainedConverter,org.openmrs.module.reporting.common.SortCriteria$SortElement,org.openmrs.module.reporting.evaluation.parameter.Mapped - + org.openmrs.module.reporting.** + White-list of classes that are allowed for deserialization by the reporting module From dee614f08d0ce6afdac1334306c42d01421abe26 Mon Sep 17 00:00:00 2001 From: druchniewicz <51370022+druchniewicz@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:30:55 +0100 Subject: [PATCH 118/143] REPORT-906: Corrected order of fetching report requests (#254) --- .../reporting/report/service/db/HibernateReportDAO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java index 459a2e97fc..0dfd4db6b5 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/HibernateReportDAO.java @@ -194,10 +194,10 @@ public ReportRequest getReportRequestByUuid(String uuid) { public List getReportRequests(ReportDefinition reportDefinition, Date requestOnOrAfter, Date requestOnOrBefore, Integer firstResult, Integer maxResults, Status...statuses) { final Criteria criteria = createReportRequestsBaseCriteria(reportDefinition, requestOnOrAfter, requestOnOrBefore, statuses); - criteria.addOrder(Order.desc("evaluateCompleteDatetime")); + criteria.addOrder(Order.desc("requestDate")); criteria.addOrder(Order.desc("evaluateStartDatetime")); + criteria.addOrder(Order.desc("evaluateCompleteDatetime")); criteria.addOrder(Order.desc("priority")); - criteria.addOrder(Order.desc("requestDate")); if (firstResult != null) { criteria.setFirstResult(firstResult); From ad32909fc6b090505e74e3e02d51dae4b5cd0d81 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Thu, 6 Feb 2025 16:06:08 +0000 Subject: [PATCH 119/143] [maven-release-plugin] prepare release 1.27.0 --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index 77530a8c35..ec8c06f207 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 1db1ce3b68..8edc3b040c 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 7e183c8c26..85bb402569 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index ef6d8fb4ac..1c20d4ad15 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index 4229c9f87b..cc262bbd23 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 0378bfada3..d9e39a2180 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 517596edc4..f22d597dd7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 93ee9c4ac0..2e20d611e2 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 6371066955..a95f0fd9a7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.27.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.27.0 From 96f1fb67403bbd12c3964aea1c05a6bbff3ede71 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Thu, 6 Feb 2025 16:06:10 +0000 Subject: [PATCH 120/143] [maven-release-plugin] prepare for next development iteration --- api-1.10/pom.xml | 2 +- api-1.9/pom.xml | 2 +- api-2.0/pom.xml | 2 +- api-2.2/pom.xml | 2 +- api-2.4/pom.xml | 2 +- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml index ec8c06f207..bdab2db9ee 100644 --- a/api-1.10/pom.xml +++ b/api-1.10/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-1.10 diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml index 8edc3b040c..f9f4b777f7 100644 --- a/api-1.9/pom.xml +++ b/api-1.9/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-1.9 diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml index 85bb402569..5490a194ad 100644 --- a/api-2.0/pom.xml +++ b/api-2.0/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-2.0 diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml index 1c20d4ad15..bbdb2557cf 100644 --- a/api-2.2/pom.xml +++ b/api-2.2/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-2.2 diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml index cc262bbd23..478db21a8a 100644 --- a/api-2.4/pom.xml +++ b/api-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-2.4 diff --git a/api-tests/pom.xml b/api-tests/pom.xml index d9e39a2180..e37cf08cd4 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index f22d597dd7..f3621e24f2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 2e20d611e2..d1f7eaff0d 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index a95f0fd9a7..b45ff644e8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0 + 1.28.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.27.0 + HEAD From b515e7597e7be074d1d0a0d6158bddf0ee3ed378 Mon Sep 17 00:00:00 2001 From: Gavin Falconer Date: Wed, 2 Apr 2025 06:43:38 -0500 Subject: [PATCH 121/143] REPORT-909 Fix report renderer paths for editing report designs (#255) --- .../DelimitedTextReportRendererFormController.java | 4 ++-- .../renderers/ExcelReportRendererFormController.java | 4 ++-- .../NonConfigurableReportRendererFormController.java | 4 ++-- .../web/reports/renderers/TextTemplateFormController.java | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java index 6e1b999d8c..e2b6580652 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/DelimitedTextReportRendererFormController.java @@ -47,7 +47,7 @@ public DelimitedTextReportRendererFormController() { } /** * prepares a new form for the a DelimitedReportRenderer */ - @RequestMapping("/module/reporting/reports/renderers/delimitedTextReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/delimitedTextReportRenderer.form") public void delimitedTextReportRenderer(ModelMap model, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @RequestParam(required=false, value="reportDefinitionUuid") String reportDefinitionUuid, @@ -95,7 +95,7 @@ else if (successUrl.startsWith(pathToRemove)) { * @throws IllegalAccessException * @throws InstantiationException */ - @RequestMapping("/module/reporting/reports/renderers/saveDelimitedTextReportDesign") + @RequestMapping("/module/reporting/reports/renderers/saveDelimitedTextReportDesign.form") public String saveDelimitedTextReportDesign(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java index 8840aeb49a..1bd867229e 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/ExcelReportRendererFormController.java @@ -57,7 +57,7 @@ public ExcelReportRendererFormController() { } /** * prepares a new form for the Excel report renderers */ - @RequestMapping("/module/reporting/reports/renderers/excelReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/excelReportRenderer.form") public void excelReportRenderer(ModelMap model, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @RequestParam(required=false, value="reportDefinitionUuid") String reportDefinitionUuid, @@ -110,7 +110,7 @@ else if (successUrl.startsWith(pathToRemove)) { * @throws InstantiationException */ @SuppressWarnings("unchecked") - @RequestMapping("/module/reporting/reports/renderers/saveExcelReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/saveExcelReportRenderer.form") public String saveExcelReportRenderer(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java index acf49a3613..ffea5c5af0 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/NonConfigurableReportRendererFormController.java @@ -42,7 +42,7 @@ public NonConfigurableReportRendererFormController() { } /** * prepares a new form for the a IndicatorReportRenderer */ - @RequestMapping("/module/reporting/reports/renderers/nonConfigurableReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/nonConfigurableReportRenderer.form") public void nonConfigurableReportRenderer(ModelMap model, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @RequestParam(required=false, value="reportDefinitionUuid") String reportDefinitionUuid, @@ -78,7 +78,7 @@ else if (successUrl.startsWith(pathToRemove)) { /** * Saves report design */ - @RequestMapping("/module/reporting/reports/renderers/saveNonConfigurableReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/saveNonConfigurableReportRenderer.form") public String saveNonConfigurableReportRenderer(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java index b49e41adb0..3c35d4d8b6 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/reports/renderers/TextTemplateFormController.java @@ -79,7 +79,7 @@ public void initBinder(WebDataBinder binder) { * prepares a new form for the a TextTemplateRenderer * @throws UnsupportedEncodingException */ - @RequestMapping("/module/reporting/reports/renderers/textTemplateReportRenderer") + @RequestMapping("/module/reporting/reports/renderers/textTemplateReportRenderer.form") public void textTemplateReportRenderer(ModelMap model, @RequestParam(required=false, value="reportDesignUuid") String reportDesignUuid, @RequestParam(required=false, value="reportDefinitionUuid") String reportDefinitionUuid, @@ -124,7 +124,7 @@ else if (successUrl.startsWith(pathToRemove)) { * Saves report design * @throws UnsupportedEncodingException */ - @RequestMapping("/module/reporting/reports/renderers/saveTextTemplateReportRendererDesign") + @RequestMapping("/module/reporting/reports/renderers/saveTextTemplateReportRendererDesign.form") public String saveTextTemplateReportRendererDesign(ModelMap model, HttpServletRequest request, @RequestParam(required=false, value="uuid") String uuid, @RequestParam(required=true, value="name") String name, @@ -203,7 +203,7 @@ public UserParams userParams ( @RequestParam(required=false, value="userEnteredP return userParams; } - @RequestMapping( value="/module/reporting/reports/renderers/previewTextTemplateReportRenderer", method=RequestMethod.GET) + @RequestMapping( value="/module/reporting/reports/renderers/previewTextTemplateReportRenderer.form", method=RequestMethod.GET) public void initPreviewForm(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="reportDefinition") String reportDefinitionUuid, @RequestParam(required=false, value="uuid") String uuid, @@ -257,7 +257,7 @@ public void initPreviewForm(ModelMap model, HttpServletRequest request, } @SuppressWarnings("unchecked") - @RequestMapping(value="/module/reporting/reports/renderers/previewTextTemplateReportRenderer", method=RequestMethod.POST) + @RequestMapping(value="/module/reporting/reports/renderers/previewTextTemplateReportRenderer.form", method=RequestMethod.POST) public void previewScript(ModelMap model, HttpServletRequest request, @RequestParam(required=true, value="reportDefinition") String reportDefinitionUuid, @RequestParam(required=true, value="uuid") String uuid, From dae97bad22eebd906bbd145587b1babab916c011 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Wed, 2 Apr 2025 14:49:38 +0300 Subject: [PATCH 122/143] Update github actions to v4 --- .github/workflows/maven.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5cacb8057a..21d5b57d9f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,13 +22,13 @@ jobs: JAVA_VERSION: ${{ matrix.java-version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java-version }} - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} From 7714e259ebc56dc0a117f663967c8dffacfcd997 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Wed, 2 Apr 2025 14:54:20 +0300 Subject: [PATCH 123/143] Add distribution: 'temurin' to actions/setup-java --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 21d5b57d9f..b92a7acf6a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,6 +27,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: ${{ matrix.java-version }} + distribution: 'temurin' - name: Cache local Maven repository uses: actions/cache@v4 with: From cb32f1c2faa1054c25165bbc02d6d475252029cc Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Wed, 2 Apr 2025 14:58:17 +0300 Subject: [PATCH 124/143] Update version to match with the rest --- api-tests-2.4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml index 1084b9051e..c6f594f099 100644 --- a/api-tests-2.4/pom.xml +++ b/api-tests-2.4/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.27.0-SNAPSHOT + 1.28.0-SNAPSHOT reporting-api-tests-2.4 From 55d0576342188d07282b4fa574857b28b60bef6f Mon Sep 17 00:00:00 2001 From: Gavin Falconer Date: Thu, 3 Apr 2025 04:21:50 -0500 Subject: [PATCH 125/143] REPORT-908 Unescape XML before deserializing column definition (#259) --- .../module/reporting/web/datasets/PatientDataSetEditor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java index 33fde4915b..4430f42498 100644 --- a/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java +++ b/omod/src/main/java/org/openmrs/module/reporting/web/datasets/PatientDataSetEditor.java @@ -19,6 +19,7 @@ import javax.servlet.http.HttpSession; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.api.context.Context; @@ -193,7 +194,7 @@ public String addColumn(@RequestParam(value="label", required=false) String labe } MappedEditor editor = new MappedEditor(); - editor.setAsText(columnDefinition); + editor.setAsText(StringEscapeUtils.unescapeXml(columnDefinition)); Mapped mappedDef = (Mapped) editor.getValue(); dsd.addColumn(label, mappedDef.getParameterizable(), mappedDef.getParameterMappings()); From 5419198b3818468f4c107ccb0c8f39d2d23838b2 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 20 May 2025 15:20:02 -0400 Subject: [PATCH 126/143] REPORT-911: Add missing translations --- api/src/main/resources/messages_fr.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/resources/messages_fr.properties b/api/src/main/resources/messages_fr.properties index 837e79061d..e9ff31f773 100755 --- a/api/src/main/resources/messages_fr.properties +++ b/api/src/main/resources/messages_fr.properties @@ -64,4 +64,5 @@ reporting.reportHistory.status=État reporting.reportHistory.report=Rapport reporting.reportHistory.open=Ouvrir - +reporting.parameter.startDate=Date de début +reporting.parameter.endDate=Date d'arrêt \ No newline at end of file From e4022f6a54ff5f4f2c0ddd0fdaf810a2f0b8d890 Mon Sep 17 00:00:00 2001 From: Wikum Weerakutti Date: Mon, 9 Jun 2025 04:22:35 +0530 Subject: [PATCH 127/143] REPORT-913: Migrate to OpenMRS Platform 2.4.0 (#262) * Migrate to 2.4.0 * Move api-1.9 * Merge old api modules to the main * Set the scope of reportingcompatibility to provided --- .github/workflows/maven.yml | 3 +- api-1.10/.gitignore | 4 - api-1.10/pom.xml | 88 ---- .../BuiltInCohortDefinitionLibrary1_10.java | 49 --- ...uiltInCohortDefinitionLibrary1_10Test.java | 57 --- api-1.9/.gitignore | 1 - api-1.9/pom.xml | 80 ---- .../service/db/MappedDefinitionType.java | 209 --------- .../report/service/db/PropertiesType.java | 142 ------ .../report/service/db/RenderingModeType.java | 166 ------- .../service/db/ReportDefinitionType.java | 118 ----- .../DataExportDataSetPersisterTest.java | 170 ------- api-2.0/.gitignore | 1 - api-2.0/pom.xml | 80 ---- .../service/db/MappedDefinitionType.java | 208 --------- .../report/service/db/PropertiesType.java | 143 ------ .../report/service/db/RenderingModeType.java | 166 ------- .../service/db/ReportDefinitionType.java | 119 ----- api-2.2/.gitignore | 5 - api-2.2/pom.xml | 103 ----- .../BuiltInCohortDefinitionLibrary2_2.java | 43 -- ...BuiltInCohortDefinitionLibrary2_2Test.java | 57 --- api-2.4/.gitignore | 1 - api-2.4/pom.xml | 80 ---- api-tests-2.4/.gitignore | 1 - api-tests-2.4/pom.xml | 124 ------ .../PatientDataCalculationBehaviorTest.java | 5 +- ...onditionCohortDefinitionEvaluatorTest.java | 0 ...rugOrderCohortDefinitionEvaluatorTest.java | 14 +- .../BuiltInCohortDefinitionLibraryTest.java | 17 + .../OrderForVisitDataEvaluatorTest.java | 6 +- .../EvaluationProfilerTest24On.java | 0 ...onCohortDefinitionEvaluatorTestDataSet.xml | 0 .../include/DrugOrderCohortEvaluationData.xml | 6 +- .../definition/ConditionCohortDefinition.java | 5 +- .../definition/DrugOrderCohortDefinition.java | 5 +- .../ConditionCohortDefinitionEvaluator.java | 5 +- .../DrugOrderCohortDefinitionEvaluator.java | 14 +- .../BuiltInCohortDefinitionLibrary.java | 16 + .../DataExportDataSetDefinition.java | 0 .../evaluator/DataExportDataSetEvaluator.java | 30 +- .../DataExportDataSetDefinitionPersister.java | 0 .../service/db/MappedDefinitionType.java | 416 +++++++++--------- .../report/service/db/PropertiesType.java | 287 ++++++------ .../report/service/db/RenderingModeType.java | 332 +++++++------- .../service/db/ReportDefinitionType.java | 240 +++++----- pom.xml | 31 +- 47 files changed, 731 insertions(+), 2916 deletions(-) delete mode 100644 api-1.10/.gitignore delete mode 100644 api-1.10/pom.xml delete mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java delete mode 100644 api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java delete mode 100644 api-1.9/.gitignore delete mode 100644 api-1.9/pom.xml delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java delete mode 100644 api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java delete mode 100644 api-2.0/.gitignore delete mode 100644 api-2.0/pom.xml delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java delete mode 100644 api-2.2/.gitignore delete mode 100644 api-2.2/pom.xml delete mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java delete mode 100644 api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java delete mode 100644 api-2.4/.gitignore delete mode 100644 api-2.4/pom.xml delete mode 100644 api-tests-2.4/.gitignore delete mode 100644 api-tests-2.4/pom.xml rename {api-2.2 => api-tests}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java (100%) rename {api-1.10 => api-tests}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java (100%) rename {api-tests-2.4 => api-tests}/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java (100%) rename {api-2.2 => api-tests}/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml (100%) rename {api-1.10 => api-tests}/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml (96%) rename {api-2.2 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java (97%) rename {api-1.10 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java (99%) rename {api-2.2 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java (96%) rename {api-1.10 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java (98%) rename {api-1.9 => api}/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java (100%) rename {api-1.9 => api}/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java (81%) rename {api-1.9 => api}/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java (100%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java (94%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java (95%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java (91%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java (96%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b92a7acf6a..df6445a783 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -14,7 +14,6 @@ jobs: matrix: platform: [ ubuntu-latest ] java-version: [ 8 ] - profile: [ 1.10, 1.11, 1.12, 2.0, 2.1, 2.2, 2.3, 2.4 ] runs-on: ${{ matrix.platform }} env: @@ -36,5 +35,5 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven - run: mvn clean install -P ${{ matrix.profile }} --batch-mode --show-version --file pom.xml + run: mvn clean install --batch-mode --show-version --file pom.xml diff --git a/api-1.10/.gitignore b/api-1.10/.gitignore deleted file mode 100644 index c277ec4914..0000000000 --- a/api-1.10/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.settings -/.classpath -/.project -/target diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml deleted file mode 100644 index bdab2db9ee..0000000000 --- a/api-1.10/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-1.10 - jar - reporting Module api 1.10 - 1.10 api project for reporting - - - 1.10.6 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java deleted file mode 100644 index 6efb85e780..0000000000 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.openmrs.Concept; -import org.openmrs.CareSetting; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; -import org.openmrs.module.reporting.definition.library.DocumentedDefinition; -import org.openmrs.module.reporting.evaluation.parameter.Parameter; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -/** - * Basic set of cohort definitions - */ -@Component -public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { - - - - @DocumentedDefinition("drugOrderSearch") - public CohortDefinition getDrugOrderSearch() { - CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); - drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); - drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); - drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); - drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); - drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); - return drugOrderCohortDefinition; - } -} diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java deleted file mode 100644 index f975d8e06e..0000000000 --- a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.junit.Before; -import org.junit.Test; -import org.openmrs.CareSetting; -import org.openmrs.Concept; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; - -import java.util.Date; -import java.util.List; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; - -/** - * - */ -public class BuiltInCohortDefinitionLibrary1_10Test { - - private BuiltInCohortDefinitionLibrary1_10 library; - - @Before - public void setUp() throws Exception { - library = new BuiltInCohortDefinitionLibrary1_10(); - } - - @Test - public void testgetDrugOrderSearch() throws Exception { - CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch(); - assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass())); - assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class)); - } - -} diff --git a/api-1.9/.gitignore b/api-1.9/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-1.9/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml deleted file mode 100644 index f9f4b777f7..0000000000 --- a/api-1.9/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-1.9 - jar - reporting Module api 1.9 - 1.9 api project for reporting - - - 1.9.9 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java deleted file mode 100644 index 7a214dd25f..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } -} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java deleted file mode 100644 index 1f5a014233..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.hibernate.HibernateException; -import org.hibernate.usertype.UserType; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import static java.sql.Types.VARCHAR; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java deleted file mode 100644 index 3c344c3f66..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } -} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java deleted file mode 100644 index b83c9cf328..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} diff --git a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java deleted file mode 100644 index 3ec2cb10f7..0000000000 --- a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.dataset; - -import java.util.List; - -import org.junit.Assert; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.dataset.definition.DataExportDataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.persister.DataExportDataSetDefinitionPersister; -import org.openmrs.module.reporting.dataset.definition.persister.DataSetDefinitionPersister; -import org.openmrs.reporting.ReportObjectService; -import org.openmrs.reporting.export.DataExportReportObject; -import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.openmrs.test.StartModule; - -/** - * Test of the Data Export Data Set Persister - */ -@SuppressWarnings("deprecation") -@StartModule( { "org/openmrs/module/reporting/include/reportingcompatibility-1.5.3.omod" }) -@Ignore -public class DataExportDataSetPersisterTest extends BaseModuleContextSensitiveTest { - - protected static Log log = LogFactory.getLog(DataExportDataSetPersisterTest.class); - - @Before - public void setupInitialData() throws Exception { - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Last Weight"); - ro.setDescription("Description 1"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("weight", "LAST", 1, "5089", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test CD4"); - ro.setDescription("Description 2"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("cd4", "LAST", 1, "5497", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Name"); - ro.setDescription("Description 3"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addSimpleColumn("name", "personName"); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test First 3 Weights"); - ro.setDescription("Description 4"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("weight", "FIRST", 3, "5089", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Gender"); - ro.setDescription("Description 5"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addSimpleColumn("gender", "patient.gender"); - Context.getReportObjectService().saveReportObject(ro); - } - } - - @Test - public void shouldReturnDataSetDefinitionIfExists() throws Exception { - // big time hack: this test only works if it's first, because I'm creating the Data Exports programmatically, and each run they get new autonumbered ids. - // if the initial data gets set up via executing an xml dataset instead, then this test can be anywhere in the class - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition def = persister.getDefinition(1); - Assert.assertNotNull("Should return dataset definition if exists", def); - } - - /** - * Tests whether the persister returns all dataset definitions. - * - * @throws Exception - */ - @Test - public void shouldGetAllDataSetDefinitions() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(false); - Assert.assertEquals("Should return all dataset definitions", 5, list.size()); - } - - @Test - public void shouldReturnAllDatasetDefinitionsIncludingRetired() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(true); - Assert.assertEquals("Should return all dataset definitions, including retired", 5, list.size()); - } - - @Test - public void shouldReturnAllDatasetDefinitionsExcludingRetired() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(false); - Assert.assertEquals("Should return all dataset definitions, excluding retired", 5, list.size()); - } - - @Test - public void shouldReturnNullIfNotExist() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition def = persister.getDefinition(999); - Assert.assertNull("Should return null if not exists", def); - } - @Test - public void shouldReturnNullIfNameDoesNotMatch() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List def = - persister.getDefinitions("Dataset definition that does not exist", true); - Assert.assertEquals(0, def.size()); - } - - @Test - public void shouldReturnDataSetDefinitionIfNameMatches() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List def = - persister.getDefinitions("Test First 3 Weights", true); - Assert.assertEquals(1, def.size()); - } - - @Test(expected=UnsupportedOperationException.class) - public void shouldNotBeAbleToModifyUnderlyingDataExport() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition datasetDefinition = persister.getDefinitions("Test First 3 Weights", true).get(0); - datasetDefinition.setName("My Data Set Definition"); - } - - @Test - public void shouldSetIdentifierAfterSave() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataExportReportObject dataExport = (DataExportReportObject) Context.getService(ReportObjectService.class).getReportObject(45); - dataExport.setReportObjectId(null); - dataExport.setName("My Data Set Definition"); - // Save an existing data set definition - DataSetDefinition datasetDefinition = new DataExportDataSetDefinition(dataExport); - datasetDefinition = persister.saveDefinition(datasetDefinition); - Assert.assertNotNull("Should set identifier after saving dataset definition", datasetDefinition.getId()); - } - - @Test - public void shouldRemoveDataSetDefintion() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition beforePurge = persister.getDefinitions("Test First 3 Weights", true).get(0); - int idBefore = beforePurge.getId(); - persister.purgeDefinition(beforePurge); - DataSetDefinition afterPurge = persister.getDefinition(idBefore); - Assert.assertNull(afterPurge); - } -} diff --git a/api-2.0/.gitignore b/api-2.0/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-2.0/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml deleted file mode 100644 index 5490a194ad..0000000000 --- a/api-2.0/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.0 - jar - reporting Module api 2.0 - 2.0 api project for reporting - - - 2.0.0-alpha - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java deleted file mode 100644 index 2354ae0d79..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } -} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java deleted file mode 100644 index 8ae4703616..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import static java.sql.Types.VARCHAR; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.usertype.UserType; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java deleted file mode 100644 index bd7058d629..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } -} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java deleted file mode 100644 index 5dd4336231..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} diff --git a/api-2.2/.gitignore b/api-2.2/.gitignore deleted file mode 100644 index 0b40cb3336..0000000000 --- a/api-2.2/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/.settings -/.classpath -/.project -/target -/bin/ diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml deleted file mode 100644 index bbdb2557cf..0000000000 --- a/api-2.2/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.2 - jar - reporting Module api 2.2 - 2.2 api project for reporting - - - 2.2.0 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.test - openmrs-test - pom - test - ${openMRSVersion} - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - - - - org.openmrs.api - openmrs-api - test-jar - test - ${openMRSVersion} - - - - org.openmrs.module - reportingcompatibility-api - ${reportingCompatibilityVersion} - test - - - cglib - cglib-nodep - 2.2 - test - - - org.codehaus.jackson - jackson-core-asl - 1.9.13 - test - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java deleted file mode 100644 index c742ed349a..0000000000 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.openmrs.Concept; -import org.openmrs.CareSetting; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; -import org.openmrs.module.reporting.definition.library.DocumentedDefinition; -import org.openmrs.module.reporting.evaluation.parameter.Parameter; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -@Component -public class BuiltInCohortDefinitionLibrary2_2 extends BuiltInCohortDefinitionLibrary { - - @DocumentedDefinition("conditonSearchAdvanced") - public CohortDefinition getConditonSearchAdvanced() { - ConditionCohortDefinition cd = new ConditionCohortDefinition(); - cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); - cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); - cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); - cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); - cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); - return cd; - } -} diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java deleted file mode 100644 index 60000944db..0000000000 --- a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import java.util.Date; - -import org.junit.Before; -import org.junit.Test; -import org.openmrs.Concept; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; - -import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; - - -public class BuiltInCohortDefinitionLibrary2_2Test { - - private BuiltInCohortDefinitionLibrary2_2 library; - - @Before - public void setUp() throws Exception { - library = new BuiltInCohortDefinitionLibrary2_2(); - } - - @Test - public void testGetConditonSearchAdavanced() throws Exception { - CohortDefinition cd = library.getConditonSearchAdvanced(); - assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); - assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); - assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); - assertThat(cd, hasParameter("activeOnDate", Date.class)); - assertThat(cd, hasParameter("conditionNonCoded", String.class)); - assertThat(cd, hasParameter("conditionCoded", Concept.class)); - } -} diff --git a/api-2.4/.gitignore b/api-2.4/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-2.4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml deleted file mode 100644 index 478db21a8a..0000000000 --- a/api-2.4/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.4 - jar - reporting Module api 2.4 - 2.4 api project for reporting - - - 2.4.0 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-tests-2.4/.gitignore b/api-tests-2.4/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/api-tests-2.4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml deleted file mode 100644 index c6f594f099..0000000000 --- a/api-tests-2.4/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-tests-2.4 - jar - reporting API Tests for 2.4+ - API tests for reporting - - - - org.openmrs.module - reporting-api - ${project.parent.version} - - - org.openmrs.module - reporting-api - ${project.parent.version} - tests - - - javassist - javassist - - - - - org.openmrs.module - ${reportingApiConditionalArtifactId} - ${project.parent.version} - - - org.openmrs.module - reporting-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - - - javassist - javassist - - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - tests - - - javassist - javassist - - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - - - javassist - javassist - - - - - org.openmrs.web - openmrs-web - ${openMRSVersion} - - - - - - - src/main/resources - true - - - - - src/test/resources - true - - **/*.xml - **/*.txt - **/*.properties - - - - src/test/resources - false - - **/*.xml - **/*.txt - **/*.properties - - - - - - - ${project.parent.artifactId} - ${project.parent.name} - ${project.parent.version} - ${project.parent.groupId}.${project.parent.artifactId} - - - diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java index 5cbe226399..341cffdf90 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java @@ -12,6 +12,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -47,8 +48,8 @@ public void setup() throws Exception { public void evaluate_shouldEvaluateAPatientCalculation() throws Exception { Integer patientId1 = 2; Integer patientId2 = 7; - Set identifiers1 = ps.getPatient(patientId1).getIdentifiers(); - Set identifiers2 = ps.getPatient(patientId2).getIdentifiers(); + Set identifiers1 = new HashSet<>(ps.getPatient(patientId1).getIdentifiers()); + Set identifiers2 = new HashSet<>(ps.getPatient(patientId2).getIdentifiers()); PatientDataCalculation calculation = new PatientDataCalculationProvider().getCalculation( "org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition", null); Map parameters = new HashMap(); diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java rename to api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java rename to api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java index ec30196cdf..d0510ce9bc 100644 --- a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java @@ -10,26 +10,26 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; -import java.util.ArrayList; -import java.util.List; -import java.util.Date; +import org.apache.commons.lang3.time.DateUtils; import org.junit.After; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.openmrs.CareSetting; import org.openmrs.Cohort; import org.openmrs.Concept; -import org.openmrs.CareSetting; import org.openmrs.Drug; import org.openmrs.api.OrderService; import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionService; import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.common.Match; import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.apache.commons.lang3.time.DateUtils; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; public class DrugOrderCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest { diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java index 641aa69a77..31aecdbec4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java @@ -11,10 +11,12 @@ import org.junit.Before; import org.junit.Test; +import org.openmrs.Concept; import org.openmrs.EncounterType; import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition; @@ -143,4 +145,19 @@ public void testGetDiedDuringPeriod() throws Exception { assertThat(cd, hasParameter("startDate", Date.class)); assertThat(cd, hasParameter("endDate", Date.class)); } + + @Test + public void testGetConditonSearchAdavanced() throws Exception { + CohortDefinition cd = library.getConditonSearchAdvanced(); + assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); + assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); + assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); + assertThat(cd, hasParameter("activeOnDate", Date.class)); + assertThat(cd, hasParameter("conditionNonCoded", String.class)); + assertThat(cd, hasParameter("conditionCoded", Concept.class)); + } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java index a9cd62c794..674364710b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java @@ -10,6 +10,7 @@ package org.openmrs.module.reporting.data.visit.evaluator; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.Assert; @@ -34,6 +35,7 @@ import org.openmrs.module.reporting.query.visit.VisitIdSet; import org.openmrs.test.BaseContextSensitiveTest; import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; import org.openmrs.util.OpenmrsConstants; import org.springframework.beans.factory.annotation.Autowired; @@ -66,7 +68,6 @@ public class OrderForVisitDataEvaluatorTest extends BaseModuleContextSensitiveTe */ @Before public void setup() throws Exception { - if (ModuleUtil.compareVersion(OpenmrsConstants.OPENMRS_VERSION, "1.10") < 0) { setup1_9(); } else { @@ -117,6 +118,7 @@ private void setup1_10() throws Exception { */ @Test public void evaluate_shouldReturnAllOrdersForAVisit() throws Exception { + OrderType orderType = orderService.getOrderType(1); VisitEvaluationContext context = new VisitEvaluationContext(); context.setBaseVisits(new VisitIdSet(1)); @@ -140,7 +142,7 @@ public void evaluate_shouldFilterByType() throws Exception { OrderForVisitDataDefinition d = new OrderForVisitDataDefinition(); - d.setTypes(Arrays.asList(orderService.getOrderType(1))); + d.setTypes(Collections.singletonList(orderService.getOrderType(1))); EvaluatedVisitData vd = Context.getService(VisitDataService.class).evaluate(d, context); Assert.assertEquals(expectedOrdersWithType.intValue(), ((List) vd.getData().get(1)).size()); diff --git a/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java similarity index 100% rename from api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java rename to api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java diff --git a/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml similarity index 100% rename from api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml rename to api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml diff --git a/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml similarity index 96% rename from api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml rename to api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml index 4bf9879a5f..a0da3b8819 100644 --- a/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml @@ -74,10 +74,10 @@ - + - - + + diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java similarity index 97% rename from api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java index 252ea4eba2..e2e4818b6e 100644 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java @@ -10,15 +10,14 @@ */ package org.openmrs.module.reporting.cohort.definition; -import java.util.Date; - import org.openmrs.Concept; -import org.openmrs.module.reporting.cohort.definition.BaseCohortDefinition; import org.openmrs.module.reporting.common.Localized; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; +import java.util.Date; + @Caching(strategy = ConfigurationPropertyCachingStrategy.class) @Localized("reporting.ConditionCohortDefinition") public class ConditionCohortDefinition extends BaseCohortDefinition { diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java similarity index 99% rename from api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java index f73c89cc84..3f5427244b 100644 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java @@ -10,12 +10,11 @@ package org.openmrs.module.reporting.cohort.definition; -import org.openmrs.Concept; import org.openmrs.CareSetting; +import org.openmrs.Concept; import org.openmrs.Drug; - -import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.common.Localized; +import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java similarity index 96% rename from api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java index 297132acd4..a9b13598e9 100644 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java @@ -9,20 +9,19 @@ */ package org.openmrs.module.reporting.cohort.definition.evaluator; -import java.util.List; - import org.openmrs.Cohort; import org.openmrs.Condition; import org.openmrs.annotation.Handler; import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.evaluator.CohortDefinitionEvaluator; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; import org.springframework.beans.factory.annotation.Autowired; +import java.util.List; + @Handler(supports = { ConditionCohortDefinition.class }) public class ConditionCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java similarity index 98% rename from api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java index 58b7a19fc8..f6ac3c19f6 100644 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java @@ -10,22 +10,20 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; -import org.apache.commons.lang3.time.DateUtils; import org.openmrs.Cohort; import org.openmrs.DrugOrder; +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.common.ObjectUtil; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; -import org.openmrs.module.reporting.cohort.EvaluatedCohort; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; -import org.openmrs.module.reporting.common.ObjectUtil; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.annotation.Handler; - import org.springframework.beans.factory.annotation.Autowired; + import java.util.List; -import java.util.Date; @Handler(supports = { DrugOrderCohortDefinition.class }) public class DrugOrderCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java index 248830b7e9..fc0eb2791c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java @@ -19,6 +19,7 @@ import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.InProgramCohortDefinition; @@ -272,4 +273,19 @@ public CohortDefinition getPatientsInState() { cd.addParameter(new Parameter("onDate", "reporting.parameter.date", Date.class)); return cd; } + + @DocumentedDefinition("conditonSearchAdvanced") + public CohortDefinition getConditonSearchAdvanced() { + ConditionCohortDefinition cd = new ConditionCohortDefinition(); + cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); + cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); + cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); + cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); + cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); + return cd; + } } diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java similarity index 100% rename from api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java rename to api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java similarity index 81% rename from api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java rename to api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java index 460ba2cf56..c7b1ab0237 100644 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java @@ -9,10 +9,6 @@ */ package org.openmrs.module.reporting.dataset.definition.evaluator; -import java.io.File; -import java.util.HashMap; -import java.util.Map; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.annotation.Handler; @@ -28,6 +24,10 @@ import org.openmrs.reporting.export.DataExportUtil; import org.openmrs.util.OpenmrsUtil; +import java.io.File; +import java.util.HashMap; +import java.util.Map; + /** * The logic that evaluates a {@link DataExportDataSetDefinition} and produces a {@link DataSet} * @see DataExportDataSetDefinition @@ -55,7 +55,7 @@ public DataSet evaluate(DataSetDefinition definition, EvaluationContext context) try { DataExportDataSetDefinition dataExportDefinition = (DataExportDataSetDefinition) definition; DataExportReportObject dataExport = dataExportDefinition.getDataExport(); - DataExportUtil.generateExport(dataExport, context.getBaseCohort(), null); + DataExportUtil.generateExport(dataExport, convertCohort(context.getBaseCohort()), null); File dataFile = DataExportUtil.getGeneratedFile(dataExportDefinition.getDataExport()); @@ -89,4 +89,24 @@ public DataSet evaluate(DataSetDefinition definition, EvaluationContext context) } return dataSet; } + + private org.openmrs.cohort.Cohort convertCohort(org.openmrs.Cohort cohort) { + org.openmrs.cohort.Cohort c = new org.openmrs.cohort.Cohort(); + c.setCohortId(cohort.getId()); + c.setName(cohort.getName()); + c.setDescription(cohort.getDescription()); + c.setMemberIds(cohort.getMemberIds()); + + c.setUuid(cohort.getUuid()); + c.setCreator(cohort.getCreator()); + c.setDateCreated(cohort.getDateCreated()); + c.setChangedBy(cohort.getChangedBy()); + c.setDateChanged(cohort.getDateChanged()); + c.setVoided(cohort.getVoided()); + c.setVoidedBy(cohort.getVoidedBy()); + c.setDateVoided(cohort.getDateVoided()); + c.setVoidReason(cohort.getVoidReason()); + + return c; + } } diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java b/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java similarity index 100% rename from api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java rename to api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java similarity index 94% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java index b6d3744c8c..be83b0e291 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -1,209 +1,209 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(Object, int, Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } } \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java similarity index 95% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java index a39f3f5c2b..55faf26a12 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -1,144 +1,143 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import static java.sql.Types.VARCHAR; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import static java.sql.Types.VARCHAR; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java similarity index 91% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java index 008ab123f9..bfce0700c1 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -1,167 +1,167 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(Object, int, Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, org.hibernate.engine.SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } } \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java similarity index 96% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java index 5f2a1be77f..4caeb1dca3 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -1,120 +1,120 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/pom.xml b/pom.xml index b45ff644e8..1a06fa1776 100644 --- a/pom.xml +++ b/pom.xml @@ -33,23 +33,17 @@ api - api-1.9 - api-1.10 - api-2.0 - api-2.2 - api-2.4 api-tests omod - 1.9.9 + 2.4.1 2.0.6 - 1.9 + 2.4 1.7.2 0.2.14 1.2 - 1.5.0 2.1.1 3.12 1.8.7 @@ -107,19 +101,6 @@
- - org.codehaus.jackson - jackson-core-asl - ${jacksonVersion} - provided - - - - org.codehaus.jackson - jackson-mapper-asl - ${jacksonVersion} - provided - org.codehaus.groovy @@ -469,8 +450,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.8 + 1.8 @@ -485,10 +466,10 @@ org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.5.3 - -Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true + -Xmx1024m -Xms1024m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true ${java.io.tmpdir} From b360c9f8f05f8be784880731468dbe840fa2b32a Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Mon, 16 Jun 2025 11:30:31 -0400 Subject: [PATCH 128/143] Revert "REPORT-913: Migrate to OpenMRS Platform 2.4.0 (#262)" This reverts commit e4022f6a54ff5f4f2c0ddd0fdaf810a2f0b8d890. --- .github/workflows/maven.yml | 3 +- api-1.10/.gitignore | 4 + api-1.10/pom.xml | 88 ++++ .../definition/DrugOrderCohortDefinition.java | 5 +- .../DrugOrderCohortDefinitionEvaluator.java | 14 +- .../BuiltInCohortDefinitionLibrary1_10.java | 49 +++ ...rugOrderCohortDefinitionEvaluatorTest.java | 14 +- ...uiltInCohortDefinitionLibrary1_10Test.java | 57 +++ .../include/DrugOrderCohortEvaluationData.xml | 6 +- api-1.9/.gitignore | 1 + api-1.9/pom.xml | 80 ++++ .../DataExportDataSetDefinition.java | 0 .../evaluator/DataExportDataSetEvaluator.java | 30 +- .../DataExportDataSetDefinitionPersister.java | 0 .../service/db/MappedDefinitionType.java | 209 +++++++++ .../report/service/db/PropertiesType.java | 142 ++++++ .../report/service/db/RenderingModeType.java | 166 +++++++ .../service/db/ReportDefinitionType.java | 118 +++++ .../DataExportDataSetPersisterTest.java | 170 +++++++ api-2.0/.gitignore | 1 + api-2.0/pom.xml | 80 ++++ .../service/db/MappedDefinitionType.java | 208 +++++++++ .../report/service/db/PropertiesType.java | 143 ++++++ .../report/service/db/RenderingModeType.java | 166 +++++++ .../service/db/ReportDefinitionType.java | 119 +++++ api-2.2/.gitignore | 5 + api-2.2/pom.xml | 103 +++++ .../definition/ConditionCohortDefinition.java | 5 +- .../ConditionCohortDefinitionEvaluator.java | 5 +- .../BuiltInCohortDefinitionLibrary2_2.java | 43 ++ ...onditionCohortDefinitionEvaluatorTest.java | 0 ...BuiltInCohortDefinitionLibrary2_2Test.java | 57 +++ ...onCohortDefinitionEvaluatorTestDataSet.xml | 0 api-2.4/.gitignore | 1 + api-2.4/pom.xml | 80 ++++ .../service/db/MappedDefinitionType.java | 416 +++++++++--------- .../report/service/db/PropertiesType.java | 287 ++++++------ .../report/service/db/RenderingModeType.java | 332 +++++++------- .../service/db/ReportDefinitionType.java | 240 +++++----- api-tests-2.4/.gitignore | 1 + api-tests-2.4/pom.xml | 124 ++++++ .../EvaluationProfilerTest24On.java | 0 .../PatientDataCalculationBehaviorTest.java | 5 +- .../BuiltInCohortDefinitionLibraryTest.java | 17 - .../OrderForVisitDataEvaluatorTest.java | 6 +- .../BuiltInCohortDefinitionLibrary.java | 16 - pom.xml | 31 +- 47 files changed, 2916 insertions(+), 731 deletions(-) create mode 100644 api-1.10/.gitignore create mode 100644 api-1.10/pom.xml rename {api => api-1.10}/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java (99%) rename {api => api-1.10}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java (98%) create mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java rename {api-tests => api-1.10}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java (100%) create mode 100644 api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java rename {api-tests => api-1.10}/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml (96%) create mode 100644 api-1.9/.gitignore create mode 100644 api-1.9/pom.xml rename {api => api-1.9}/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java (100%) rename {api => api-1.9}/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java (81%) rename {api => api-1.9}/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java (100%) create mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java create mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java create mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java create mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java create mode 100644 api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java create mode 100644 api-2.0/.gitignore create mode 100644 api-2.0/pom.xml create mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java create mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java create mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java create mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java create mode 100644 api-2.2/.gitignore create mode 100644 api-2.2/pom.xml rename {api => api-2.2}/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java (97%) rename {api => api-2.2}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java (96%) create mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java rename {api-tests => api-2.2}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java (100%) create mode 100644 api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java rename {api-tests => api-2.2}/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml (100%) create mode 100644 api-2.4/.gitignore create mode 100644 api-2.4/pom.xml rename {api => api-2.4}/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java (94%) rename {api => api-2.4}/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java (95%) rename {api => api-2.4}/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java (91%) rename {api => api-2.4}/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java (96%) create mode 100644 api-tests-2.4/.gitignore create mode 100644 api-tests-2.4/pom.xml rename {api-tests => api-tests-2.4}/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java (100%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index df6445a783..b92a7acf6a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -14,6 +14,7 @@ jobs: matrix: platform: [ ubuntu-latest ] java-version: [ 8 ] + profile: [ 1.10, 1.11, 1.12, 2.0, 2.1, 2.2, 2.3, 2.4 ] runs-on: ${{ matrix.platform }} env: @@ -35,5 +36,5 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven - run: mvn clean install --batch-mode --show-version --file pom.xml + run: mvn clean install -P ${{ matrix.profile }} --batch-mode --show-version --file pom.xml diff --git a/api-1.10/.gitignore b/api-1.10/.gitignore new file mode 100644 index 0000000000..c277ec4914 --- /dev/null +++ b/api-1.10/.gitignore @@ -0,0 +1,4 @@ +/.settings +/.classpath +/.project +/target diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml new file mode 100644 index 0000000000..bdab2db9ee --- /dev/null +++ b/api-1.10/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-1.10 + jar + reporting Module api 1.10 + 1.10 api project for reporting + + + 1.10.6 + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api-tests + ${project.parent.version} + test-jar + test + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java similarity index 99% rename from api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java rename to api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java index 3f5427244b..f73c89cc84 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java @@ -10,11 +10,12 @@ package org.openmrs.module.reporting.cohort.definition; -import org.openmrs.CareSetting; import org.openmrs.Concept; +import org.openmrs.CareSetting; import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Localized; + import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.common.Localized; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java similarity index 98% rename from api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java rename to api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java index f6ac3c19f6..58b7a19fc8 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java @@ -10,20 +10,22 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; +import org.apache.commons.lang3.time.DateUtils; import org.openmrs.Cohort; import org.openmrs.DrugOrder; -import org.openmrs.annotation.Handler; -import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.common.ObjectUtil; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; -import org.springframework.beans.factory.annotation.Autowired; +import org.openmrs.module.reporting.cohort.EvaluatedCohort; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.common.ObjectUtil; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.annotation.Handler; +import org.springframework.beans.factory.annotation.Autowired; import java.util.List; +import java.util.Date; @Handler(supports = { DrugOrderCohortDefinition.class }) public class DrugOrderCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java new file mode 100644 index 0000000000..6efb85e780 --- /dev/null +++ b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java @@ -0,0 +1,49 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; + +import org.openmrs.Concept; +import org.openmrs.CareSetting; +import org.openmrs.Drug; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; +import org.openmrs.module.reporting.definition.library.DocumentedDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.springframework.stereotype.Component; + +import java.util.Date; +import java.util.List; + +/** + * Basic set of cohort definitions + */ +@Component +public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { + + + + @DocumentedDefinition("drugOrderSearch") + public CohortDefinition getDrugOrderSearch() { + CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); + drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); + drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); + drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); + drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); + drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); + return drugOrderCohortDefinition; + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java rename to api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java index d0510ce9bc..ec30196cdf 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java +++ b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java @@ -10,26 +10,26 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; -import org.apache.commons.lang3.time.DateUtils; +import java.util.ArrayList; +import java.util.List; +import java.util.Date; import org.junit.After; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.openmrs.CareSetting; import org.openmrs.Cohort; import org.openmrs.Concept; +import org.openmrs.CareSetting; import org.openmrs.Drug; import org.openmrs.api.OrderService; import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionService; import org.openmrs.module.reporting.common.DateUtil; -import org.openmrs.module.reporting.common.Match; import org.openmrs.test.BaseModuleContextSensitiveTest; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import org.apache.commons.lang3.time.DateUtils; public class DrugOrderCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest { diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java new file mode 100644 index 0000000000..f975d8e06e --- /dev/null +++ b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java @@ -0,0 +1,57 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; + +import org.junit.Before; +import org.junit.Test; +import org.openmrs.CareSetting; +import org.openmrs.Concept; +import org.openmrs.Drug; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; + +import java.util.Date; +import java.util.List; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; + +/** + * + */ +public class BuiltInCohortDefinitionLibrary1_10Test { + + private BuiltInCohortDefinitionLibrary1_10 library; + + @Before + public void setUp() throws Exception { + library = new BuiltInCohortDefinitionLibrary1_10(); + } + + @Test + public void testgetDrugOrderSearch() throws Exception { + CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch(); + assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass())); + assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class)); + assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class)); + assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class)); + } + +} diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml b/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml similarity index 96% rename from api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml rename to api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml index a0da3b8819..4bf9879a5f 100644 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml +++ b/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml @@ -74,10 +74,10 @@ - + - - + + diff --git a/api-1.9/.gitignore b/api-1.9/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/api-1.9/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml new file mode 100644 index 0000000000..f9f4b777f7 --- /dev/null +++ b/api-1.9/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-1.9 + jar + reporting Module api 1.9 + 1.9 api project for reporting + + + 1.9.9 + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java similarity index 100% rename from api/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java rename to api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java similarity index 81% rename from api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java rename to api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java index c7b1ab0237..460ba2cf56 100644 --- a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java @@ -9,6 +9,10 @@ */ package org.openmrs.module.reporting.dataset.definition.evaluator; +import java.io.File; +import java.util.HashMap; +import java.util.Map; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.annotation.Handler; @@ -24,10 +28,6 @@ import org.openmrs.reporting.export.DataExportUtil; import org.openmrs.util.OpenmrsUtil; -import java.io.File; -import java.util.HashMap; -import java.util.Map; - /** * The logic that evaluates a {@link DataExportDataSetDefinition} and produces a {@link DataSet} * @see DataExportDataSetDefinition @@ -55,7 +55,7 @@ public DataSet evaluate(DataSetDefinition definition, EvaluationContext context) try { DataExportDataSetDefinition dataExportDefinition = (DataExportDataSetDefinition) definition; DataExportReportObject dataExport = dataExportDefinition.getDataExport(); - DataExportUtil.generateExport(dataExport, convertCohort(context.getBaseCohort()), null); + DataExportUtil.generateExport(dataExport, context.getBaseCohort(), null); File dataFile = DataExportUtil.getGeneratedFile(dataExportDefinition.getDataExport()); @@ -89,24 +89,4 @@ public DataSet evaluate(DataSetDefinition definition, EvaluationContext context) } return dataSet; } - - private org.openmrs.cohort.Cohort convertCohort(org.openmrs.Cohort cohort) { - org.openmrs.cohort.Cohort c = new org.openmrs.cohort.Cohort(); - c.setCohortId(cohort.getId()); - c.setName(cohort.getName()); - c.setDescription(cohort.getDescription()); - c.setMemberIds(cohort.getMemberIds()); - - c.setUuid(cohort.getUuid()); - c.setCreator(cohort.getCreator()); - c.setDateCreated(cohort.getDateCreated()); - c.setChangedBy(cohort.getChangedBy()); - c.setDateChanged(cohort.getDateChanged()); - c.setVoided(cohort.getVoided()); - c.setVoidedBy(cohort.getVoidedBy()); - c.setDateVoided(cohort.getDateVoided()); - c.setVoidReason(cohort.getVoidReason()); - - return c; - } } diff --git a/api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java similarity index 100% rename from api/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java rename to api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java new file mode 100644 index 0000000000..7a214dd25f --- /dev/null +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -0,0 +1,209 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.engine.SessionImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } +} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java new file mode 100644 index 0000000000..1f5a014233 --- /dev/null +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -0,0 +1,142 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.usertype.UserType; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import static java.sql.Types.VARCHAR; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java new file mode 100644 index 0000000000..3c344c3f66 --- /dev/null +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -0,0 +1,166 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.hibernate.HibernateException; +import org.hibernate.engine.SessionImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) + */ + public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } +} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java new file mode 100644 index 0000000000..b83c9cf328 --- /dev/null +++ b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -0,0 +1,118 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import org.hibernate.HibernateException; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java new file mode 100644 index 0000000000..3ec2cb10f7 --- /dev/null +++ b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java @@ -0,0 +1,170 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.dataset; + +import java.util.List; + +import org.junit.Assert; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.dataset.definition.DataExportDataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; +import org.openmrs.module.reporting.dataset.definition.persister.DataExportDataSetDefinitionPersister; +import org.openmrs.module.reporting.dataset.definition.persister.DataSetDefinitionPersister; +import org.openmrs.reporting.ReportObjectService; +import org.openmrs.reporting.export.DataExportReportObject; +import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.StartModule; + +/** + * Test of the Data Export Data Set Persister + */ +@SuppressWarnings("deprecation") +@StartModule( { "org/openmrs/module/reporting/include/reportingcompatibility-1.5.3.omod" }) +@Ignore +public class DataExportDataSetPersisterTest extends BaseModuleContextSensitiveTest { + + protected static Log log = LogFactory.getLog(DataExportDataSetPersisterTest.class); + + @Before + public void setupInitialData() throws Exception { + { + DataExportReportObject ro = new DataExportReportObject(); + ro.setName("Test Last Weight"); + ro.setDescription("Description 1"); + ro.addSimpleColumn("patientId", "patientId"); + ro.addConceptColumn("weight", "LAST", 1, "5089", null); + Context.getReportObjectService().saveReportObject(ro); + } + { + DataExportReportObject ro = new DataExportReportObject(); + ro.setName("Test CD4"); + ro.setDescription("Description 2"); + ro.addSimpleColumn("patientId", "patientId"); + ro.addConceptColumn("cd4", "LAST", 1, "5497", null); + Context.getReportObjectService().saveReportObject(ro); + } + { + DataExportReportObject ro = new DataExportReportObject(); + ro.setName("Test Name"); + ro.setDescription("Description 3"); + ro.addSimpleColumn("patientId", "patientId"); + ro.addSimpleColumn("name", "personName"); + Context.getReportObjectService().saveReportObject(ro); + } + { + DataExportReportObject ro = new DataExportReportObject(); + ro.setName("Test First 3 Weights"); + ro.setDescription("Description 4"); + ro.addSimpleColumn("patientId", "patientId"); + ro.addConceptColumn("weight", "FIRST", 3, "5089", null); + Context.getReportObjectService().saveReportObject(ro); + } + { + DataExportReportObject ro = new DataExportReportObject(); + ro.setName("Test Gender"); + ro.setDescription("Description 5"); + ro.addSimpleColumn("patientId", "patientId"); + ro.addSimpleColumn("gender", "patient.gender"); + Context.getReportObjectService().saveReportObject(ro); + } + } + + @Test + public void shouldReturnDataSetDefinitionIfExists() throws Exception { + // big time hack: this test only works if it's first, because I'm creating the Data Exports programmatically, and each run they get new autonumbered ids. + // if the initial data gets set up via executing an xml dataset instead, then this test can be anywhere in the class + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + DataSetDefinition def = persister.getDefinition(1); + Assert.assertNotNull("Should return dataset definition if exists", def); + } + + /** + * Tests whether the persister returns all dataset definitions. + * + * @throws Exception + */ + @Test + public void shouldGetAllDataSetDefinitions() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + List list = persister.getAllDefinitions(false); + Assert.assertEquals("Should return all dataset definitions", 5, list.size()); + } + + @Test + public void shouldReturnAllDatasetDefinitionsIncludingRetired() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + List list = persister.getAllDefinitions(true); + Assert.assertEquals("Should return all dataset definitions, including retired", 5, list.size()); + } + + @Test + public void shouldReturnAllDatasetDefinitionsExcludingRetired() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + List list = persister.getAllDefinitions(false); + Assert.assertEquals("Should return all dataset definitions, excluding retired", 5, list.size()); + } + + @Test + public void shouldReturnNullIfNotExist() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + DataSetDefinition def = persister.getDefinition(999); + Assert.assertNull("Should return null if not exists", def); + } + @Test + public void shouldReturnNullIfNameDoesNotMatch() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + List def = + persister.getDefinitions("Dataset definition that does not exist", true); + Assert.assertEquals(0, def.size()); + } + + @Test + public void shouldReturnDataSetDefinitionIfNameMatches() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + List def = + persister.getDefinitions("Test First 3 Weights", true); + Assert.assertEquals(1, def.size()); + } + + @Test(expected=UnsupportedOperationException.class) + public void shouldNotBeAbleToModifyUnderlyingDataExport() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + DataSetDefinition datasetDefinition = persister.getDefinitions("Test First 3 Weights", true).get(0); + datasetDefinition.setName("My Data Set Definition"); + } + + @Test + public void shouldSetIdentifierAfterSave() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + DataExportReportObject dataExport = (DataExportReportObject) Context.getService(ReportObjectService.class).getReportObject(45); + dataExport.setReportObjectId(null); + dataExport.setName("My Data Set Definition"); + // Save an existing data set definition + DataSetDefinition datasetDefinition = new DataExportDataSetDefinition(dataExport); + datasetDefinition = persister.saveDefinition(datasetDefinition); + Assert.assertNotNull("Should set identifier after saving dataset definition", datasetDefinition.getId()); + } + + @Test + public void shouldRemoveDataSetDefintion() throws Exception { + DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); + DataSetDefinition beforePurge = persister.getDefinitions("Test First 3 Weights", true).get(0); + int idBefore = beforePurge.getId(); + persister.purgeDefinition(beforePurge); + DataSetDefinition afterPurge = persister.getDefinition(idBefore); + Assert.assertNull(afterPurge); + } +} diff --git a/api-2.0/.gitignore b/api-2.0/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/api-2.0/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml new file mode 100644 index 0000000000..5490a194ad --- /dev/null +++ b/api-2.0/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-2.0 + jar + reporting Module api 2.0 + 2.0 api project for reporting + + + 2.0.0-alpha + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java new file mode 100644 index 0000000000..2354ae0d79 --- /dev/null +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -0,0 +1,208 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } +} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java new file mode 100644 index 0000000000..8ae4703616 --- /dev/null +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -0,0 +1,143 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import static java.sql.Types.VARCHAR; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.usertype.UserType; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java new file mode 100644 index 0000000000..bd7058d629 --- /dev/null +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -0,0 +1,166 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) + */ + public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } +} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java new file mode 100644 index 0000000000..5dd4336231 --- /dev/null +++ b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -0,0 +1,119 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/api-2.2/.gitignore b/api-2.2/.gitignore new file mode 100644 index 0000000000..0b40cb3336 --- /dev/null +++ b/api-2.2/.gitignore @@ -0,0 +1,5 @@ +/.settings +/.classpath +/.project +/target +/bin/ diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml new file mode 100644 index 0000000000..bbdb2557cf --- /dev/null +++ b/api-2.2/pom.xml @@ -0,0 +1,103 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-2.2 + jar + reporting Module api 2.2 + 2.2 api project for reporting + + + 2.2.0 + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + ${project.parent.groupId} + ${project.parent.artifactId}-api-tests + ${project.parent.version} + test-jar + test + + + + org.openmrs.test + openmrs-test + pom + test + ${openMRSVersion} + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + + + + org.openmrs.api + openmrs-api + test-jar + test + ${openMRSVersion} + + + + org.openmrs.module + reportingcompatibility-api + ${reportingCompatibilityVersion} + test + + + cglib + cglib-nodep + 2.2 + test + + + org.codehaus.jackson + jackson-core-asl + 1.9.13 + test + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java similarity index 97% rename from api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java rename to api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java index e2e4818b6e..252ea4eba2 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java +++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java @@ -10,14 +10,15 @@ */ package org.openmrs.module.reporting.cohort.definition; +import java.util.Date; + import org.openmrs.Concept; +import org.openmrs.module.reporting.cohort.definition.BaseCohortDefinition; import org.openmrs.module.reporting.common.Localized; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; -import java.util.Date; - @Caching(strategy = ConfigurationPropertyCachingStrategy.class) @Localized("reporting.ConditionCohortDefinition") public class ConditionCohortDefinition extends BaseCohortDefinition { diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java similarity index 96% rename from api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java rename to api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java index a9b13598e9..297132acd4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java +++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java @@ -9,19 +9,20 @@ */ package org.openmrs.module.reporting.cohort.definition.evaluator; +import java.util.List; + import org.openmrs.Cohort; import org.openmrs.Condition; import org.openmrs.annotation.Handler; import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.evaluator.CohortDefinitionEvaluator; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.List; - @Handler(supports = { ConditionCohortDefinition.class }) public class ConditionCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java new file mode 100644 index 0000000000..c742ed349a --- /dev/null +++ b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java @@ -0,0 +1,43 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; + +import org.openmrs.Concept; +import org.openmrs.CareSetting; +import org.openmrs.Drug; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; +import org.openmrs.module.reporting.definition.library.DocumentedDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.springframework.stereotype.Component; + +import java.util.Date; +import java.util.List; + +@Component +public class BuiltInCohortDefinitionLibrary2_2 extends BuiltInCohortDefinitionLibrary { + + @DocumentedDefinition("conditonSearchAdvanced") + public CohortDefinition getConditonSearchAdvanced() { + ConditionCohortDefinition cd = new ConditionCohortDefinition(); + cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); + cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); + cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); + cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); + cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); + return cd; + } +} diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java rename to api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java new file mode 100644 index 0000000000..60000944db --- /dev/null +++ b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java @@ -0,0 +1,57 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.cohort.definition.library; +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import java.util.Date; + +import org.junit.Before; +import org.junit.Test; +import org.openmrs.Concept; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; + +import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; + + +public class BuiltInCohortDefinitionLibrary2_2Test { + + private BuiltInCohortDefinitionLibrary2_2 library; + + @Before + public void setUp() throws Exception { + library = new BuiltInCohortDefinitionLibrary2_2(); + } + + @Test + public void testGetConditonSearchAdavanced() throws Exception { + CohortDefinition cd = library.getConditonSearchAdvanced(); + assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); + assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); + assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); + assertThat(cd, hasParameter("activeOnDate", Date.class)); + assertThat(cd, hasParameter("conditionNonCoded", String.class)); + assertThat(cd, hasParameter("conditionCoded", Concept.class)); + } +} diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml b/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml similarity index 100% rename from api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml rename to api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml diff --git a/api-2.4/.gitignore b/api-2.4/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/api-2.4/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml new file mode 100644 index 0000000000..478db21a8a --- /dev/null +++ b/api-2.4/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-2.4 + jar + reporting Module api 2.4 + 2.4 api project for reporting + + + 2.4.0 + + + + + ${project.parent.groupId} + ${project.parent.artifactId}-api + ${project.parent.version} + provided + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + provided + + + + org.openmrs.api + openmrs-api + test-jar + ${openMRSVersion} + test + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + test + + + + + + + + src/main/resources + true + + + + + + src/test/resources + + **/*.properties + **/*.xml + + true + + + src/test/resources + + **/*.properties + **/*.xml + + false + + + + + diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java similarity index 94% rename from api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java rename to api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java index be83b0e291..b6d3744c8c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -1,209 +1,209 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(Object, int, Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } } \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java similarity index 95% rename from api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java rename to api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java index 55faf26a12..a39f3f5c2b 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -1,143 +1,144 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import static java.sql.Types.VARCHAR; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import static java.sql.Types.VARCHAR; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java similarity index 91% rename from api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java rename to api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java index bfce0700c1..008ab123f9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -1,167 +1,167 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(Object, int, Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, org.hibernate.engine.SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(java.lang.Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(java.lang.Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } } \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java similarity index 96% rename from api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java rename to api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java index 4caeb1dca3..5f2a1be77f 100644 --- a/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ b/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -1,120 +1,120 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/api-tests-2.4/.gitignore b/api-tests-2.4/.gitignore new file mode 100644 index 0000000000..ea8c4bf7f3 --- /dev/null +++ b/api-tests-2.4/.gitignore @@ -0,0 +1 @@ +/target diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml new file mode 100644 index 0000000000..c6f594f099 --- /dev/null +++ b/api-tests-2.4/pom.xml @@ -0,0 +1,124 @@ + + 4.0.0 + + + org.openmrs.module + reporting + 1.28.0-SNAPSHOT + + + reporting-api-tests-2.4 + jar + reporting API Tests for 2.4+ + API tests for reporting + + + + org.openmrs.module + reporting-api + ${project.parent.version} + + + org.openmrs.module + reporting-api + ${project.parent.version} + tests + + + javassist + javassist + + + + + org.openmrs.module + ${reportingApiConditionalArtifactId} + ${project.parent.version} + + + org.openmrs.module + reporting-api-tests + ${project.parent.version} + test-jar + test + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + + + javassist + javassist + + + + + org.openmrs.api + openmrs-api + ${openMRSVersion} + tests + + + javassist + javassist + + + + + org.openmrs.test + openmrs-test + ${openMRSVersion} + pom + + + javassist + javassist + + + + + org.openmrs.web + openmrs-web + ${openMRSVersion} + + + + + + + src/main/resources + true + + + + + src/test/resources + true + + **/*.xml + **/*.txt + **/*.properties + + + + src/test/resources + false + + **/*.xml + **/*.txt + **/*.properties + + + + + + + ${project.parent.artifactId} + ${project.parent.name} + ${project.parent.version} + ${project.parent.groupId}.${project.parent.artifactId} + + + diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java b/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java similarity index 100% rename from api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java rename to api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java index 341cffdf90..5cbe226399 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java @@ -12,7 +12,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -48,8 +47,8 @@ public void setup() throws Exception { public void evaluate_shouldEvaluateAPatientCalculation() throws Exception { Integer patientId1 = 2; Integer patientId2 = 7; - Set identifiers1 = new HashSet<>(ps.getPatient(patientId1).getIdentifiers()); - Set identifiers2 = new HashSet<>(ps.getPatient(patientId2).getIdentifiers()); + Set identifiers1 = ps.getPatient(patientId1).getIdentifiers(); + Set identifiers2 = ps.getPatient(patientId2).getIdentifiers(); PatientDataCalculation calculation = new PatientDataCalculationProvider().getCalculation( "org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition", null); Map parameters = new HashMap(); diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java index 31aecdbec4..641aa69a77 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java @@ -11,12 +11,10 @@ import org.junit.Before; import org.junit.Test; -import org.openmrs.Concept; import org.openmrs.EncounterType; import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition; @@ -145,19 +143,4 @@ public void testGetDiedDuringPeriod() throws Exception { assertThat(cd, hasParameter("startDate", Date.class)); assertThat(cd, hasParameter("endDate", Date.class)); } - - @Test - public void testGetConditonSearchAdavanced() throws Exception { - CohortDefinition cd = library.getConditonSearchAdvanced(); - assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); - assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); - assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); - assertThat(cd, hasParameter("activeOnDate", Date.class)); - assertThat(cd, hasParameter("conditionNonCoded", String.class)); - assertThat(cd, hasParameter("conditionCoded", Concept.class)); - } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java index 674364710b..a9cd62c794 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java @@ -10,7 +10,6 @@ package org.openmrs.module.reporting.data.visit.evaluator; import java.util.Arrays; -import java.util.Collections; import java.util.List; import org.junit.Assert; @@ -35,7 +34,6 @@ import org.openmrs.module.reporting.query.visit.VisitIdSet; import org.openmrs.test.BaseContextSensitiveTest; import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.openmrs.test.SkipBaseSetup; import org.openmrs.util.OpenmrsConstants; import org.springframework.beans.factory.annotation.Autowired; @@ -68,6 +66,7 @@ public class OrderForVisitDataEvaluatorTest extends BaseModuleContextSensitiveTe */ @Before public void setup() throws Exception { + if (ModuleUtil.compareVersion(OpenmrsConstants.OPENMRS_VERSION, "1.10") < 0) { setup1_9(); } else { @@ -118,7 +117,6 @@ private void setup1_10() throws Exception { */ @Test public void evaluate_shouldReturnAllOrdersForAVisit() throws Exception { - OrderType orderType = orderService.getOrderType(1); VisitEvaluationContext context = new VisitEvaluationContext(); context.setBaseVisits(new VisitIdSet(1)); @@ -142,7 +140,7 @@ public void evaluate_shouldFilterByType() throws Exception { OrderForVisitDataDefinition d = new OrderForVisitDataDefinition(); - d.setTypes(Collections.singletonList(orderService.getOrderType(1))); + d.setTypes(Arrays.asList(orderService.getOrderType(1))); EvaluatedVisitData vd = Context.getService(VisitDataService.class).evaluate(d, context); Assert.assertEquals(expectedOrdersWithType.intValue(), ((List) vd.getData().get(1)).size()); diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java index fc0eb2791c..248830b7e9 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java @@ -19,7 +19,6 @@ import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.InProgramCohortDefinition; @@ -273,19 +272,4 @@ public CohortDefinition getPatientsInState() { cd.addParameter(new Parameter("onDate", "reporting.parameter.date", Date.class)); return cd; } - - @DocumentedDefinition("conditonSearchAdvanced") - public CohortDefinition getConditonSearchAdvanced() { - ConditionCohortDefinition cd = new ConditionCohortDefinition(); - cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); - cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); - cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); - cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); - cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); - return cd; - } } diff --git a/pom.xml b/pom.xml index 1a06fa1776..b45ff644e8 100644 --- a/pom.xml +++ b/pom.xml @@ -33,17 +33,23 @@ api + api-1.9 + api-1.10 + api-2.0 + api-2.2 + api-2.4 api-tests omod - 2.4.1 + 1.9.9 2.0.6 - 2.4 + 1.9 1.7.2 0.2.14 1.2 + 1.5.0 2.1.1 3.12 1.8.7 @@ -101,6 +107,19 @@
+ + org.codehaus.jackson + jackson-core-asl + ${jacksonVersion} + provided + + + + org.codehaus.jackson + jackson-mapper-asl + ${jacksonVersion} + provided + org.codehaus.groovy @@ -450,8 +469,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.8 - 1.8 + 1.6 + 1.6 @@ -466,10 +485,10 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.3 + 2.5 - -Xmx1024m -Xms1024m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true + -Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true ${java.io.tmpdir} From 48d1946889e06c28a984db393a447b9e38163ab7 Mon Sep 17 00:00:00 2001 From: Wikum Weerakutti Date: Thu, 19 Jun 2025 17:21:40 +0530 Subject: [PATCH 129/143] REPORT-913: Migrate to OpenMRS Platform 2.4.0 (#263) * REPORT-913: Migrate to OpenMRS Platform 2.4.0 (#262) * Migrate to 2.4.0 * Move api-1.9 * Merge old api modules to the main * Set the scope of reportingcompatibility to provided (cherry picked from commit e4022f6a54ff5f4f2c0ddd0fdaf810a2f0b8d890) * Remove reporting compatability module * Remove old datasets --- .github/workflows/maven.yml | 3 +- api-1.10/.gitignore | 4 - api-1.10/pom.xml | 88 --- .../BuiltInCohortDefinitionLibrary1_10.java | 49 -- ...uiltInCohortDefinitionLibrary1_10Test.java | 57 -- api-1.9/.gitignore | 1 - api-1.9/pom.xml | 80 --- .../DataExportDataSetDefinition.java | 102 ---- .../evaluator/DataExportDataSetEvaluator.java | 92 --- .../DataExportDataSetDefinitionPersister.java | 130 ---- .../service/db/MappedDefinitionType.java | 209 ------- .../report/service/db/PropertiesType.java | 142 ----- .../report/service/db/RenderingModeType.java | 166 ----- .../service/db/ReportDefinitionType.java | 118 ---- .../DataExportDataSetPersisterTest.java | 170 ------ api-2.0/.gitignore | 1 - api-2.0/pom.xml | 80 --- .../service/db/MappedDefinitionType.java | 208 ------- .../report/service/db/PropertiesType.java | 143 ----- .../report/service/db/RenderingModeType.java | 166 ----- .../service/db/ReportDefinitionType.java | 119 ---- api-2.2/.gitignore | 5 - api-2.2/pom.xml | 103 ---- .../BuiltInCohortDefinitionLibrary2_2.java | 43 -- ...BuiltInCohortDefinitionLibrary2_2Test.java | 57 -- api-2.4/.gitignore | 1 - api-2.4/pom.xml | 80 --- api-tests-2.4/.gitignore | 1 - api-tests-2.4/pom.xml | 124 ---- api-tests/pom.xml | 5 - .../PatientDataCalculationBehaviorTest.java | 5 +- ...onditionCohortDefinitionEvaluatorTest.java | 0 ...rugOrderCohortDefinitionEvaluatorTest.java | 14 +- .../BuiltInCohortDefinitionLibraryTest.java | 17 + .../OrderForVisitDataEvaluatorTest.java | 6 +- .../EvaluationProfilerTest24On.java | 0 ...onCohortDefinitionEvaluatorTestDataSet.xml | 0 .../include/DrugOrderCohortEvaluationData.xml | 6 +- .../ReportTestDataset-openmrs-1.10.xml | 543 ----------------- .../ReportTestDataset-openmrs-1.11.xml | 565 ----------------- .../ReportTestDataset-openmrs-1.12.xml | 565 ----------------- .../include/ReportTestDataset-openmrs-1.9.xml | 549 ----------------- .../include/ReportTestDataset-openmrs-2.0.xml | 573 ----------------- .../include/ReportTestDataset-openmrs-2.1.xml | 574 ------------------ .../include/ReportTestDataset-openmrs-2.2.xml | 574 ------------------ .../include/ReportTestDataset-openmrs-2.3.xml | 574 ------------------ api/pom.xml | 10 +- .../definition/ConditionCohortDefinition.java | 5 +- .../definition/DrugOrderCohortDefinition.java | 5 +- .../ConditionCohortDefinitionEvaluator.java | 5 +- .../DrugOrderCohortDefinitionEvaluator.java | 14 +- .../BuiltInCohortDefinitionLibrary.java | 16 + .../service/db/MappedDefinitionType.java | 416 ++++++------- .../report/service/db/PropertiesType.java | 287 +++++---- .../report/service/db/RenderingModeType.java | 332 +++++----- .../service/db/ReportDefinitionType.java | 240 ++++---- omod/src/main/resources/config.xml | 24 - pom.xml | 39 +- 58 files changed, 707 insertions(+), 7798 deletions(-) delete mode 100644 api-1.10/.gitignore delete mode 100644 api-1.10/pom.xml delete mode 100644 api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java delete mode 100644 api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java delete mode 100644 api-1.9/.gitignore delete mode 100644 api-1.9/pom.xml delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/persister/DataExportDataSetDefinitionPersister.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java delete mode 100644 api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java delete mode 100644 api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java delete mode 100644 api-2.0/.gitignore delete mode 100644 api-2.0/pom.xml delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java delete mode 100644 api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java delete mode 100644 api-2.2/.gitignore delete mode 100644 api-2.2/pom.xml delete mode 100644 api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java delete mode 100644 api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java delete mode 100644 api-2.4/.gitignore delete mode 100644 api-2.4/pom.xml delete mode 100644 api-tests-2.4/.gitignore delete mode 100644 api-tests-2.4/pom.xml rename {api-2.2 => api-tests}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java (100%) rename {api-1.10 => api-tests}/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java (100%) rename {api-tests-2.4 => api-tests}/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java (100%) rename {api-2.2 => api-tests}/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml (100%) rename {api-1.10 => api-tests}/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml (96%) delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml delete mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml rename {api-2.2 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java (97%) rename {api-1.10 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java (99%) rename {api-2.2 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java (96%) rename {api-1.10 => api}/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java (98%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java (94%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java (95%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java (91%) rename {api-2.4 => api}/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java (96%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b92a7acf6a..df6445a783 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -14,7 +14,6 @@ jobs: matrix: platform: [ ubuntu-latest ] java-version: [ 8 ] - profile: [ 1.10, 1.11, 1.12, 2.0, 2.1, 2.2, 2.3, 2.4 ] runs-on: ${{ matrix.platform }} env: @@ -36,5 +35,5 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven - run: mvn clean install -P ${{ matrix.profile }} --batch-mode --show-version --file pom.xml + run: mvn clean install --batch-mode --show-version --file pom.xml diff --git a/api-1.10/.gitignore b/api-1.10/.gitignore deleted file mode 100644 index c277ec4914..0000000000 --- a/api-1.10/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.settings -/.classpath -/.project -/target diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml deleted file mode 100644 index bdab2db9ee..0000000000 --- a/api-1.10/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-1.10 - jar - reporting Module api 1.10 - 1.10 api project for reporting - - - 1.10.6 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java deleted file mode 100644 index 6efb85e780..0000000000 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.openmrs.Concept; -import org.openmrs.CareSetting; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; -import org.openmrs.module.reporting.definition.library.DocumentedDefinition; -import org.openmrs.module.reporting.evaluation.parameter.Parameter; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -/** - * Basic set of cohort definitions - */ -@Component -public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { - - - - @DocumentedDefinition("drugOrderSearch") - public CohortDefinition getDrugOrderSearch() { - CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); - drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); - drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); - drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); - drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); - drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); - drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); - return drugOrderCohortDefinition; - } -} diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java deleted file mode 100644 index f975d8e06e..0000000000 --- a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.junit.Before; -import org.junit.Test; -import org.openmrs.CareSetting; -import org.openmrs.Concept; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; - -import java.util.Date; -import java.util.List; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; - -/** - * - */ -public class BuiltInCohortDefinitionLibrary1_10Test { - - private BuiltInCohortDefinitionLibrary1_10 library; - - @Before - public void setUp() throws Exception { - library = new BuiltInCohortDefinitionLibrary1_10(); - } - - @Test - public void testgetDrugOrderSearch() throws Exception { - CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch(); - assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass())); - assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class)); - assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class)); - assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class)); - } - -} diff --git a/api-1.9/.gitignore b/api-1.9/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-1.9/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml deleted file mode 100644 index f9f4b777f7..0000000000 --- a/api-1.9/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-1.9 - jar - reporting Module api 1.9 - 1.9 api project for reporting - - - 1.9.9 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java deleted file mode 100644 index b7f2d861ce..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/DataExportDataSetDefinition.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.dataset.definition; - -import org.openmrs.BaseOpenmrsMetadata; -import org.openmrs.BaseOpenmrsObject; -import org.openmrs.module.reporting.common.Localized; -import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; -import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; -import org.openmrs.module.reporting.evaluation.caching.Caching; -import org.openmrs.reporting.export.DataExportReportObject; - -/** - * Definition of a dataset that runs a Data Export (of the sort created in the reportingcompatibility - * module. - * @see DataExportDataSetDefinition - */ -@Caching(strategy=ConfigurationPropertyCachingStrategy.class) -@SuppressWarnings("deprecation") -@Localized("reporting.DataExportDataSetDefinition") -public class DataExportDataSetDefinition extends BaseDataSetDefinition { - - public static final long serialVersionUID = -2572061676651616176L; - - //***** PROPERTIES ***** - - @ConfigurationProperty - private DataExportReportObject dataExport; - - //***** CONSTRUCTORS ***** - - /** - * Default public constructor - */ - public DataExportDataSetDefinition() { - super(); - } - - /** - * Full constructor - */ - public DataExportDataSetDefinition(DataExportReportObject dataExport) { - this.dataExport = dataExport; - } - - //***** INSTANCE METHODS ***** - - /** - * @see BaseDataSetDefinition#getId() - */ - @Override - public Integer getId() { - return (getDataExport() == null ? null : getDataExport().getId()); - } - - /** - * @see BaseOpenmrsObject#getUuid() - */ - @Override - public String getUuid() { - return (getDataExport() == null ? null : getDataExport().getUuid()); - } - - /** - * @see BaseOpenmrsMetadata#getName() - */ - @Override - public String getName() { - return (getDataExport() == null ? null : getDataExport().getName()); - } - - /** - * @see BaseOpenmrsMetadata#getDescription() - */ - @Override - public String getDescription() { - return (getDataExport() == null ? null : getDataExport().getDescription()); - } - - //***** PROPERTY ACCESS ***** - - /** - * @return the dataExport - */ - public DataExportReportObject getDataExport() { - return dataExport; - } - - /** - * @param dataExport the dataExport to set - */ - public void setDataExport(DataExportReportObject dataExport) { - this.dataExport = dataExport; - } -} diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java b/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java deleted file mode 100644 index 460ba2cf56..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/dataset/definition/evaluator/DataExportDataSetEvaluator.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.dataset.definition.evaluator; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.openmrs.annotation.Handler; -import org.openmrs.module.reporting.common.ObjectUtil; -import org.openmrs.module.reporting.dataset.DataSet; -import org.openmrs.module.reporting.dataset.DataSetColumn; -import org.openmrs.module.reporting.dataset.DataSetRow; -import org.openmrs.module.reporting.dataset.SimpleDataSet; -import org.openmrs.module.reporting.dataset.definition.DataExportDataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; -import org.openmrs.module.reporting.evaluation.EvaluationContext; -import org.openmrs.reporting.export.DataExportReportObject; -import org.openmrs.reporting.export.DataExportUtil; -import org.openmrs.util.OpenmrsUtil; - -/** - * The logic that evaluates a {@link DataExportDataSetDefinition} and produces a {@link DataSet} - * @see DataExportDataSetDefinition - * @see DataSet - */ -@Handler(supports={DataExportDataSetDefinition.class}) -@SuppressWarnings("deprecation") -public class DataExportDataSetEvaluator implements DataSetEvaluator { - - private Log log = LogFactory.getLog(this.getClass()); - - /** - * Public constructor - */ - public DataExportDataSetEvaluator() {} - - /** - * @see DataSetEvaluator#evaluate(DataSetDefinition, EvaluationContext) - * @should evaluate a DataExportDataSetDefinition - */ - public DataSet evaluate(DataSetDefinition definition, EvaluationContext context) { - - context = ObjectUtil.nvl(context, new EvaluationContext()); - SimpleDataSet dataSet = new SimpleDataSet(definition, context); - try { - DataExportDataSetDefinition dataExportDefinition = (DataExportDataSetDefinition) definition; - DataExportReportObject dataExport = dataExportDefinition.getDataExport(); - DataExportUtil.generateExport(dataExport, context.getBaseCohort(), null); - - File dataFile = DataExportUtil.getGeneratedFile(dataExportDefinition.getDataExport()); - - // Get contents as a string - // TODO Test whether this is faster than another approach - String contents = OpenmrsUtil.getFileAsString(dataFile); - String [] rows = contents.split("\\n"); - - // Get column names - String [] columns = rows[0].split("\\t"); - Map cols = new HashMap(); - for (String s : columns) { - DataSetColumn c = new DataSetColumn(s, s, String.class); - cols.put(s, c); - dataSet.getMetaData().addColumn(c); - } - - // Iterate over remaining rows - for (int i=1; i getAllDefinitions(boolean includeRetired) { - List dataSetDefinitions = new Vector(); - if (ModuleFactory.getStartedModulesMap().containsKey("reportingcompatibility") && - ReportingConstants.GLOBAL_PROPERTY_INCLUDE_DATA_EXPORTS()) { - ReportObjectService ros = Context.getService(ReportObjectService.class); - List dataExports = ros.getReportObjectsByType("Data Export"); - - for (AbstractReportObject obj : dataExports) { - DataExportReportObject dataExport = (DataExportReportObject) obj; - dataExport.setUuid(obj.getUuid()); // hack to get uuids into data exports - dataSetDefinitions.add(new DataExportDataSetDefinition(dataExport)); - } - } - return dataSetDefinitions; - } - - /** - * @see DataSetDefinitionPersister#getNumberOfDefinitions(boolean) - */ - public int getNumberOfDefinitions(boolean includeRetired) { - if (ModuleFactory.getStartedModulesMap().containsKey("reportingcompatibility")) { - ReportObjectService ros = Context.getService(ReportObjectService.class); - List dataExports = ros.getReportObjectsByType("Data Export"); - return dataExports.size(); - } - return 0; - } - - /** - * @see DataSetDefinitionPersister#getDefinitions(String, boolean) - */ - public List getDefinitions(String name, boolean exactMatchOnly) { - List ret = new ArrayList(); - for(DataSetDefinition dsd : getAllDefinitions(false)) { - if (dsd.getName() != null) { - if (exactMatchOnly) { - if (dsd.getName().equalsIgnoreCase(name)) { - ret.add(dsd); - } - } - else { - if (dsd.getName().toUpperCase().contains(name.toUpperCase())) { - ret.add(dsd); - } - } - } - } - return ret; - } - - /** - * @see DataSetDefinitionPersister#saveDefinition(DataSetDefinition) - */ - public DataSetDefinition saveDefinition(DataSetDefinition dataSetDefinition) { - DataExportDataSetDefinition dsd = (DataExportDataSetDefinition) dataSetDefinition; - ReportObjectService ros = Context.getService(ReportObjectService.class); - DataExportReportObject dataExport = (DataExportReportObject) ros.saveReportObject(dsd.getDataExport()); - dsd.setDataExport(dataExport); - return dsd; - } - - /** - * @see DataSetDefinitionPersister#purgeDefinition(DataSetDefinition) - */ - public void purgeDefinition(DataSetDefinition dataSetDefinition) { - DataExportDataSetDefinition dsd = (DataExportDataSetDefinition) dataSetDefinition; - Context.getService(ReportObjectService.class).purgeReportObject(dsd.getDataExport()); - } -} diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java deleted file mode 100644 index 7a214dd25f..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } -} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java deleted file mode 100644 index 1f5a014233..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import org.hibernate.HibernateException; -import org.hibernate.usertype.UserType; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import static java.sql.Types.VARCHAR; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java deleted file mode 100644 index 3c344c3f66..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } -} \ No newline at end of file diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java deleted file mode 100644 index b83c9cf328..0000000000 --- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} diff --git a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java b/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java deleted file mode 100644 index 3ec2cb10f7..0000000000 --- a/api-1.9/src/test/java/org/openmrs/module/reporting/dataset/DataExportDataSetPersisterTest.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.dataset; - -import java.util.List; - -import org.junit.Assert; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.dataset.definition.DataExportDataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; -import org.openmrs.module.reporting.dataset.definition.persister.DataExportDataSetDefinitionPersister; -import org.openmrs.module.reporting.dataset.definition.persister.DataSetDefinitionPersister; -import org.openmrs.reporting.ReportObjectService; -import org.openmrs.reporting.export.DataExportReportObject; -import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.openmrs.test.StartModule; - -/** - * Test of the Data Export Data Set Persister - */ -@SuppressWarnings("deprecation") -@StartModule( { "org/openmrs/module/reporting/include/reportingcompatibility-1.5.3.omod" }) -@Ignore -public class DataExportDataSetPersisterTest extends BaseModuleContextSensitiveTest { - - protected static Log log = LogFactory.getLog(DataExportDataSetPersisterTest.class); - - @Before - public void setupInitialData() throws Exception { - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Last Weight"); - ro.setDescription("Description 1"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("weight", "LAST", 1, "5089", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test CD4"); - ro.setDescription("Description 2"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("cd4", "LAST", 1, "5497", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Name"); - ro.setDescription("Description 3"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addSimpleColumn("name", "personName"); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test First 3 Weights"); - ro.setDescription("Description 4"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addConceptColumn("weight", "FIRST", 3, "5089", null); - Context.getReportObjectService().saveReportObject(ro); - } - { - DataExportReportObject ro = new DataExportReportObject(); - ro.setName("Test Gender"); - ro.setDescription("Description 5"); - ro.addSimpleColumn("patientId", "patientId"); - ro.addSimpleColumn("gender", "patient.gender"); - Context.getReportObjectService().saveReportObject(ro); - } - } - - @Test - public void shouldReturnDataSetDefinitionIfExists() throws Exception { - // big time hack: this test only works if it's first, because I'm creating the Data Exports programmatically, and each run they get new autonumbered ids. - // if the initial data gets set up via executing an xml dataset instead, then this test can be anywhere in the class - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition def = persister.getDefinition(1); - Assert.assertNotNull("Should return dataset definition if exists", def); - } - - /** - * Tests whether the persister returns all dataset definitions. - * - * @throws Exception - */ - @Test - public void shouldGetAllDataSetDefinitions() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(false); - Assert.assertEquals("Should return all dataset definitions", 5, list.size()); - } - - @Test - public void shouldReturnAllDatasetDefinitionsIncludingRetired() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(true); - Assert.assertEquals("Should return all dataset definitions, including retired", 5, list.size()); - } - - @Test - public void shouldReturnAllDatasetDefinitionsExcludingRetired() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List list = persister.getAllDefinitions(false); - Assert.assertEquals("Should return all dataset definitions, excluding retired", 5, list.size()); - } - - @Test - public void shouldReturnNullIfNotExist() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition def = persister.getDefinition(999); - Assert.assertNull("Should return null if not exists", def); - } - @Test - public void shouldReturnNullIfNameDoesNotMatch() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List def = - persister.getDefinitions("Dataset definition that does not exist", true); - Assert.assertEquals(0, def.size()); - } - - @Test - public void shouldReturnDataSetDefinitionIfNameMatches() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - List def = - persister.getDefinitions("Test First 3 Weights", true); - Assert.assertEquals(1, def.size()); - } - - @Test(expected=UnsupportedOperationException.class) - public void shouldNotBeAbleToModifyUnderlyingDataExport() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition datasetDefinition = persister.getDefinitions("Test First 3 Weights", true).get(0); - datasetDefinition.setName("My Data Set Definition"); - } - - @Test - public void shouldSetIdentifierAfterSave() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataExportReportObject dataExport = (DataExportReportObject) Context.getService(ReportObjectService.class).getReportObject(45); - dataExport.setReportObjectId(null); - dataExport.setName("My Data Set Definition"); - // Save an existing data set definition - DataSetDefinition datasetDefinition = new DataExportDataSetDefinition(dataExport); - datasetDefinition = persister.saveDefinition(datasetDefinition); - Assert.assertNotNull("Should set identifier after saving dataset definition", datasetDefinition.getId()); - } - - @Test - public void shouldRemoveDataSetDefintion() throws Exception { - DataSetDefinitionPersister persister = new DataExportDataSetDefinitionPersister(); - DataSetDefinition beforePurge = persister.getDefinitions("Test First 3 Weights", true).get(0); - int idBefore = beforePurge.getId(); - persister.purgeDefinition(beforePurge); - DataSetDefinition afterPurge = persister.getDefinition(idBefore); - Assert.assertNull(afterPurge); - } -} diff --git a/api-2.0/.gitignore b/api-2.0/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-2.0/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-2.0/pom.xml b/api-2.0/pom.xml deleted file mode 100644 index 5490a194ad..0000000000 --- a/api-2.0/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.0 - jar - reporting Module api 2.0 - 2.0 api project for reporting - - - 2.0.0-alpha - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java deleted file mode 100644 index 2354ae0d79..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } -} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java deleted file mode 100644 index 8ae4703616..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import static java.sql.Types.VARCHAR; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.usertype.UserType; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java deleted file mode 100644 index bd7058d629..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } -} \ No newline at end of file diff --git a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java deleted file mode 100644 index 5dd4336231..0000000000 --- a/api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} diff --git a/api-2.2/.gitignore b/api-2.2/.gitignore deleted file mode 100644 index 0b40cb3336..0000000000 --- a/api-2.2/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/.settings -/.classpath -/.project -/target -/bin/ diff --git a/api-2.2/pom.xml b/api-2.2/pom.xml deleted file mode 100644 index bbdb2557cf..0000000000 --- a/api-2.2/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.2 - jar - reporting Module api 2.2 - 2.2 api project for reporting - - - 2.2.0 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.test - openmrs-test - pom - test - ${openMRSVersion} - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - - - - org.openmrs.api - openmrs-api - test-jar - test - ${openMRSVersion} - - - - org.openmrs.module - reportingcompatibility-api - ${reportingCompatibilityVersion} - test - - - cglib - cglib-nodep - 2.2 - test - - - org.codehaus.jackson - jackson-core-asl - 1.9.13 - test - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java b/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java deleted file mode 100644 index c742ed349a..0000000000 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; - -import org.openmrs.Concept; -import org.openmrs.CareSetting; -import org.openmrs.Drug; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; -import org.openmrs.module.reporting.definition.library.DocumentedDefinition; -import org.openmrs.module.reporting.evaluation.parameter.Parameter; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.List; - -@Component -public class BuiltInCohortDefinitionLibrary2_2 extends BuiltInCohortDefinitionLibrary { - - @DocumentedDefinition("conditonSearchAdvanced") - public CohortDefinition getConditonSearchAdvanced() { - ConditionCohortDefinition cd = new ConditionCohortDefinition(); - cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); - cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); - cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); - cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); - cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); - cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); - cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); - return cd; - } -} diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java b/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java deleted file mode 100644 index 60000944db..0000000000 --- a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary2_2Test.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.cohort.definition.library; -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import java.util.Date; - -import org.junit.Before; -import org.junit.Test; -import org.openmrs.Concept; -import org.openmrs.module.reporting.cohort.definition.CohortDefinition; -import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary2_2; - -import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter; - - -public class BuiltInCohortDefinitionLibrary2_2Test { - - private BuiltInCohortDefinitionLibrary2_2 library; - - @Before - public void setUp() throws Exception { - library = new BuiltInCohortDefinitionLibrary2_2(); - } - - @Test - public void testGetConditonSearchAdavanced() throws Exception { - CohortDefinition cd = library.getConditonSearchAdvanced(); - assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); - assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); - assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); - assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); - assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); - assertThat(cd, hasParameter("activeOnDate", Date.class)); - assertThat(cd, hasParameter("conditionNonCoded", String.class)); - assertThat(cd, hasParameter("conditionCoded", Concept.class)); - } -} diff --git a/api-2.4/.gitignore b/api-2.4/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/api-2.4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/api-2.4/pom.xml b/api-2.4/pom.xml deleted file mode 100644 index 478db21a8a..0000000000 --- a/api-2.4/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-2.4 - jar - reporting Module api 2.4 - 2.4 api project for reporting - - - 2.4.0 - - - - - ${project.parent.groupId} - ${project.parent.artifactId}-api - ${project.parent.version} - provided - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - provided - - - - org.openmrs.api - openmrs-api - test-jar - ${openMRSVersion} - test - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - test - - - - - - - - src/main/resources - true - - - - - - src/test/resources - - **/*.properties - **/*.xml - - true - - - src/test/resources - - **/*.properties - **/*.xml - - false - - - - - diff --git a/api-tests-2.4/.gitignore b/api-tests-2.4/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/api-tests-2.4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/api-tests-2.4/pom.xml b/api-tests-2.4/pom.xml deleted file mode 100644 index c6f594f099..0000000000 --- a/api-tests-2.4/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - 4.0.0 - - - org.openmrs.module - reporting - 1.28.0-SNAPSHOT - - - reporting-api-tests-2.4 - jar - reporting API Tests for 2.4+ - API tests for reporting - - - - org.openmrs.module - reporting-api - ${project.parent.version} - - - org.openmrs.module - reporting-api - ${project.parent.version} - tests - - - javassist - javassist - - - - - org.openmrs.module - ${reportingApiConditionalArtifactId} - ${project.parent.version} - - - org.openmrs.module - reporting-api-tests - ${project.parent.version} - test-jar - test - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - - - javassist - javassist - - - - - org.openmrs.api - openmrs-api - ${openMRSVersion} - tests - - - javassist - javassist - - - - - org.openmrs.test - openmrs-test - ${openMRSVersion} - pom - - - javassist - javassist - - - - - org.openmrs.web - openmrs-web - ${openMRSVersion} - - - - - - - src/main/resources - true - - - - - src/test/resources - true - - **/*.xml - **/*.txt - **/*.properties - - - - src/test/resources - false - - **/*.xml - **/*.txt - **/*.properties - - - - - - - ${project.parent.artifactId} - ${project.parent.name} - ${project.parent.version} - ${project.parent.groupId}.${project.parent.artifactId} - - - diff --git a/api-tests/pom.xml b/api-tests/pom.xml index e37cf08cd4..67ca717cf0 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -30,11 +30,6 @@
- - org.openmrs.module - ${reportingApiConditionalArtifactId} - ${project.parent.version} - org.openmrs.api diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java index 5cbe226399..341cffdf90 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/calculation/PatientDataCalculationBehaviorTest.java @@ -12,6 +12,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -47,8 +48,8 @@ public void setup() throws Exception { public void evaluate_shouldEvaluateAPatientCalculation() throws Exception { Integer patientId1 = 2; Integer patientId2 = 7; - Set identifiers1 = ps.getPatient(patientId1).getIdentifiers(); - Set identifiers2 = ps.getPatient(patientId2).getIdentifiers(); + Set identifiers1 = new HashSet<>(ps.getPatient(patientId1).getIdentifiers()); + Set identifiers2 = new HashSet<>(ps.getPatient(patientId2).getIdentifiers()); PatientDataCalculation calculation = new PatientDataCalculationProvider().getCalculation( "org.openmrs.module.reporting.data.patient.definition.PatientIdentifierDataDefinition", null); Map parameters = new HashMap(); diff --git a/api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-2.2/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java rename to api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluatorTest.java diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java similarity index 100% rename from api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java rename to api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java index ec30196cdf..d0510ce9bc 100644 --- a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluatorTest.java @@ -10,26 +10,26 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; -import java.util.ArrayList; -import java.util.List; -import java.util.Date; +import org.apache.commons.lang3.time.DateUtils; import org.junit.After; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.openmrs.CareSetting; import org.openmrs.Cohort; import org.openmrs.Concept; -import org.openmrs.CareSetting; import org.openmrs.Drug; import org.openmrs.api.OrderService; import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.service.CohortDefinitionService; import org.openmrs.module.reporting.common.DateUtil; +import org.openmrs.module.reporting.common.Match; import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.apache.commons.lang3.time.DateUtils; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; public class DrugOrderCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest { diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java index 641aa69a77..31aecdbec4 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibraryTest.java @@ -11,10 +11,12 @@ import org.junit.Before; import org.junit.Test; +import org.openmrs.Concept; import org.openmrs.EncounterType; import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition; @@ -143,4 +145,19 @@ public void testGetDiedDuringPeriod() throws Exception { assertThat(cd, hasParameter("startDate", Date.class)); assertThat(cd, hasParameter("endDate", Date.class)); } + + @Test + public void testGetConditonSearchAdavanced() throws Exception { + CohortDefinition cd = library.getConditonSearchAdvanced(); + assertTrue(ConditionCohortDefinition.class.isAssignableFrom(cd.getClass())); + assertThat(cd, hasParameter("onsetDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("onsetDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("endDateOnOrBefore", Date.class)); + assertThat(cd, hasParameter("endDateOnOrAfter", Date.class)); + assertThat(cd, hasParameter("createdOnOrBefore", Date.class)); + assertThat(cd, hasParameter("createdOnOrAfter", Date.class)); + assertThat(cd, hasParameter("activeOnDate", Date.class)); + assertThat(cd, hasParameter("conditionNonCoded", String.class)); + assertThat(cd, hasParameter("conditionCoded", Concept.class)); + } } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java index a9cd62c794..674364710b 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/OrderForVisitDataEvaluatorTest.java @@ -10,6 +10,7 @@ package org.openmrs.module.reporting.data.visit.evaluator; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.Assert; @@ -34,6 +35,7 @@ import org.openmrs.module.reporting.query.visit.VisitIdSet; import org.openmrs.test.BaseContextSensitiveTest; import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; import org.openmrs.util.OpenmrsConstants; import org.springframework.beans.factory.annotation.Autowired; @@ -66,7 +68,6 @@ public class OrderForVisitDataEvaluatorTest extends BaseModuleContextSensitiveTe */ @Before public void setup() throws Exception { - if (ModuleUtil.compareVersion(OpenmrsConstants.OPENMRS_VERSION, "1.10") < 0) { setup1_9(); } else { @@ -117,6 +118,7 @@ private void setup1_10() throws Exception { */ @Test public void evaluate_shouldReturnAllOrdersForAVisit() throws Exception { + OrderType orderType = orderService.getOrderType(1); VisitEvaluationContext context = new VisitEvaluationContext(); context.setBaseVisits(new VisitIdSet(1)); @@ -140,7 +142,7 @@ public void evaluate_shouldFilterByType() throws Exception { OrderForVisitDataDefinition d = new OrderForVisitDataDefinition(); - d.setTypes(Arrays.asList(orderService.getOrderType(1))); + d.setTypes(Collections.singletonList(orderService.getOrderType(1))); EvaluatedVisitData vd = Context.getService(VisitDataService.class).evaluate(d, context); Assert.assertEquals(expectedOrdersWithType.intValue(), ((List) vd.getData().get(1)).size()); diff --git a/api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java similarity index 100% rename from api-tests-2.4/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java rename to api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java diff --git a/api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml similarity index 100% rename from api-2.2/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml rename to api-tests/src/test/resources/org/openmrs/module/reporting/include/ConditionCohortDefinitionEvaluatorTestDataSet.xml diff --git a/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml similarity index 96% rename from api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml rename to api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml index 4bf9879a5f..a0da3b8819 100644 --- a/api-1.10/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/DrugOrderCohortEvaluationData.xml @@ -74,10 +74,10 @@ - + - - + + diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml deleted file mode 100644 index 0504594c94..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.10.xml +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml deleted file mode 100644 index ebe5f05ab8..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.11.xml +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml deleted file mode 100644 index ebe5f05ab8..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.12.xml +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml deleted file mode 100644 index 236aadb7ea..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-1.9.xml +++ /dev/null @@ -1,549 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml deleted file mode 100644 index 7d6f1e489a..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.0.xml +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml deleted file mode 100644 index 60139af0ae..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.1.xml +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml deleted file mode 100644 index e89f14375f..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.2.xml +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml deleted file mode 100644 index e89f14375f..0000000000 --- a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.3.xml +++ /dev/null @@ -1,574 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/pom.xml b/api/pom.xml index f3621e24f2..f69f2a14cb 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -11,13 +11,5 @@ API project for Reporting - - - org.openmrs.module - reportingcompatibility-api - ${reportingCompatibilityVersion} - provided - - - + diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java similarity index 97% rename from api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java index 252ea4eba2..e2e4818b6e 100644 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/ConditionCohortDefinition.java @@ -10,15 +10,14 @@ */ package org.openmrs.module.reporting.cohort.definition; -import java.util.Date; - import org.openmrs.Concept; -import org.openmrs.module.reporting.cohort.definition.BaseCohortDefinition; import org.openmrs.module.reporting.common.Localized; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; +import java.util.Date; + @Caching(strategy = ConfigurationPropertyCachingStrategy.class) @Localized("reporting.ConditionCohortDefinition") public class ConditionCohortDefinition extends BaseCohortDefinition { diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java similarity index 99% rename from api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java index f73c89cc84..3f5427244b 100644 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/DrugOrderCohortDefinition.java @@ -10,12 +10,11 @@ package org.openmrs.module.reporting.cohort.definition; -import org.openmrs.Concept; import org.openmrs.CareSetting; +import org.openmrs.Concept; import org.openmrs.Drug; - -import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.common.Localized; +import org.openmrs.module.reporting.common.Match; import org.openmrs.module.reporting.definition.configuration.ConfigurationProperty; import org.openmrs.module.reporting.definition.configuration.ConfigurationPropertyCachingStrategy; import org.openmrs.module.reporting.evaluation.caching.Caching; diff --git a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java similarity index 96% rename from api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java index 297132acd4..a9b13598e9 100644 --- a/api-2.2/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/ConditionCohortDefinitionEvaluator.java @@ -9,20 +9,19 @@ */ package org.openmrs.module.reporting.cohort.definition.evaluator; -import java.util.List; - import org.openmrs.Cohort; import org.openmrs.Condition; import org.openmrs.annotation.Handler; import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; -import org.openmrs.module.reporting.cohort.definition.evaluator.CohortDefinitionEvaluator; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; import org.springframework.beans.factory.annotation.Autowired; +import java.util.List; + @Handler(supports = { ConditionCohortDefinition.class }) public class ConditionCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java similarity index 98% rename from api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java rename to api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java index 58b7a19fc8..f6ac3c19f6 100644 --- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/evaluator/DrugOrderCohortDefinitionEvaluator.java @@ -10,22 +10,20 @@ package org.openmrs.module.reporting.cohort.definition.evaluator; -import org.apache.commons.lang3.time.DateUtils; import org.openmrs.Cohort; import org.openmrs.DrugOrder; +import org.openmrs.annotation.Handler; +import org.openmrs.module.reporting.cohort.EvaluatedCohort; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; +import org.openmrs.module.reporting.common.Match; +import org.openmrs.module.reporting.common.ObjectUtil; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.querybuilder.HqlQueryBuilder; import org.openmrs.module.reporting.evaluation.service.EvaluationService; -import org.openmrs.module.reporting.cohort.EvaluatedCohort; -import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; -import org.openmrs.module.reporting.common.ObjectUtil; -import org.openmrs.module.reporting.common.Match; -import org.openmrs.annotation.Handler; - import org.springframework.beans.factory.annotation.Autowired; + import java.util.List; -import java.util.Date; @Handler(supports = { DrugOrderCohortDefinition.class }) public class DrugOrderCohortDefinitionEvaluator implements CohortDefinitionEvaluator { diff --git a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java index 248830b7e9..fc0eb2791c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java +++ b/api/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary.java @@ -19,6 +19,7 @@ import org.openmrs.module.reporting.cohort.definition.AgeCohortDefinition; import org.openmrs.module.reporting.cohort.definition.BirthAndDeathCohortDefinition; import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.cohort.definition.ConditionCohortDefinition; import org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.cohort.definition.InProgramCohortDefinition; @@ -272,4 +273,19 @@ public CohortDefinition getPatientsInState() { cd.addParameter(new Parameter("onDate", "reporting.parameter.date", Date.class)); return cd; } + + @DocumentedDefinition("conditonSearchAdvanced") + public CohortDefinition getConditonSearchAdvanced() { + ConditionCohortDefinition cd = new ConditionCohortDefinition(); + cd.addParameter(new Parameter("conditionCoded", "reporting.parameter.conditionCoded", Concept.class)); + cd.addParameter(new Parameter("conditionNonCoded", "reporting.parameter.conditionNonCoded", String.class)); + cd.addParameter(new Parameter("onsetDateOnOrBefore", "reporting.parameter.onsetDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("onsetDateOnOrAfter", "reporting.parameter.onsetDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("endDateOnOrBefore", "reporting.parameter.endDateOnOrBefore", Date.class)); + cd.addParameter(new Parameter("endDateOnOrAfter", "reporting.parameter.endDateOnOrAfter", Date.class)); + cd.addParameter(new Parameter("createdOnOrBefore", "reporting.parameter.createdOnOrBefore", Date.class)); + cd.addParameter(new Parameter("createdOnOrAfter", "reporting.parameter.createdOnOrAfter", Date.class)); + cd.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); + return cd; + } } diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java similarity index 94% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java index b6d3744c8c..be83b0e291 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java @@ -1,209 +1,209 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.ParameterizedType; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.definition.DefinitionContext; -import org.openmrs.module.reporting.evaluation.Definition; -import org.openmrs.module.reporting.evaluation.parameter.Mapped; -import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; -import org.openmrs.module.reporting.serializer.ReportingSerializer; - -/** - * Custom User-Type for storing Mapped objects in a single table within 2 columns - * This type takes in 2 properties and 1 parameter in the form: - *
- *		
- *			
- *			
- *			
- *				org.openmrs.module.reporting.report.definition.ReportDefinition
- *			
- *		
- * 
- */ -@SuppressWarnings({"rawtypes", "unchecked"}) -public class MappedDefinitionType implements CompositeUserType, ParameterizedType { - - /** - * Property via ParameterizedType for storing the type of the Mapped Parameterizable - */ - private Class mappedType; - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return Mapped.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"definition", "parameterMappings"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - Mapped m = (Mapped) component; - return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - Mapped m = (Mapped) component; - if (property == 0) { - m.setParameterizable((Parameterizable)value); - } - else { - m.setParameterMappings((Map)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - Mapped toCopy = (Mapped) value; - Mapped m = new Mapped(); - m.setParameterizable(toCopy.getParameterizable()); - m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); - return m; - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); - if (StringUtils.isEmpty(parameterizableUuid)) { return null; } - String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); - Map mappings = new HashMap(); - if (StringUtils.isNotBlank(serializedMappings)) { - try { - mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to deserialize parameter mappings for definition", e); - } - } - return new Mapped(d, mappings); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String definitionUuid = null; - String serializedMappings = null; - if (value != null) { - Mapped m = (Mapped) value; - if (m.getParameterizable() != null) { - definitionUuid = m.getParameterizable().getUuid(); - if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { - try { - serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); - } - catch (Exception e) { - throw new HibernateException("Unable to serialize mappings for definition", e); - } - } - } - } - HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); - } - - /** - * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } - - /** - * @see ParameterizedType#setParameterValues(Properties) - */ - public void setParameterValues(Properties parameters) { - String mappedTypeStr = parameters.getProperty("mappedType"); - try { - mappedType = (Class)Context.loadClass(mappedTypeStr); - } - catch (Exception e) { - throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); - } - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.apache.commons.lang.StringUtils; +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.ParameterizedType; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.definition.DefinitionContext; +import org.openmrs.module.reporting.evaluation.Definition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameterizable; +import org.openmrs.module.reporting.serializer.ReportingSerializer; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +/** + * Custom User-Type for storing Mapped objects in a single table within 2 columns + * This type takes in 2 properties and 1 parameter in the form: + *
+ *		
+ *			
+ *			
+ *			
+ *				org.openmrs.module.reporting.report.definition.ReportDefinition
+ *			
+ *		
+ * 
+ */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class MappedDefinitionType implements CompositeUserType, ParameterizedType { + + /** + * Property via ParameterizedType for storing the type of the Mapped Parameterizable + */ + private Class mappedType; + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return Mapped.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"definition", "parameterMappings"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + Mapped m = (Mapped) component; + return (property == 0 ? m.getParameterizable() : m.getParameterMappings()); + } + + /** + * @see CompositeUserType#setPropertyValue(Object, int, Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + Mapped m = (Mapped) component; + if (property == 0) { + m.setParameterizable((Parameterizable)value); + } + else { + m.setParameterMappings((Map)value); + } + } + + /** + * @see CompositeUserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + Mapped toCopy = (Mapped) value; + Mapped m = new Mapped(); + m.setParameterizable(toCopy.getParameterizable()); + m.setParameterMappings(new HashMap(toCopy.getParameterMappings())); + return m; + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner); + if (StringUtils.isEmpty(parameterizableUuid)) { return null; } + String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid); + Map mappings = new HashMap(); + if (StringUtils.isNotBlank(serializedMappings)) { + try { + mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to deserialize parameter mappings for definition", e); + } + } + return new Mapped(d, mappings); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String definitionUuid = null; + String serializedMappings = null; + if (value != null) { + Mapped m = (Mapped) value; + if (m.getParameterizable() != null) { + definitionUuid = m.getParameterizable().getUuid(); + if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) { + try { + serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class); + } + catch (Exception e) { + throw new HibernateException("Unable to serialize mappings for definition", e); + } + } + } + } + HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + /** + * @see ParameterizedType#setParameterValues(Properties) + */ + public void setParameterValues(Properties parameters) { + String mappedTypeStr = parameters.getProperty("mappedType"); + try { + mappedType = (Class)Context.loadClass(mappedTypeStr); + } + catch (Exception e) { + throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e); + } + } } \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java similarity index 95% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java index a39f3f5c2b..55faf26a12 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java @@ -1,144 +1,143 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import static java.sql.Types.VARCHAR; - -import java.io.IOException; -import java.io.Serializable; -import java.io.StringReader; -import java.io.StringWriter; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; - -/** - * A report definition type - */ -public class PropertiesType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if (cached == null) { - return null; - } - try { - String s = (String) cached; - Properties p = new Properties(); - p.load(new StringReader(s)); - return p; - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to load properties from string", e); - } - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value != null) { - Properties val = (Properties) value; - Properties copy = new Properties(); - for ( Map.Entry e : val.entrySet() ) { - copy.setProperty((String) e.getKey(), (String) e.getValue()); - } - return copy; - } else { - return null; - } - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - try { - Properties props = (Properties) value; - StringWriter sw = new StringWriter(); - props.store(sw, null); - return sw.toString(); - } - catch (IOException e) { - throw new IllegalArgumentException("Unable to store properties as string", e); - } - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String s = rs.getString(names[0]); - return assemble(s, null); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String val = (String) disassemble(value); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("unchecked") - public Class returnedClass() { - return Properties.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; + +import java.io.IOException; +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import static java.sql.Types.VARCHAR; + +/** + * A report definition type + */ +public class PropertiesType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if (cached == null) { + return null; + } + try { + String s = (String) cached; + Properties p = new Properties(); + p.load(new StringReader(s)); + return p; + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to load properties from string", e); + } + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value != null) { + Properties val = (Properties) value; + Properties copy = new Properties(); + for ( Map.Entry e : val.entrySet() ) { + copy.setProperty((String) e.getKey(), (String) e.getValue()); + } + return copy; + } else { + return null; + } + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + try { + Properties props = (Properties) value; + StringWriter sw = new StringWriter(); + props.store(sw, null); + return sw.toString(); + } + catch (IOException e) { + throw new IllegalArgumentException("Unable to store properties as string", e); + } + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String s = rs.getString(names[0]); + return assemble(s, null); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + String val = (String) disassemble(value); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("unchecked") + public Class returnedClass() { + return Properties.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } +} diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java similarity index 91% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java index 008ab123f9..bfce0700c1 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java @@ -1,167 +1,167 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.type.Type; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; -import org.openmrs.module.reporting.common.HibernateUtil; -import org.openmrs.module.reporting.report.renderer.RenderingMode; -import org.openmrs.module.reporting.report.renderer.ReportRenderer; - -/** - * Custom User-Type for storing RenderingModes in a single table within 2 columns - * This type takes in 2 properties in the form: - *
- *   
- *     
- *     
- *   
- * 
- */ -@SuppressWarnings({"rawtypes"}) -public class RenderingModeType implements CompositeUserType { - - /** - * @see CompositeUserType#returnedClass() - */ - public Class returnedClass() { - return RenderingMode.class; - } - - /** - * @see CompositeUserType#getPropertyNames() - */ - public String[] getPropertyNames() { - return new String[] {"renderer", "argument"}; - } - - /** - * @see CompositeUserType#getPropertyTypes() - */ - public Type[] getPropertyTypes() { - return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; - } - - /** - * @see CompositeUserType#isMutable() - */ - public boolean isMutable() { - return true; - } - - /** - * @see CompositeUserType#getPropertyValue(java.lang.Object, int) - */ - public Object getPropertyValue(Object component, int property) throws HibernateException { - RenderingMode m = (RenderingMode) component; - return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); - } - - /** - * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object) - */ - public void setPropertyValue(Object component, int property, Object value) throws HibernateException { - RenderingMode m = (RenderingMode) component; - if (property == 0) { - ReportRenderer r = null; - if (value != null) { - try { - r = (ReportRenderer)((Class) value).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); - } - } - m.setRenderer(r); - } - else { - m.setArgument((String)value); - } - } - - /** - * @see CompositeUserType#deepCopy(java.lang.Object) - */ - public Object deepCopy(Object value) throws HibernateException { - if (value == null) return null; - RenderingMode toCopy = (RenderingMode) value; - return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); - } - - /** - * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); - if (rendererClass == null) { return null; } - String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); - ReportRenderer r = null; - try { - r = (ReportRenderer)((Class) rendererClass).newInstance(); - } - catch (Exception e) { - throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); - } - return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); - } - - /** - * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - RenderingMode mode = (RenderingMode) value; - HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); - HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); - } - - /** - * @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object) - */ - public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see CompositeUserType#disassemble(Object, SessionImplementor) - */ - public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { - return (Serializable) deepCopy(value); - } - - /** - * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) - */ - public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { - return deepCopy(cached); - } +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.UserType; +import org.openmrs.module.reporting.common.HibernateUtil; +import org.openmrs.module.reporting.report.renderer.RenderingMode; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +/** + * Custom User-Type for storing RenderingModes in a single table within 2 columns + * This type takes in 2 properties in the form: + *
+ *   
+ *     
+ *     
+ *   
+ * 
+ */ +@SuppressWarnings({"rawtypes"}) +public class RenderingModeType implements CompositeUserType { + + /** + * @see CompositeUserType#returnedClass() + */ + public Class returnedClass() { + return RenderingMode.class; + } + + /** + * @see CompositeUserType#getPropertyNames() + */ + public String[] getPropertyNames() { + return new String[] {"renderer", "argument"}; + } + + /** + * @see CompositeUserType#getPropertyTypes() + */ + public Type[] getPropertyTypes() { + return new Type[] { HibernateUtil.standardType("CLASS"), HibernateUtil.standardType("STRING") }; + } + + /** + * @see CompositeUserType#isMutable() + */ + public boolean isMutable() { + return true; + } + + /** + * @see CompositeUserType#getPropertyValue(Object, int) + */ + public Object getPropertyValue(Object component, int property) throws HibernateException { + RenderingMode m = (RenderingMode) component; + return (property == 0 ? m.getRenderer().getClass() : m.getArgument()); + } + + /** + * @see CompositeUserType#setPropertyValue(Object, int, Object) + */ + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + RenderingMode m = (RenderingMode) component; + if (property == 0) { + ReportRenderer r = null; + if (value != null) { + try { + r = (ReportRenderer)((Class) value).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + value, e); + } + } + m.setRenderer(r); + } + else { + m.setArgument((String)value); + } + } + + /** + * @see CompositeUserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + if (value == null) return null; + RenderingMode toCopy = (RenderingMode) value; + return new RenderingMode(toCopy.getRenderer(), toCopy.getLabel(), toCopy.getArgument(), toCopy.getSortWeight()); + } + + /** + * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner); + if (rendererClass == null) { return null; } + String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner); + ReportRenderer r = null; + try { + r = (ReportRenderer)((Class) rendererClass).newInstance(); + } + catch (Exception e) { + throw new HibernateException("Error instantiating a new reporting renderer from " + rendererClass, e); + } + return new RenderingMode(r, r.getClass().getSimpleName(), argument, null); + } + + /** + * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + RenderingMode mode = (RenderingMode) value; + HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session); + HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session); + } + + /** + * @see CompositeUserType#replace(Object, Object, org.hibernate.engine.SessionImplementor, Object) + */ + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see CompositeUserType#disassemble(Object, SessionImplementor) + */ + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + /** + * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object) + */ + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } } \ No newline at end of file diff --git a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java similarity index 96% rename from api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java rename to api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java index 5f2a1be77f..4caeb1dca3 100644 --- a/api-2.4/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java +++ b/api/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java @@ -1,120 +1,120 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under - * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. - * - * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS - * graphic logo is a trademark of OpenMRS Inc. - */ -package org.openmrs.module.reporting.report.service.db; - -import java.io.Serializable; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import org.hibernate.HibernateException; -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.usertype.UserType; -import org.openmrs.api.context.Context; -import org.openmrs.module.reporting.report.definition.ReportDefinition; -import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; - -/** - * A report definition type - */ -public class ReportDefinitionType implements UserType { - - /** - * @see UserType#assemble(Serializable, Object) - */ - public Object assemble(Serializable cached, Object owner) throws HibernateException { - if(cached == null){ - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); - } - - /** - * @see UserType#deepCopy(Object) - */ - public Object deepCopy(Object value) throws HibernateException { - return value; - } - - /** - * @see UserType#disassemble(Object) - */ - public Serializable disassemble(Object value) throws HibernateException { - if (value == null) { - return null; - } - return ((ReportDefinition)value).getUuid(); - } - - /** - * @see UserType#equals(Object, Object) - */ - public boolean equals(Object x, Object y) throws HibernateException { - return x != null && x.equals(y); - } - - /** - * @see UserType#hashCode(Object) - */ - public int hashCode(Object x) throws HibernateException { - return x.hashCode(); - } - - /** - * @see UserType#isMutable() - */ - public boolean isMutable() { - return false; - } - - /** - * @see UserType#nullSafeGet(ResultSet, String[], Object) - */ - public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { - String uuid = rs.getString(names[0]); - if (uuid == null) { - return null; - } - return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); - } - - /** - * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) - */ - public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - ReportDefinition d = (ReportDefinition) value; - String val = (d == null ? null : d.getUuid()); - st.setString(index, val); - } - - /** - * @see UserType#replace(Object, Object, Object) - */ - public Object replace(Object original, Object target, Object owner) throws HibernateException { - return original; - } - - /** - * @see UserType#returnedClass() - */ - @SuppressWarnings("rawtypes") - public Class returnedClass() { - return ReportDefinition.class; - } - - /** - * @see UserType#sqlTypes() - */ - public int[] sqlTypes() { - return new int[] { Types.VARCHAR }; - } -} +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.reporting.report.service.db; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; +import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.report.definition.ReportDefinition; +import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +/** + * A report definition type + */ +public class ReportDefinitionType implements UserType { + + /** + * @see UserType#assemble(Serializable, Object) + */ + public Object assemble(Serializable cached, Object owner) throws HibernateException { + if(cached == null){ + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(cached.toString()); + } + + /** + * @see UserType#deepCopy(Object) + */ + public Object deepCopy(Object value) throws HibernateException { + return value; + } + + /** + * @see UserType#disassemble(Object) + */ + public Serializable disassemble(Object value) throws HibernateException { + if (value == null) { + return null; + } + return ((ReportDefinition)value).getUuid(); + } + + /** + * @see UserType#equals(Object, Object) + */ + public boolean equals(Object x, Object y) throws HibernateException { + return x != null && x.equals(y); + } + + /** + * @see UserType#hashCode(Object) + */ + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + /** + * @see UserType#isMutable() + */ + public boolean isMutable() { + return false; + } + + /** + * @see UserType#nullSafeGet(ResultSet, String[], Object) + */ + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + String uuid = rs.getString(names[0]); + if (uuid == null) { + return null; + } + return Context.getService(ReportDefinitionService.class).getDefinitionByUuid(uuid); + } + + /** + * @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor) + */ + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + ReportDefinition d = (ReportDefinition) value; + String val = (d == null ? null : d.getUuid()); + st.setString(index, val); + } + + /** + * @see UserType#replace(Object, Object, Object) + */ + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } + + /** + * @see UserType#returnedClass() + */ + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return ReportDefinition.class; + } + + /** + * @see UserType#sqlTypes() + */ + public int[] sqlTypes() { + return new int[] { Types.VARCHAR }; + } +} diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index 23e6193693..f3c08faf57 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -25,7 +25,6 @@ - org.openmrs.module.reportingcompatibility org.openmrs.module.legacyui org.openmrs.module.logic @@ -179,27 +178,4 @@ ReportRequest.hbm.xml - - - /lib/reporting-api-1.9.* - 1.9.9 - 1.12.* - - - /lib/reporting-api-1.10.* - 1.10.6 - 9.* - - - /lib/reporting-api-2.0.* - 2.0.0 - 2.3.* - - - /lib/reporting-api-2.2.* - 2.2.0 - - - /lib/reporting-api-2.4.* - 2.4.0 - - - diff --git a/pom.xml b/pom.xml index b45ff644e8..8dfe206602 100644 --- a/pom.xml +++ b/pom.xml @@ -33,23 +33,16 @@ api - api-1.9 - api-1.10 - api-2.0 - api-2.2 - api-2.4 api-tests omod - 1.9.9 - 2.0.6 - 1.9 + 2.4.1 + 2.4 1.7.2 0.2.14 1.2 - 1.5.0 2.1.1 3.12 1.8.7 @@ -61,7 +54,6 @@ Reporting ${project.parent.version} ${project.parent.groupId}.${project.parent.artifactId} - reporting-api-1.9 @@ -107,19 +99,6 @@ - - org.codehaus.jackson - jackson-core-asl - ${jacksonVersion} - provided - - - - org.codehaus.jackson - jackson-mapper-asl - ${jacksonVersion} - provided - org.codehaus.groovy @@ -386,13 +365,7 @@ 2.4 api - api-1.9 - api-1.10 - api-2.0 - api-2.2 - api-2.4 api-tests - api-tests-2.4 omod @@ -469,8 +442,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.8 + 1.8 @@ -485,10 +458,10 @@ org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.5.3 - -Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true + -Xmx1024m -Xms1024m -Duser.language=en -Duser.region=US -Djdk.net.URLClassPath.disableClassPathURLCheck=true ${java.io.tmpdir} From e4d4ddd9edb021f18bad980f0d1ff383a1aeb526 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 20 Jun 2025 11:10:33 -0400 Subject: [PATCH 130/143] REPORT-913: Follow-up fix to exclude previous dependencies --- .gitignore | 7 --- api-tests/src/test/resources/log4j.xml | 24 -------- api-tests/src/test/resources/log4j2.xml | 22 +++++++ omod/pom.xml | 25 -------- omod/src/main/resources/config.xml | 2 +- pom.xml | 76 ------------------------- 6 files changed, 23 insertions(+), 133 deletions(-) delete mode 100644 api-tests/src/test/resources/log4j.xml create mode 100644 api-tests/src/test/resources/log4j2.xml diff --git a/.gitignore b/.gitignore index 5349d8455f..6d49341202 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,6 @@ api/.classpath api/.project api/.settings/* api/target/* -api-1.9/.classpath -api-1.9/.project -api-1.9/.settings/* -api-2.0/.classpath -api-2.0/.project -api-2.0/.settings/* api-tests/.classpath api-tests/.project api-tests/.settings/* @@ -27,7 +21,6 @@ omod/.classpath omod/.project omod/.settings/* omod/target/* -test-1.9/target/* /.settings .DS_Store diff --git a/api-tests/src/test/resources/log4j.xml b/api-tests/src/test/resources/log4j.xml deleted file mode 100644 index b32c0a5a63..0000000000 --- a/api-tests/src/test/resources/log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api-tests/src/test/resources/log4j2.xml b/api-tests/src/test/resources/log4j2.xml new file mode 100644 index 0000000000..f188f4f060 --- /dev/null +++ b/api-tests/src/test/resources/log4j2.xml @@ -0,0 +1,22 @@ + + + + + %p - %C{1}.%M(%L) |%d{ISO8601}| %m%n + + + + + + + + + + + + + + + + diff --git a/omod/pom.xml b/omod/pom.xml index d1f7eaff0d..2bdefa944c 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -16,31 +16,6 @@ ${project.parent.artifactId}-api ${project.parent.version} - - ${project.parent.groupId} - ${project.parent.artifactId}-api-1.10 - ${project.parent.version} - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-1.9 - ${project.parent.version} - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-2.0 - ${project.parent.version} - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-2.2 - ${project.parent.version} - - - ${project.parent.groupId} - ${project.parent.artifactId}-api-2.4 - ${project.parent.version} - org.openmrs.module legacyui-omod diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index f3c08faf57..5f1c34c3ec 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -15,7 +15,7 @@ @MODULE_PACKAGE@.ReportingModuleActivator https://dev.openmrs.org/modules/download/@MODULE_ID@/update.rdf - 1.11.3 - 1.11.*, 1.10.2 - 1.10.*, 1.9.9 - 1.9.*, 1.12 + ${openMRSVersion} org.openmrs.module.serialization.xstream diff --git a/pom.xml b/pom.xml index 8dfe206602..3a2d614575 100644 --- a/pom.xml +++ b/pom.xml @@ -302,82 +302,6 @@ - - - 1.10 - - 1.10.2 - 1.10 - - - - 1.11 - - 1.11.3 - 1.11 - - - - 1.12 - - 1.12.0 - 1.12 - 1.9.13 - - - - 2.0 - - 2.0.0 - 2.0 - 1.9.13 - reporting-api-2.0 - - - - 2.1 - - 2.1.1 - 2.1 - 1.9.13 - reporting-api-2.0 - - - - 2.2 - - 2.2.0 - 2.2 - 1.9.13 - reporting-api-2.0 - - - - 2.3 - - 2.3.0 - 2.3 - 1.9.13 - reporting-api-2.0 - - - - 2.4 - - api - api-tests - omod - - - - 2.4.1 - 2.4 - 1.9.13 - reporting-api-2.4 - - - - From c432bc5dd2b743afb613cd42b56a986766a0114d Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 7 Jul 2025 13:57:09 +0000 Subject: [PATCH 131/143] [maven-release-plugin] prepare release 1.28.0 --- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 67ca717cf0..b6f538cf13 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.28.0-SNAPSHOT + 1.28.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index f69f2a14cb..a5c0232611 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.28.0-SNAPSHOT + 1.28.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 2bdefa944c..169de11bb3 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.28.0-SNAPSHOT + 1.28.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index 3a2d614575..e566657dc1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.28.0-SNAPSHOT + 1.28.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 1.28.0 From eb5fb09a063cc9e0099cb435b53a92bd4d8d8dc1 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Mon, 7 Jul 2025 13:57:11 +0000 Subject: [PATCH 132/143] [maven-release-plugin] prepare for next development iteration --- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-tests/pom.xml b/api-tests/pom.xml index b6f538cf13..9c13697504 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.28.0 + 1.29.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index a5c0232611..b86abc6d1b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.28.0 + 1.29.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 169de11bb3..55f0dbf714 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.28.0 + 1.29.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index e566657dc1..40142027ed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.28.0 + 1.29.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 1.28.0 + HEAD From ac35bc76b1a6552fdb58fc1873ae447de16d64c8 Mon Sep 17 00:00:00 2001 From: Rafal Korytkowski Date: Thu, 24 Jul 2025 11:03:51 +0200 Subject: [PATCH 133/143] Constructor must be public for CGLIB proxies, see TRUNK-6382 --- .../definition/service/SerializedDefinitionServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java index 21afe8d844..1fbe74b595 100644 --- a/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/reporting/definition/service/SerializedDefinitionServiceImpl.java @@ -40,7 +40,7 @@ public class SerializedDefinitionServiceImpl extends BaseOpenmrsService implemen //**************** // Constructor //**************** - private SerializedDefinitionServiceImpl() { } + public SerializedDefinitionServiceImpl() { } //**************** // Properties From 2c8e57e9054bdc51f34ed464b7b8defd9d6f2ba7 Mon Sep 17 00:00:00 2001 From: Wikum Weerakutti Date: Thu, 24 Jul 2025 15:06:23 +0530 Subject: [PATCH 134/143] REPORT-912: Update to OpenMRS platform 2.7.3 and Support Java 21 (#261) * Update to Platform 2.7.0 and Support Java 21 * Migrate to org.openmrs.test.jupiter.BaseModuleContextSensitiveTest * Add the EvaluationProfilerTest24On --- .github/workflows/maven.yml | 2 +- api-tests/pom.xml | 26 +++++++++- ...ncounterCohortDefinitionEvaluatorTest.java | 18 ++++--- .../VisitCohortDefinitionEvaluatorTest.java | 2 +- .../PrivilegedDataConverterTest.java | 37 ++++++++------- .../service/PatientDataServiceImplTest.java | 14 +++--- .../evaluator/VisitIdDataEvaluatorTest.java | 14 ++++-- ...peatPerTimePeriodDataSetEvaluatorTest.java | 4 +- .../evaluation/EvaluationProfilerTest.java | 14 +++--- .../EvaluationProfilerTest24On.java | 5 +- ...MappedParametersObsQueryEvaluatorTest.java | 12 +++-- .../evaluator/SqlObsQueryEvaluatorTest.java | 12 +++-- .../ActiveVisitQueryEvaluatorTest.java | 12 +++-- .../reporting/include/PrivilegeTest.xml | 17 +++++++ ....xml => ReportTestDataset-openmrs-2.7.xml} | 0 api/pom.xml | 3 +- .../serializer/ReportingSerializer.java | 6 +++ .../resources/moduleApplicationContext.xml | 2 +- omod/pom.xml | 2 +- omod/src/main/resources/config.xml | 1 + pom.xml | 47 ++++--------------- 21 files changed, 144 insertions(+), 106 deletions(-) create mode 100644 api-tests/src/test/resources/org/openmrs/module/reporting/include/PrivilegeTest.xml rename api-tests/src/test/resources/org/openmrs/module/reporting/include/{ReportTestDataset-openmrs-2.4.xml => ReportTestDataset-openmrs-2.7.xml} (100%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index df6445a783..d4c5ce5d9d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: platform: [ ubuntu-latest ] - java-version: [ 8 ] + java-version: [ 8, 11, 17, 21, 24 ] runs-on: ${{ matrix.platform }} env: diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 9c13697504..5eed86d7bd 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.29.0-SNAPSHOT + 2.0.0-SNAPSHOT reporting-api-tests @@ -40,6 +40,14 @@ javassist javassist + + org.powermock + powermock-api-mockito2 + + + org.powermock + powermock-api-mockito + @@ -52,6 +60,14 @@ javassist javassist + + org.powermock + powermock-api-mockito2 + + + org.powermock + powermock-api-mockito + @@ -64,6 +80,14 @@ javassist javassist + + org.powermock + powermock-api-mockito2 + + + org.powermock + powermock-api-mockito + diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java index 8479486659..9df515e484 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/EncounterCohortDefinitionEvaluatorTest.java @@ -14,9 +14,9 @@ import java.util.Collections; import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.openmrs.Cohort; import org.openmrs.Encounter; import org.openmrs.EncounterType; @@ -34,17 +34,21 @@ import org.openmrs.module.reporting.common.TimeQualifier; import org.openmrs.module.reporting.definition.DefinitionContext; import org.openmrs.module.reporting.evaluation.EvaluationContext; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; import org.openmrs.test.Verifies; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; +@SkipBaseSetup public class EncounterCohortDefinitionEvaluatorTest extends BaseModuleContextSensitiveTest { protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; protected static final String XML_REPORT_TEST_DATASET = "ReportTestDataset"; - @Before + @BeforeEach public void setup() throws Exception { + initializeInMemoryDatabase(); + authenticate(); executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); } @@ -201,7 +205,7 @@ public void evaluate_shouldReturnCorrectPatientsWhenTimeQualifierParametersAreSe * @see EncounterCohortDefinitionEvaluator#evaluate(CohortDefinition,EvaluationContext) * @verifies return correct patients when provider parameters are set */ - @Ignore + @Disabled @Test public void evaluate_shouldReturnCorrectPatientsWhenProviderParametersAreSet() throws Exception { EncounterCohortDefinition cd = new EncounterCohortDefinition(); @@ -212,7 +216,7 @@ public void evaluate_shouldReturnCorrectPatientsWhenProviderParametersAreSet() t /** * @see {@link EncounterCohortDefinitionEvaluator#evaluate(CohortDefinition,EvaluationContext)} */ - @Ignore + @Disabled @Test @Verifies(value = "should not return voided patients", method = "evaluate(CohortDefinition,EvaluationContext)") public void evaluate_shouldNotReturnVoidedPatients() throws Exception { diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java index 87d3dc7669..12db3e1db6 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/cohort/definition/evaluator/VisitCohortDefinitionEvaluatorTest.java @@ -68,7 +68,7 @@ public void setUp() throws Exception { @Test public void testEvaluateWithNoProperties() throws Exception { Cohort c = cohortDefinitionService.evaluate(cd, null); - assertThat(c.size(), is(2)); + assertThat(c.size(), is(3)); } @Test diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java index c6661638c0..22a48c0a03 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/converter/PrivilegedDataConverterTest.java @@ -12,17 +12,14 @@ import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.api.context.Context; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; +import org.openmrs.test.SkipBaseSetup; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; -@RunWith(PowerMockRunner.class) -@PrepareForTest(Context.class) -public class PrivilegedDataConverterTest { +@SkipBaseSetup +public class PrivilegedDataConverterTest extends BaseModuleContextSensitiveTest { public static final String INPUT = "input"; public static final String REPLACEMENT = "****"; @@ -30,18 +27,24 @@ public class PrivilegedDataConverterTest { public static final String HAS_PRIV = "A privilege I have"; public static final String DOES_NOT_HAVE_PRIV = "A privilege I do not have"; - @Before + @BeforeEach public void setUp() throws Exception { - PowerMockito.mockStatic(Context.class); - PowerMockito.when(Context.hasPrivilege(HAS_PRIV)).thenReturn(true); - PowerMockito.when(Context.hasPrivilege(DOES_NOT_HAVE_PRIV)).thenReturn(false); + initializeInMemoryDatabase(); + executeDataSet("org/openmrs/module/reporting/include/PrivilegeTest.xml"); } @Test - public void testConvertWithPrivilege() throws Exception { - PrivilegedDataConverter converter = new PrivilegedDataConverter(HAS_PRIV); - converter.setReplacement(REPLACEMENT); - assertThat((String) converter.convert(INPUT), is(INPUT)); + public void testConvertWithPrivilege() { + try { + Context.addProxyPrivilege(HAS_PRIV); + Context.hasPrivilege(HAS_PRIV); + PrivilegedDataConverter converter = new PrivilegedDataConverter(HAS_PRIV); + converter.setReplacement(REPLACEMENT); + assertThat((String) converter.convert(INPUT), is(INPUT)); + } + finally { + Context.removeProxyPrivilege(HAS_PRIV); + } } @Test diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java index 4cd21f1535..ddf17348c8 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/patient/service/PatientDataServiceImplTest.java @@ -10,8 +10,8 @@ package org.openmrs.module.reporting.data.patient.service; import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.Cohort; import org.openmrs.Patient; import org.openmrs.PersonAttribute; @@ -31,10 +31,10 @@ import org.openmrs.module.reporting.definition.library.DocumentedDefinition; import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.test.BaseContextSensitiveTest; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Arrays; +import java.util.Collections; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.nullValue; @@ -59,7 +59,7 @@ public class PatientDataServiceImplTest extends BaseModuleContextSensitiveTest { * * @throws Exception */ - @Before + @BeforeEach public void setup() throws Exception { executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); } @@ -159,7 +159,7 @@ private CohortDefinition setUpTestPatientCohortDefinition(PersonAttributeType te PersonAttributeCohortDefinition cohortDefinition = new PersonAttributeCohortDefinition(); cohortDefinition.setName("Test Patients"); cohortDefinition.setAttributeType(testAttributeType); - cohortDefinition.setValues(Arrays.asList("true")); + cohortDefinition.setValues(Collections.singletonList("true")); Context.getService(CohortDefinitionService.class).saveDefinition(cohortDefinition); return cohortDefinition; } @@ -199,7 +199,7 @@ public String getKeyPrefix() { public CohortDefinition getTestPatients() { PersonAttributeCohortDefinition cohortDefinition = new PersonAttributeCohortDefinition(); cohortDefinition.setAttributeType(Context.getPersonService().getPersonAttributeTypeByUuid(TEST_PATIENT_ATTR_TYPE_UUID)); - cohortDefinition.setValues(Arrays.asList("true")); + cohortDefinition.setValues(Collections.singletonList("true")); return cohortDefinition; } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java index 5bc097b695..f5815de1a0 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/data/visit/evaluator/VisitIdDataEvaluatorTest.java @@ -10,8 +10,8 @@ package org.openmrs.module.reporting.data.visit.evaluator; import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.Cohort; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.common.TestUtil; @@ -21,9 +21,11 @@ import org.openmrs.module.reporting.evaluation.EvaluationContext; import org.openmrs.module.reporting.evaluation.context.VisitEvaluationContext; import org.openmrs.module.reporting.query.visit.VisitIdSet; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; -public class VisitIdDataEvaluatorTest extends BaseModuleContextSensitiveTest{ +@SkipBaseSetup +public class VisitIdDataEvaluatorTest extends BaseModuleContextSensitiveTest { protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; @@ -35,8 +37,10 @@ public class VisitIdDataEvaluatorTest extends BaseModuleContextSensitiveTest{ * * @throws Exception */ - @Before + @BeforeEach public void setup() throws Exception { + initializeInMemoryDatabase(); + authenticate(); executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java index 41e2df6356..c99debd6f5 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/dataset/definition/evaluator/RepeatPerTimePeriodDataSetEvaluatorTest.java @@ -30,8 +30,8 @@ import java.util.HashMap; import java.util.Map; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java index 39192f318b..786c3fa0c3 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest.java @@ -9,25 +9,23 @@ */ package org.openmrs.module.reporting.evaluation; -import static org.junit.Assume.assumeTrue; - import org.apache.log4j.Appender; import org.apache.log4j.Level; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.WriterAppender; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.indicator.CohortIndicator; import org.openmrs.module.reporting.indicator.service.IndicatorService; import org.openmrs.module.reporting.test.OpenmrsVersionTestListener; import org.openmrs.module.reporting.test.RequiresVersion; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; import org.springframework.test.context.TestExecutionListeners; import java.io.StringWriter; @@ -52,7 +50,7 @@ public class EvaluationProfilerTest extends BaseModuleContextSensitiveTest { /** * Setup each test by configuring AOP on the relevant services and logging for the profiler class */ - @Before + @BeforeEach public void setup() { profiler1 = new EvaluationProfiler(new EvaluationContext()); profiler2 = new EvaluationProfiler(new EvaluationContext()); @@ -70,7 +68,7 @@ public void setup() { /** * Cleanup after tests by removing AOP and resetting logging */ - @After + @AfterEach public void cleanup() { logger.setLevel(startingLevel); for (Appender appender : startingAppenders) { diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java index 5d98991313..a4edf82f44 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/evaluation/EvaluationProfilerTest24On.java @@ -15,13 +15,14 @@ import org.junit.BeforeClass; import org.junit.Test; import org.openmrs.api.context.Context; +import org.openmrs.logging.MemoryAppender; +import org.openmrs.logging.OpenmrsLoggingUtil; import org.openmrs.module.reporting.cohort.definition.GenderCohortDefinition; import org.openmrs.module.reporting.indicator.CohortIndicator; import org.openmrs.module.reporting.indicator.service.IndicatorService; import org.openmrs.module.reporting.test.OpenmrsVersionTestListener; import org.openmrs.module.reporting.test.RequiresVersion; import org.openmrs.test.BaseModuleContextSensitiveTest; -import org.openmrs.util.MemoryAppender; import org.openmrs.util.OpenmrsUtil; import org.springframework.test.context.TestExecutionListeners; @@ -38,7 +39,7 @@ public class EvaluationProfilerTest24On extends BaseModuleContextSensitiveTest { @BeforeClass public static void beforeClass() { - appender = OpenmrsUtil.getMemoryAppender(); + appender = OpenmrsLoggingUtil.getMemoryAppender(); if (appender == null) { LoggerContext context = (LoggerContext) LogManager.getContext(false); diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java index 091968460d..d50fce7ca2 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/encounter/evaluator/MappedParametersObsQueryEvaluatorTest.java @@ -9,8 +9,8 @@ */ package org.openmrs.module.reporting.query.encounter.evaluator; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.common.DateUtil; import org.openmrs.module.reporting.common.TestUtil; @@ -20,7 +20,8 @@ import org.openmrs.module.reporting.query.obs.definition.BasicObsQuery; import org.openmrs.module.reporting.query.obs.definition.MappedParametersObsQuery; import org.openmrs.module.reporting.query.obs.service.ObsQueryService; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; import java.util.Date; import java.util.HashMap; @@ -30,14 +31,17 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; +@SkipBaseSetup public class MappedParametersObsQueryEvaluatorTest extends BaseModuleContextSensitiveTest { protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; protected static final String XML_REPORT_TEST_DATASET = "ReportTestDataset"; - @Before + @BeforeEach public void setup() throws Exception { + initializeInMemoryDatabase(); + authenticate(); executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java index 1df50abe27..783385ad97 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/obs/evaluator/SqlObsQueryEvaluatorTest.java @@ -12,8 +12,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.Cohort; import org.openmrs.api.context.Context; import org.openmrs.module.reporting.common.TestUtil; @@ -23,17 +23,21 @@ import org.openmrs.module.reporting.query.obs.ObsQueryResult; import org.openmrs.module.reporting.query.obs.definition.SqlObsQuery; import org.openmrs.module.reporting.query.obs.service.ObsQueryService; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; /** * Test the evaluation of the SqlObsQuery */ +@SkipBaseSetup public class SqlObsQueryEvaluatorTest extends BaseModuleContextSensitiveTest { protected static Log log = LogFactory.getLog(SqlObsQueryEvaluatorTest.class); - @Before + @BeforeEach public void setup() throws Exception { + initializeInMemoryDatabase(); + authenticate(); executeDataSet("org/openmrs/module/reporting/include/" + new TestUtil().getTestDatasetFilename("ReportTestDataset")); } diff --git a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java index 4c7b12ca68..1f7f83f632 100644 --- a/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java +++ b/api-tests/src/test/java/org/openmrs/module/reporting/query/visit/evaluator/ActiveVisitQueryEvaluatorTest.java @@ -9,8 +9,8 @@ */ package org.openmrs.module.reporting.query.visit.evaluator; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.openmrs.Patient; import org.openmrs.Visit; import org.openmrs.api.VisitService; @@ -22,7 +22,8 @@ import org.openmrs.module.reporting.query.visit.VisitQueryResult; import org.openmrs.module.reporting.query.visit.definition.ActiveVisitQuery; import org.openmrs.module.reporting.query.visit.service.VisitQueryService; -import org.openmrs.test.BaseModuleContextSensitiveTest; +import org.openmrs.test.SkipBaseSetup; +import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; @@ -32,6 +33,7 @@ import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; import static org.junit.Assert.assertThat; +@SkipBaseSetup public class ActiveVisitQueryEvaluatorTest extends BaseModuleContextSensitiveTest { protected static final String XML_DATASET_PATH = "org/openmrs/module/reporting/include/"; @@ -47,8 +49,10 @@ public class ActiveVisitQueryEvaluatorTest extends BaseModuleContextSensitiveTes @Autowired private TestDataManager data; - @Before + @BeforeEach public void setup() throws Exception { + initializeInMemoryDatabase(); + authenticate(); executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REPORT_TEST_DATASET)); } diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/PrivilegeTest.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/PrivilegeTest.xml new file mode 100644 index 0000000000..7444951a19 --- /dev/null +++ b/api-tests/src/test/resources/org/openmrs/module/reporting/include/PrivilegeTest.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml b/api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.7.xml similarity index 100% rename from api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.4.xml rename to api-tests/src/test/resources/org/openmrs/module/reporting/include/ReportTestDataset-openmrs-2.7.xml diff --git a/api/pom.xml b/api/pom.xml index b86abc6d1b..10190d27ba 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.29.0-SNAPSHOT + 2.0.0-SNAPSHOT reporting-api jar @@ -11,5 +11,4 @@ API project for Reporting - diff --git a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java index 58b63e19f2..c356f07150 100644 --- a/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java +++ b/api/src/main/java/org/openmrs/module/reporting/serializer/ReportingSerializer.java @@ -20,6 +20,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openmrs.api.context.Context; +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; +import org.openmrs.module.reporting.dataset.definition.CohortIndicatorAndDimensionDataSetDefinition; +import org.openmrs.module.reporting.evaluation.parameter.Mapped; +import org.openmrs.module.reporting.evaluation.parameter.Parameter; +import org.openmrs.module.reporting.report.definition.ReportDefinition; import org.openmrs.module.serialization.xstream.XStreamShortSerializer; import org.openmrs.module.serialization.xstream.mapper.CGLibMapper; import org.openmrs.module.serialization.xstream.mapper.HibernateCollectionMapper; @@ -88,6 +93,7 @@ public Object unmarshal(HierarchicalStreamReader reader, Object root) { xstream.registerConverter(new IndicatorConverter(mapper, converterLookup)); xstream.registerConverter(new ReportDefinitionConverter(mapper, converterLookup)); + xstream.allowTypes(new Class[] {Parameter.class, Mapped.class, CohortIndicatorAndDimensionDataSetDefinition.CohortIndicatorAndDimensionSpecification.class}); } @Override diff --git a/api/src/main/resources/moduleApplicationContext.xml b/api/src/main/resources/moduleApplicationContext.xml index 38a380a90d..2213b24170 100644 --- a/api/src/main/resources/moduleApplicationContext.xml +++ b/api/src/main/resources/moduleApplicationContext.xml @@ -41,7 +41,7 @@ - + diff --git a/omod/pom.xml b/omod/pom.xml index 55f0dbf714..f3ac72d6fd 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 1.29.0-SNAPSHOT + 2.0.0-SNAPSHOT reporting-omod jar diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml index 5f1c34c3ec..fe403b3391 100644 --- a/omod/src/main/resources/config.xml +++ b/omod/src/main/resources/config.xml @@ -178,4 +178,5 @@ ReportRequest.hbm.xml + diff --git a/pom.xml b/pom.xml index 40142027ed..81f5034620 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 1.29.0-SNAPSHOT + 2.0.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -38,17 +38,16 @@ - 2.4.1 - 2.4 - 1.7.2 - 0.2.14 + 2.7.0 + 2.7 + 2.0.0-SNAPSHOT + 0.2.17-SNAPSHOT 1.2 2.1.1 3.12 - 1.8.7 - 2.12.5 - 1.1.2 - 1.7.0 + 2.12.5 + 1.1.2 + 1.7.0 UTF-8 ${project.parent.artifactId} Reporting @@ -99,15 +98,6 @@ - - - org.codehaus.groovy - groovy-all - ${groovyVersion} - jar - provided - - joda-time joda-time @@ -208,27 +198,6 @@ provided - - org.openmrs.module - serialization.xstream-api-1.9 - ${serializationVersion} - provided - - - - org.openmrs.module - serialization.xstream-api-1.10 - ${serializationVersion} - provided - - - - org.openmrs.module - serialization.xstream-api-2.0 - ${serializationVersion} - provided - - org.openmrs.module htmlwidgets-api From 35602dabf46b7edd17d1bc6d07833203fe1f0366 Mon Sep 17 00:00:00 2001 From: Ruhanga <41738040+Ruhanga@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:28:57 +0300 Subject: [PATCH 135/143] REPORT-912: Added Bamboo specs. (#264) --- bamboo-specs/bamboo.yml | 247 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 bamboo-specs/bamboo.yml diff --git a/bamboo-specs/bamboo.yml b/bamboo-specs/bamboo.yml new file mode 100644 index 0000000000..456c781481 --- /dev/null +++ b/bamboo-specs/bamboo.yml @@ -0,0 +1,247 @@ +--- +version: 2 +plan: + project-key: REP + key: REP + name: Reporting Module + description: More details of the release in https://wiki.openmrs.org/x/i4DTAw +stages: +- Build and Test: + manual: false + final: false + jobs: + - Build and Test JDK 8 + - Build and Test JDK 17 + - Build and Test JDK 11 + - Build and Test JDK 24 + - Build and Test JDK 21 +- Deploy: + manual: false + final: false + jobs: + - Deploy to Maven +- Release: + manual: true + final: false + jobs: + - Release to Maven +Build and Test JDK 8: + key: BTJ8 + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-8 bash -c 'mvn clean package && chmod -R 777 .' + description: Build and test + artifact-subscriptions: [] +Build and Test JDK 17: + key: BTJ17 + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-17 bash -c 'mvn clean package && chmod -R 777 .' + description: Build and test + artifact-subscriptions: [] +Build and Test JDK 11: + key: BTJ11 + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-11 bash -c 'mvn clean package && chmod -R 777 .' + description: Build and test + artifact-subscriptions: [] +Build and Test JDK 24: + key: BTJ24 + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-24 bash -c 'mvn clean package && chmod -R 777 .' + description: Build and test + artifact-subscriptions: [] +Build and Test JDK 21: + key: BTJ21 + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker run -v m2-repo:/root/.m2/repository -v ${PWD}:/module --rm -w="/module" maven:3.9.9-amazoncorretto-21 bash -c 'mvn clean package && chmod -R 777 .' + description: Build and test + artifact-subscriptions: [] +Deploy to Maven: + key: DTM + tasks: + - checkout: + force-clean-build: 'false' + description: Checkout default repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker pull ${bamboo.build.docker.image.id} + + docker run -v m2-repo:/root/.m2/repository -v ~/.m2/settings.xml:/.m2/settings.xml:ro -v ${PWD}:/module --rm -w="/module" ${bamboo.build.docker.image.id} bash -c 'mvn deploy -DskipTests --settings /.m2/settings.xml' + description: Deploy + artifact-subscriptions: [] +Release to Maven: + key: RTMVN + tasks: + - checkout: + repository: Git + path: release-scripts + force-clean-build: 'false' + description: Checkout Default Repository + - script: + interpreter: SHELL + scripts: + - |- + #!/bin/bash -eu + + set -x + + docker pull ${bamboo.build.docker.image.id} + + docker run \ + -v m2-repo:/root/.m2/repository \ + -v ~/.m2/settings.xml:/root/.m2/settings.xml:ro \ + -v ${PWD}:/module \ + -v ~/.ssh/github:/root/.ssh:ro \ + -e GIT_USER_NAME=$GIT_USER_NAME \ + -e GIT_USER_EMAIL=$GIT_USER_EMAIL \ + -e GIT_SSH_COMMAND='ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \ + --rm \ + -w='/module' \ + ${bamboo.build.docker.image.id} \ + bash -c ' + yum -y install git && + yum clean all && + git config --global user.email "$GIT_USER_EMAIL" && + git config --global user.name "$GIT_USER_NAME" && + git config --global --add safe.directory /module && + ./release-scripts/release-prepare-perform.sh \ + -r ${bamboo.maven.release.version} \ + -d ${bamboo.maven.development.version} \ + -e ${bamboo.planRepository.repositoryUrl} + ' + environment: GIT_USER_NAME=${bamboo.git.user.name} GIT_USER_EMAIL=${bamboo.git.user.email} + description: Release prepare perform + - any-task: + plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor + configuration: + variable: maven.release.version + removeSnapshot: 'true' + variableScope: PLAN + description: Save next release version + - any-task: + plugin-key: com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic:variable-extractor + configuration: + variable: maven.development.version + variableScope: JOB + description: Retrieve next snaphot version + artifact-subscriptions: [] +variables: + build.docker.image.id: maven:3.9.9-amazoncorretto-21 + maven.development.version: '' + maven.release.version: 1.29.0 + refapp.distro.property: reportingVersion +repositories: +- Git: + type: git + description: A Git Repository + url: https://github.com/openmrs/openmrs-module-reporting.git + branch: master + command-timeout-minutes: '180' + lfs: 'false' + verbose-logs: 'false' + use-shallow-clones: 'true' + cache-on-agents: 'false' + submodules: 'false' + ssh-key-applies-to-submodules: 'false' + fetch-all: 'false' +- Release scripts: + scope: global +triggers: +- polling: + period: '180' + repositories: + - Git +branches: + create: manually + delete: never + link-to-jira: true +notifications: +- events: + - job-failed + recipients: + - committers + - emails: + - dev-refapp@openmrs.org +labels: +- refapp +dependencies: + require-all-stages-passing: false + enabled-for-branches: true + block-strategy: block_if_parent_has_changes + plans: + - REFAPP-OMODDISTRO + - EMRAPI-EMRAPI + - REPREST-REPREST + - REPUI-REPUI +other: + concurrent-build-plugin: system-default +--- +version: 2 +plan: + key: REP-REP +plan-permissions: +- roles: + - anonymous + permissions: + - view +... From 13253ca0c3a716a031f6eba1ca31c9dbf021dc7f Mon Sep 17 00:00:00 2001 From: Ruhanga <41738040+Ruhanga@users.noreply.github.com> Date: Wed, 30 Jul 2025 18:51:41 +0300 Subject: [PATCH 136/143] REPORT-912: Updated Bamboo spec Development version --- bamboo-specs/bamboo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bamboo-specs/bamboo.yml b/bamboo-specs/bamboo.yml index 456c781481..d6503bc755 100644 --- a/bamboo-specs/bamboo.yml +++ b/bamboo-specs/bamboo.yml @@ -187,7 +187,7 @@ Release to Maven: artifact-subscriptions: [] variables: build.docker.image.id: maven:3.9.9-amazoncorretto-21 - maven.development.version: '' + maven.development.version: '2.0.0-SNAPSHOT' maven.release.version: 1.29.0 refapp.distro.property: reportingVersion repositories: From 3fc0d0313a256732ca86ef2fb3acf9745898eae1 Mon Sep 17 00:00:00 2001 From: Ruhanga <41738040+Ruhanga@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:51:16 +0300 Subject: [PATCH 137/143] Fixed Bamboo Specs release-scripts repository checkout. --- bamboo-specs/bamboo.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bamboo-specs/bamboo.yml b/bamboo-specs/bamboo.yml index d6503bc755..351bf4d3e9 100644 --- a/bamboo-specs/bamboo.yml +++ b/bamboo-specs/bamboo.yml @@ -133,10 +133,13 @@ Release to Maven: key: RTMVN tasks: - checkout: - repository: Git - path: release-scripts force-clean-build: 'false' description: Checkout Default Repository + - checkout: + repository: Release scripts + path: release-scripts + force-clean-build: 'false' + description: Checkout Release Scripts Repository - script: interpreter: SHELL scripts: From 90e0e7cdc1edf4db11e8190ca7ebf05701425e81 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 24 Sep 2025 13:05:57 -0400 Subject: [PATCH 138/143] REPORT-916 - Support loading custom renderers via config (#265) --- .../module/reporting/common/ContentType.java | 3 +- .../reporting/config/DesignDescriptor.java | 11 ++++++ .../module/reporting/config/ReportLoader.java | 34 +++++++++++++++++-- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java b/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java index d1d9b1b509..c6cde00a48 100644 --- a/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java +++ b/api/src/main/java/org/openmrs/module/reporting/common/ContentType.java @@ -19,7 +19,8 @@ public enum ContentType { XML("xml", "text/xml"), CSV("csv", "text/csv"), TEXT("text", "text/plain"), - ZIP("zip", "application/zip"); + ZIP("zip", "application/zip"), + PDF("pdf", "application/pdf"); //***** PROPERTIES ***** diff --git a/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java index a8568d2d42..3f2710356c 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/DesignDescriptor.java @@ -7,6 +7,9 @@ public class DesignDescriptor { + @JsonProperty + private String name; + @JsonProperty private String type; @@ -19,6 +22,14 @@ public class DesignDescriptor { @JsonProperty private List processors; + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getType() { return type; } diff --git a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java index d8fedb69ad..d7c55ac9a4 100644 --- a/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java +++ b/api/src/main/java/org/openmrs/module/reporting/config/ReportLoader.java @@ -16,6 +16,7 @@ import org.openmrs.api.db.SerializedObject; import org.openmrs.api.db.SerializedObjectDAO; import org.openmrs.module.reporting.common.ContentType; +import org.openmrs.module.reporting.common.ObjectUtil; import org.openmrs.module.reporting.config.factory.DataSetFactory; import org.openmrs.module.reporting.dataset.definition.DataSetDefinition; import org.openmrs.module.reporting.evaluation.parameter.Mapped; @@ -30,6 +31,7 @@ import org.openmrs.module.reporting.report.processor.LoggingReportProcessor; import org.openmrs.module.reporting.report.renderer.CsvReportRenderer; import org.openmrs.module.reporting.report.renderer.ReportDesignRenderer; +import org.openmrs.module.reporting.report.renderer.ReportRenderer; import org.openmrs.module.reporting.report.renderer.XlsReportRenderer; import org.openmrs.module.reporting.report.service.ReportService; import org.openmrs.util.OpenmrsUtil; @@ -250,7 +252,7 @@ public static List constructReportDesigns(ReportDefinition reportD } for (DesignDescriptor designDescriptor : reportDescriptor.getDesigns()) { - ReportDesign design = null; + ReportDesign design; if (designDescriptor.getType().equalsIgnoreCase("csv")) { design = constructCSVReportDesign(reportDefinition); } @@ -258,7 +260,33 @@ else if (designDescriptor.getType().equalsIgnoreCase("excel") || designDescripto design = constructXlsReportDesign(reportDefinition, reportDescriptor, designDescriptor); } else { - throw new RuntimeException("Unsupported report design type: " + designDescriptor.getType() + " for report " + reportDefinition.getName()); + try { + design = new ReportDesign(); + design.setName(designDescriptor.getName()); + design.setReportDefinition(reportDefinition); + design.setRendererType((Class)Context.loadClass(designDescriptor.getType())); + + if (StringUtils.isNotBlank(designDescriptor.getTemplate())) { + String template = designDescriptor.getTemplate(); + ReportDesignResource resource = new ReportDesignResource(); + resource.setName("template"); + for (ContentType contentType : ContentType.values()) { + if (template.toLowerCase().endsWith("." + contentType.getExtension())) { + resource.setExtension(contentType.getExtension()); + resource.setContentType(contentType.getContentType()); + } + } + File templateFile = new File(reportDescriptor.getPath(), template); + + byte[] templateBytes = FileUtils.readFileToByteArray(templateFile); + resource.setContents(templateBytes); + resource.setReportDesign(design); + design.addResource(resource); + } + } + catch (Exception e) { + throw new RuntimeException("Failed to load report design: " + designDescriptor.getType() + " for report " + reportDefinition.getName(), e); + } } if (designDescriptor.getProperties() != null) { @@ -325,7 +353,7 @@ public static ReportDesign constructCSVReportDesign(ReportDefinition reportDefin public static ReportDesign constructXlsReportDesign(ReportDefinition reportDefinition, ReportDescriptor reportDescriptor, DesignDescriptor designDescriptor) { ReportDesign design = new ReportDesign(); - design.setName("reporting.excel"); + design.setName(ObjectUtil.nvlStr(designDescriptor.getName(), "reporting.excel")); design.setReportDefinition(reportDefinition); design.setRendererType(XlsReportRenderer.class); From a2b72907b3e216d6f9303c58cf7b22bff3166f1a Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 2 Dec 2025 20:26:53 -0500 Subject: [PATCH 139/143] Upgrade dependencies to non-snapshot for release --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 81f5034620..e6ec9e4475 100644 --- a/pom.xml +++ b/pom.xml @@ -40,14 +40,14 @@ 2.7.0 2.7 - 2.0.0-SNAPSHOT - 0.2.17-SNAPSHOT + 2.0.1 + 0.3.0 1.2 2.1.1 3.12 - 2.12.5 - 1.1.2 - 1.7.0 + 2.12.5 + 1.1.2 + 1.7.0 UTF-8 ${project.parent.artifactId} Reporting From 0f40a305693490ee1a0f178e1ae1082bfb298321 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Tue, 2 Dec 2025 20:34:08 -0500 Subject: [PATCH 140/143] Update javadoc plugin configuration --- pom.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e6ec9e4475..b6173605da 100644 --- a/pom.xml +++ b/pom.xml @@ -327,6 +327,10 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + @@ -391,7 +395,18 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.11.2 + + -Xdoclint:none + + + + attach-javadocs + + jar + + + From 174a75460228e7e74336c2da8653e7ef923f046a Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Wed, 3 Dec 2025 02:13:01 +0000 Subject: [PATCH 141/143] [maven-release-plugin] prepare release 2.0.0 --- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 5eed86d7bd..f294f57ab7 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 2.0.0-SNAPSHOT + 2.0.0 reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index 10190d27ba..f87d2a90f0 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 2.0.0-SNAPSHOT + 2.0.0 reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index f3ac72d6fd..39d9ab7466 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 2.0.0-SNAPSHOT + 2.0.0 reporting-omod jar diff --git a/pom.xml b/pom.xml index b6173605da..047130f049 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 2.0.0-SNAPSHOT + 2.0.0 pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - HEAD + 2.0.0 From 85c84d5ab8889f72a501a15afb034e99d0090564 Mon Sep 17 00:00:00 2001 From: openmrs-bot Date: Wed, 3 Dec 2025 02:13:03 +0000 Subject: [PATCH 142/143] [maven-release-plugin] prepare for next development iteration --- api-tests/pom.xml | 2 +- api/pom.xml | 2 +- omod/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api-tests/pom.xml b/api-tests/pom.xml index f294f57ab7..35b34fe4d3 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 2.0.0 + 2.1.0-SNAPSHOT reporting-api-tests diff --git a/api/pom.xml b/api/pom.xml index f87d2a90f0..2a1dff9b0c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 2.0.0 + 2.1.0-SNAPSHOT reporting-api jar diff --git a/omod/pom.xml b/omod/pom.xml index 39d9ab7466..93e6b4f442 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -3,7 +3,7 @@ org.openmrs.module reporting - 2.0.0 + 2.1.0-SNAPSHOT reporting-omod jar diff --git a/pom.xml b/pom.xml index 047130f049..b0dfe6c8fd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.openmrs.module reporting - 2.0.0 + 2.1.0-SNAPSHOT pom Reporting Parent project for Reporting @@ -15,7 +15,7 @@ scm:git:git@github.com:openmrs/openmrs-module-reporting.git scm:git:git@github.com:openmrs/openmrs-module-reporting.git https://github.com/openmrs/openmrs-module-reporting/ - 2.0.0 + HEAD From 69202fbbb93b42bd6ac28a3cba81a04e4fe3b1d5 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Thu, 4 Dec 2025 02:12:42 +0300 Subject: [PATCH 143/143] Fix com.fasterxml.jackson.databind.ObjectReader LinkageError --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index b0dfe6c8fd..87c11845c0 100644 --- a/pom.xml +++ b/pom.xml @@ -238,11 +238,13 @@ com.fasterxml.jackson.core jackson-core 2.9.8 + provided com.fasterxml.jackson.core jackson-databind 2.9.10.8 + provided com.fasterxml.jackson.dataformat