public class Cohort extends BaseOpenmrsData implements Serializable
ReportService.evaluate(org.openmrs.report.ReportSchema, Cohort, EvaluationContext)
then
it will contain a link back to the CohortDefinition it came from and the EvalutionContext that
definition was evaluated in.CohortDefinition
,
Serialized FormModifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
Cohort() |
Cohort(Collection patientsOrIds)
This constructor does not check whether the database contains patients with the given ids,
but
|
Cohort(Integer cohortId)
Convenience constructor to create a Cohort object that has an primarykey/internal identifier
of
cohortId |
Cohort(String commaSeparatedIds)
Convenience contructor taking in a string that is a list of comma separated patient ids This
constructor does not check whether the database contains patients with the given ids, but
|
Cohort(String name,
String description,
Collection patientsOrIds)
This constructor does not check whether the database contains patients with the given ids,
but
|
Cohort(String name,
String description,
Integer[] ids)
This constructor does not check whether the database contains patients with the given ids,
but
|
Cohort(String name,
String description,
Patient[] patients)
This constructor does not check whether the database contains patients with the given ids,
but
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
getUuid, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public Cohort()
public Cohort(Integer cohortId)
cohortId
cohortId
- the internal identifier for this cohortpublic Cohort(String name, String description, Integer[] ids)
name
- description
- optional descriptionids
- option array of Integer idswill.
public Cohort(String name, String description, Patient[] patients)
name
- description
- optional descriptionpatients
- optional array of patientswill.
public Cohort(Collection patientsOrIds)
patientsOrIds
- optional collection which may contain Patients, or patientIds which may
be Integers, Strings, or anything whose toString() can be parsed to an Integer.will.
public Cohort(String name, String description, Collection patientsOrIds)
name
- description
- optional descriptionpatientsOrIds
- optional collection which may contain Patients, or patientIds which may
be Integers, Strings, or anything whose toString() can be parsed to an Integer.will.
public Cohort(String commaSeparatedIds)
commaSeparatedIds
- will.
public String getCommaSeparatedPatientIds()
public boolean contains(Patient patient)
public boolean contains(Integer patientId)
public void addMember(Integer memberId)
public void removeMember(Integer memberId)
public int size()
public int getSize()
public boolean isEmpty()
public static Cohort union(Cohort a, Cohort b)
a
- The first Cohortb
- The second Cohortpublic static Cohort intersect(Cohort a, Cohort b)
a
- The first Cohortb
- The second Cohortpublic static Cohort subtract(Cohort a, Cohort b)
a
- the original Cohortb
- the Cohort to subtractpublic Integer getCohortId()
public void setCohortId(Integer cohortId)
public String getDescription()
public void setDescription(String description)
public String getName()
public void setName(String name)
public Set<Integer> getPatientIds()
@Deprecated public CohortDefinition getCohortDefinition()
@Deprecated public void setCohortDefinition(CohortDefinition cohortDefinition)
cohortDefinition
- the cohortDefinition to set@Deprecated public EvaluationContext getEvaluationContext()
@Deprecated public void setEvaluationContext(EvaluationContext evaluationContext)
evaluationContext
- the evaluationContext to setpublic Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.