|
| 1 | +/** |
| 2 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
| 3 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 4 | + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under |
| 5 | + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. |
| 6 | + * |
| 7 | + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS |
| 8 | + * graphic logo is a trademark of OpenMRS Inc. |
| 9 | + */ |
| 10 | +package org.openmrs.module.reporting.cohort.definition.library; |
| 11 | + |
| 12 | +import org.openmrs.Concept; |
| 13 | +import org.openmrs.CareSetting; |
| 14 | +import org.openmrs.Drug; |
| 15 | +import org.openmrs.module.reporting.common.Match; |
| 16 | +import org.openmrs.module.reporting.cohort.definition.CohortDefinition; |
| 17 | +import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition; |
| 18 | +import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary; |
| 19 | +import org.openmrs.module.reporting.definition.library.DocumentedDefinition; |
| 20 | +import org.openmrs.module.reporting.evaluation.parameter.Parameter; |
| 21 | +import org.springframework.stereotype.Component; |
| 22 | + |
| 23 | +import java.util.Date; |
| 24 | +import java.util.List; |
| 25 | + |
| 26 | +/** |
| 27 | + * Basic set of cohort definitions |
| 28 | + */ |
| 29 | +@Component |
| 30 | +public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary { |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + @DocumentedDefinition("drugOrderSearch") |
| 35 | + public CohortDefinition getDrugOrderSearch() { |
| 36 | + CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition(); |
| 37 | + drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class)); |
| 38 | + drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null)); |
| 39 | + drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null)); |
| 40 | + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class)); |
| 41 | + drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class)); |
| 42 | + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class)); |
| 43 | + drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class)); |
| 44 | + drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class)); |
| 45 | + drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class)); |
| 46 | + drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null)); |
| 47 | + return drugOrderCohortDefinition; |
| 48 | + } |
| 49 | +} |
0 commit comments