@Deprecated public class PatientSearch extends java.lang.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(java.lang.String name,
java.lang.String value,
java.lang.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(java.util.List<java.lang.Object> tokens)
Deprecated.
|
static PatientSearch |
createCompositionSearch(java.lang.Object[] tokens)
Deprecated.
|
static PatientSearch |
createCompositionSearch(java.lang.String description)
Deprecated.
|
static PatientSearch |
createFilterSearch(java.lang.Class filterClass)
Deprecated.
|
static PatientSearch |
createSavedCohortReference(int id)
Deprecated.
|
static PatientSearch |
createSavedFilterReference(int id)
Deprecated.
|
static PatientSearch |
createSavedSearchReference(int id)
Deprecated.
|
java.util.List<SearchArgument> |
getArguments()
Deprecated.
|
java.lang.String |
getArgumentValue(java.lang.String name)
Deprecated.
Looks up an argument value, accounting for parameterValues
|
java.lang.String |
getCompositionString()
Deprecated.
|
java.lang.Class |
getFilterClass()
Deprecated.
|
java.util.List<Parameter> |
getParameters()
Deprecated.
Returns all SearchArgument values that match
EvaluationContext.parameterValues |
java.util.List<java.lang.Object> |
getParsedComposition()
Deprecated.
|
java.lang.Integer |
getSavedCohortId()
Deprecated.
|
java.lang.Integer |
getSavedFilterId()
Deprecated.
|
java.lang.Integer |
getSavedSearchId()
Deprecated.
|
java.lang.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(java.util.List<SearchArgument> arguments)
Deprecated.
|
void |
setFilterClass(java.lang.Class clazz)
Deprecated.
|
void |
setParameterValue(java.lang.String name,
java.lang.String value)
Deprecated.
|
void |
setParsedComposition(java.util.List<java.lang.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(java.lang.Integer savedCohortId)
Deprecated.
|
void |
setSavedFilterId(java.lang.Integer savedFilterId)
Deprecated.
|
void |
setSavedSearchId(java.lang.Integer savedSearchId)
Deprecated.
|
void |
setSpecificationString(java.lang.String specification)
Deprecated.
Convenience method so that a PatientSearch object can be created from a string of
compositions
|
java.lang.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(java.lang.String description)
public static PatientSearch createCompositionSearch(java.lang.Object[] tokens)
public static PatientSearch createCompositionSearch(java.util.List<java.lang.Object> tokens)
public static PatientSearch createFilterSearch(java.lang.Class filterClass)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isComposition()
public java.lang.String getCompositionString()
public void setSpecificationString(java.lang.String specification)
specification
- public java.lang.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 java.lang.String getArgumentValue(java.lang.String name)
name
- String
value for the specified argumentpublic java.util.List<SearchArgument> getArguments()
public void setArguments(java.util.List<SearchArgument> arguments)
public java.util.List<Parameter> getParameters()
EvaluationContext.parameterValues
getParameters
in interface Parameterizable
List<Parameter>
of all parameters in the argumentspublic java.lang.Class getFilterClass()
public void setFilterClass(java.lang.Class clazz)
public void addArgument(java.lang.String name, java.lang.String value, java.lang.Class clz)
public void addArgument(SearchArgument sa)
public void addParameter(Parameter parameter)
parameter
- public java.util.List<java.lang.Object> getParsedComposition()
public void setParsedComposition(java.util.List<java.lang.Object> parsedComposition)
public java.lang.Integer getSavedSearchId()
public void setSavedSearchId(java.lang.Integer savedSearchId)
public java.lang.Integer getSavedFilterId()
public void setSavedFilterId(java.lang.Integer savedFilterId)
public java.lang.Integer getSavedCohortId()
public void setSavedCohortId(java.lang.Integer savedCohortId)
public void setParameterValue(java.lang.String name, java.lang.String value)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.