@Deprecated public class PatientSearch extends Object implements CohortDefinition
Saved filters:
When isSavedFilterReference() returns true, then this represents something like "saved filter #8"
When isSavedCohortReference() returns true, then this represents something like "saved cohort #3"
Regular filters:
Otherwise this search describes a PatientFilter subclass and a list of bean-style properties to
set, so that it can be turned into a PatientFilter with the utility method
OpenmrsUtil.toPatientFilter(PatientSearch). But it can also be left as-is for better
version-compatibility if PatientFilter classes change, or to avoid issues with xml-encoding
hibernate proxies.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
Deprecated.
|
Constructor and Description |
---|
PatientSearch()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(SearchArgument sa)
Deprecated.
|
void |
addArgument(String name,
String value,
Class clz)
Deprecated.
|
void |
addParameter(Parameter parameter)
Deprecated.
Adds a SearchArgument as a Parameter where the SearchArgument name is set to the Parameter
label and SearchArgument value is set to the Parameter name and SearchArgument propertyClass
is set to the Parameter clazz
|
CohortHistoryCompositionFilter |
cloneCompositionAsFilter(CohortSearchHistory history)
Deprecated.
Deep-copies this.parsedComposition, and converts to filters, in the context of history
|
CohortHistoryCompositionFilter |
cloneCompositionAsFilter(CohortSearchHistory history,
EvaluationContext evalContext)
Deprecated.
Deep-copies this.parsedComposition, and converts to filters, in the context of history
|
PatientSearch |
copyAndDetachFromHistory(CohortSearchHistory history)
Deprecated.
Creates a copy of this PatientSearch that doesn't depend on history, replacing references
with actual PatientSearch elements from the provided history.
|
static PatientSearch |
createCompositionSearch(List<Object> tokens)
Deprecated.
|
static PatientSearch |
createCompositionSearch(Object[] tokens)
Deprecated.
|
static PatientSearch |
createCompositionSearch(String description)
Deprecated.
|
static PatientSearch |
createFilterSearch(Class filterClass)
Deprecated.
|
static PatientSearch |
createSavedCohortReference(int id)
Deprecated.
|
static PatientSearch |
createSavedFilterReference(int id)
Deprecated.
|
static PatientSearch |
createSavedSearchReference(int id)
Deprecated.
|
List<SearchArgument> |
getArguments()
Deprecated.
|
String |
getArgumentValue(String name)
Deprecated.
Looks up an argument value, accounting for parameterValues
|
String |
getCompositionString()
Deprecated.
|
Class |
getFilterClass()
Deprecated.
|
List<Parameter> |
getParameters()
Deprecated.
Returns all SearchArgument values that match
EvaluationContext.parameterValues |
List<Object> |
getParsedComposition()
Deprecated.
|
Integer |
getSavedCohortId()
Deprecated.
|
Integer |
getSavedFilterId()
Deprecated.
|
Integer |
getSavedSearchId()
Deprecated.
|
String |
getSpecificationString()
Deprecated.
|
boolean |
isComposition()
Deprecated.
|
boolean |
isSavedCohortReference()
Deprecated.
|
boolean |
isSavedFilterReference()
Deprecated.
|
boolean |
isSavedReference()
Deprecated.
|
boolean |
isSavedSearchReference()
Deprecated.
|
boolean |
removeFromHistoryNotify(int i)
Deprecated.
Call this to notify this composition search that the _i_th element of the search history has
been removed, and the search potentially needs to renumber its constituent parts.
|
boolean |
requiresHistory()
Deprecated.
|
void |
setArguments(List<SearchArgument> arguments)
Deprecated.
|
void |
setFilterClass(Class clazz)
Deprecated.
|
void |
setParameterValue(String name,
String value)
Deprecated.
|
void |
setParsedComposition(List<Object> parsedComposition)
Deprecated.
Elements in this list can be: an Integer, indicating a 1-based index into a search history a
BooleanOperator (AND, OR, NOT) a PatientFilter a PatientSearch another List of the same form,
which indicates a parenthetical expression
|
void |
setSavedCohortId(Integer savedCohortId)
Deprecated.
|
void |
setSavedFilterId(Integer savedFilterId)
Deprecated.
|
void |
setSavedSearchId(Integer savedSearchId)
Deprecated.
|
void |
setSpecificationString(String specification)
Deprecated.
Convenience method so that a PatientSearch object can be created from a string of
compositions
|
String |
toString()
Deprecated.
|
public static PatientSearch createSavedSearchReference(int id)
public static PatientSearch createSavedFilterReference(int id)
public static PatientSearch createSavedCohortReference(int id)
public static PatientSearch createCompositionSearch(String description)
public static PatientSearch createCompositionSearch(Object[] tokens)
public static PatientSearch createCompositionSearch(List<Object> tokens)
public static PatientSearch createFilterSearch(Class filterClass)
public boolean isComposition()
public String getCompositionString()
public void setSpecificationString(String specification)
specification
- public String getSpecificationString()
public boolean requiresHistory()
public PatientSearch copyAndDetachFromHistory(CohortSearchHistory history)
public CohortHistoryCompositionFilter cloneCompositionAsFilter(CohortSearchHistory history)
public CohortHistoryCompositionFilter cloneCompositionAsFilter(CohortSearchHistory history, EvaluationContext evalContext)
public boolean isSavedReference()
public boolean isSavedSearchReference()
public boolean isSavedFilterReference()
public boolean isSavedCohortReference()
public boolean removeFromHistoryNotify(int i)
public String getArgumentValue(String name)
name
- String
value for the specified argumentpublic List<SearchArgument> getArguments()
public void setArguments(List<SearchArgument> arguments)
public List<Parameter> getParameters()
EvaluationContext.parameterValues
getParameters
in interface Parameterizable
List<Parameter>
of all parameters in the argumentspublic Class getFilterClass()
public void setFilterClass(Class clazz)
public void addArgument(SearchArgument sa)
public void addParameter(Parameter parameter)
parameter
- public void setParsedComposition(List<Object> parsedComposition)
public Integer getSavedSearchId()
public void setSavedSearchId(Integer savedSearchId)
public Integer getSavedFilterId()
public void setSavedFilterId(Integer savedFilterId)
public Integer getSavedCohortId()
public void setSavedCohortId(Integer savedCohortId)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.