org.openmrs.api
Interface PatientSetService

All Known Implementing Classes:
PatientSetServiceImpl

@Transactional
public interface PatientSetService


Nested Class Summary
static class PatientSetService.BooleanOperator
           
static class PatientSetService.GroupMethod
           
static class PatientSetService.Modifier
           
static class PatientSetService.PatientLocationMethod
           
static class PatientSetService.TimeModifier
           
 
Method Summary
 Cohort convertPatientIdentifier(java.util.List<java.lang.String> identifiers)
          TODO write something here
 java.lang.String exportXml(Cohort ps)
          Export a set of patients to an XML
 java.lang.String exportXml(java.lang.Integer patientId)
           
 Cohort getAllPatients()
           
 java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>> getCharacteristics(Cohort patients)
          TODO write something here
 java.util.Map<java.lang.Integer,java.util.List<DrugOrder>> getCurrentDrugOrders(Cohort ps, Concept drugSet)
           
 java.util.Map<java.lang.Integer,PatientProgram> getCurrentPatientPrograms(Cohort ps, Program program)
           
 java.util.Map<java.lang.Integer,PatientState> getCurrentStates(Cohort ps, ProgramWorkflow wf)
           
 java.util.Map<java.lang.Integer,java.util.List<DrugOrder>> getDrugOrders(Cohort ps, Concept drugSet)
           
 java.util.Map<java.lang.Integer,java.lang.Object> getEncounterAttrsByType(Cohort patients, java.util.List<EncounterType> encTypes, java.lang.String attr)
          TODO write something here
 java.util.Map<java.lang.Integer,Encounter> getEncounters(Cohort patients)
          TODO write something here
 java.util.List<Encounter> getEncountersByForm(Cohort patients, java.util.List<Form> form)
          Gets a list of encounters associated with the given form, filtered by the given patient set.
 java.util.Map<java.lang.Integer,Encounter> getEncountersByType(Cohort patients, EncounterType encType)
          TODO write something here
 java.util.Map<java.lang.Integer,Encounter> getEncountersByType(Cohort patients, java.util.List<EncounterType> encType)
          TODO write something here
 java.util.Map<java.lang.Integer,java.lang.Object> getFirstEncounterAttrsByType(Cohort patients, java.util.List<EncounterType> encTypes, java.lang.String attr)
          TODO write something here
 java.util.Map<java.lang.Integer,Encounter> getFirstEncountersByType(Cohort patients, EncounterType encType)
          TODO write something here
 java.util.Map<java.lang.Integer,Encounter> getFirstEncountersByType(Cohort patients, java.util.List<EncounterType> types)
          TODO write something here
 java.util.Map<java.lang.Integer,java.util.List<Obs>> getObservations(Cohort patients, Concept concept)
           
 java.util.Map<java.lang.Integer,java.util.List<Obs>> getObservations(Cohort patients, Concept concept, java.util.Date fromDate, java.util.Date toDate)
          Date range is inclusive of both endpoints
 java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> getObservationsValues(Cohort patients, Concept c)
          TODO write something here
 java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> getObservationsValues(Cohort patients, Concept c, java.util.List<java.lang.String> attributes)
          Returns a mapping from patient id to obs for concept c
 java.util.Map<java.lang.Integer,java.lang.Object> getPatientAttributes(Cohort patients, java.lang.String classNameDotProperty, boolean returnAll)
          TODO write something here
 java.util.Map<java.lang.Integer,java.lang.Object> getPatientAttributes(Cohort patients, java.lang.String className, java.lang.String property, boolean returnAll)
          TODO write something here
 java.util.Map<java.lang.Integer,PatientIdentifier> getPatientIdentifiersByType(Cohort patients, PatientIdentifierType type)
          Gets a map of patient identifiers by identifier type, indexed by patient primary key.
 java.util.Map<java.lang.Integer,PatientProgram> getPatientPrograms(Cohort ps, Program program)
           
 java.util.List<Patient> getPatients(java.util.Collection<java.lang.Integer> patientIds)
          TODO write something here
 Cohort getPatientsByCharacteristics(java.lang.String gender, java.util.Date minBirthdate, java.util.Date maxBirthdate)
           
 Cohort getPatientsByCharacteristics(java.lang.String gender, java.util.Date minBirthdate, java.util.Date maxBirthdate, java.lang.Integer minAge, java.lang.Integer maxAge, java.lang.Boolean aliveOnly, java.lang.Boolean deadOnly)
          Get patients by specified gender, birthdate range, age range, and alive status (all optional)
 Cohort getPatientsByCharacteristics(java.lang.String gender, java.util.Date minBirthdate, java.util.Date maxBirthdate, java.lang.Integer minAge, java.lang.Integer maxAge, java.lang.Boolean aliveOnly, java.lang.Boolean deadOnly, java.util.Date effectiveDate)
          Get patients by specified gender, birthdate range, age range, and alive status (all optional)
 Cohort getPatientsByProgramAndState(Program program, java.util.List<ProgramWorkflowState> stateList, java.util.Date fromDate, java.util.Date toDate)
          Gets patients who are enrolled in the given program or in the given state(s) at the specified time
 Cohort getPatientsHavingDateObs(java.lang.Integer conceptId, java.util.Date startTime, java.util.Date endTime)
           
 Cohort getPatientsHavingDrugOrder(java.util.Collection<java.lang.Integer> patientIds, java.util.Collection<java.lang.Integer> takingIds, java.util.Date onDate)
          Returns a Cohort of patient who had drug orders for a set of drugs active on a certain date.
 Cohort getPatientsHavingDrugOrder(java.util.Collection<java.lang.Integer> patientIds, java.util.Collection<java.lang.Integer> drugIds, PatientSetService.GroupMethod groupMethod, java.util.Date fromDate, java.util.Date toDate)
          Returns a Cohort of patient who had drug orders for a set of drugs active between a pair of dates.
 Cohort getPatientsHavingDrugOrder(java.util.List<Drug> drug, java.util.List<Concept> drugConcept, java.util.Date startDateFrom, java.util.Date startDateTo, java.util.Date stopDateFrom, java.util.Date stopDateTo, java.lang.Boolean discontinued, java.util.List<Concept> discontinuedReason)
           
 Cohort getPatientsHavingEncounters(EncounterType encounterType, Location location, Form form, java.util.Date fromDate, java.util.Date toDate, java.lang.Integer minCount, java.lang.Integer maxCount)
          Searches for patients who have encounters as described by the arguments to this method
 Cohort getPatientsHavingEncounters(java.util.List<EncounterType> encounterTypeList, Location location, Form form, java.util.Date fromDate, java.util.Date toDate, java.lang.Integer minCount, java.lang.Integer maxCount)
          Gets patients who have encounters as described by the parameters specified (all optional)
 Cohort getPatientsHavingLocation(java.lang.Integer locationId)
           
 Cohort getPatientsHavingLocation(java.lang.Integer locationId, PatientSetService.PatientLocationMethod method)
           
 Cohort getPatientsHavingLocation(Location loc)
           
 Cohort getPatientsHavingLocation(Location loc, PatientSetService.PatientLocationMethod method)
           
 Cohort getPatientsHavingNumericObs(java.lang.Integer conceptId, PatientSetService.TimeModifier timeModifier, PatientSetService.Modifier modifier, java.lang.Number value, java.util.Date fromDate, java.util.Date toDate)
           
 Cohort getPatientsHavingObs(java.lang.Integer conceptId, PatientSetService.TimeModifier timeModifier, PatientSetService.Modifier modifier, java.lang.Object value, java.util.Date fromDate, java.util.Date toDate)
          Searches for patients who have observations as described by the arguments to this method
 Cohort getPatientsHavingPersonAttribute(PersonAttributeType attribute, java.lang.String value)
          At least one of attribute and value must be non-null
 Cohort getPatientsHavingTextObs(Concept concept, java.lang.String value, PatientSetService.TimeModifier timeModifier)
           
 Cohort getPatientsHavingTextObs(java.lang.Integer conceptId, java.lang.String value, PatientSetService.TimeModifier timeModifier)
           
 Cohort getPatientsInProgram(Program program, java.util.Date fromDate, java.util.Date toDate)
           
 java.util.Map<java.lang.Integer,java.lang.Object> getPersonAttributes(Cohort patients, java.lang.String attributeName, java.lang.String joinClass, java.lang.String joinProperty, java.lang.String outputColumn, boolean returnAll)
           
 java.util.Map<java.lang.Integer,java.util.List<Relationship>> getRelationships(Cohort ps, RelationshipType relType)
           
 java.util.Map<java.lang.Integer,java.util.List<Person>> getRelatives(Cohort ps, RelationshipType relType, boolean forwards)
           
 java.util.Map<java.lang.Integer,java.lang.String> getShortPatientDescriptions(java.util.Collection<java.lang.Integer> patientIds)
           
 void setPatientSetDAO(PatientSetDAO dao)
           
 

Method Detail

setPatientSetDAO

void setPatientSetDAO(PatientSetDAO dao)

exportXml

@Transactional(readOnly=true)
java.lang.String exportXml(Cohort ps)
Export a set of patients to an XML

Parameters:
ps - The set you want to export as XML
Returns:
an XML representation of this patient-set, including patient characteristics, and observations

exportXml

@Transactional(readOnly=true)
java.lang.String exportXml(java.lang.Integer patientId)

getAllPatients

@Transactional(readOnly=true)
Cohort getAllPatients()
                      throws DAOException
Throws:
DAOException

getPatientsByCharacteristics

@Transactional(readOnly=true)
Cohort getPatientsByCharacteristics(java.lang.String gender,
                                                  java.util.Date minBirthdate,
                                                  java.util.Date maxBirthdate)
                                    throws DAOException
Throws:
DAOException

getPatientsByCharacteristics

@Transactional(readOnly=true)
Cohort getPatientsByCharacteristics(java.lang.String gender,
                                                  java.util.Date minBirthdate,
                                                  java.util.Date maxBirthdate,
                                                  java.lang.Integer minAge,
                                                  java.lang.Integer maxAge,
                                                  java.lang.Boolean aliveOnly,
                                                  java.lang.Boolean deadOnly)
                                    throws DAOException
Get patients by specified gender, birthdate range, age range, and alive status (all optional)

Parameters:
gender -
minBirthdate -
maxBirthdate -
minAge -
maxAge -
aliveOnly -
deadOnly -
Returns:
Cohort with all matching patients
Throws:
DAOException
Expected behavior:
get all patients when no parameters given, get patients of given gender, get patients born before date, get patients born after date, get patients born between dates, get patients who are alive, get patients who are dead

getPatientsByCharacteristics

@Transactional(readOnly=true)
Cohort getPatientsByCharacteristics(java.lang.String gender,
                                                  java.util.Date minBirthdate,
                                                  java.util.Date maxBirthdate,
                                                  java.lang.Integer minAge,
                                                  java.lang.Integer maxAge,
                                                  java.lang.Boolean aliveOnly,
                                                  java.lang.Boolean deadOnly,
                                                  java.util.Date effectiveDate)
                                    throws DAOException
Get patients by specified gender, birthdate range, age range, and alive status (all optional)

Parameters:
gender -
minBirthdate -
maxBirthdate -
minAge -
maxAge -
aliveOnly -
deadOnly -
effectiveDate -
Returns:
Cohort with all matching patients
Throws:
DAOException
Expected behavior:
get all patients when no parameters given, get patients of given gender, get patients born before date, get patients born after date, get patients born between dates, get patients who are alive, get patients who are dead, not get patients born after effectiveDate

getPatientsHavingNumericObs

@Transactional(readOnly=true)
Cohort getPatientsHavingNumericObs(java.lang.Integer conceptId,
                                                 PatientSetService.TimeModifier timeModifier,
                                                 PatientSetService.Modifier modifier,
                                                 java.lang.Number value,
                                                 java.util.Date fromDate,
                                                 java.util.Date toDate)

getPatientsHavingObs

@Transactional(readOnly=true)
Cohort getPatientsHavingObs(java.lang.Integer conceptId,
                                          PatientSetService.TimeModifier timeModifier,
                                          PatientSetService.Modifier modifier,
                                          java.lang.Object value,
                                          java.util.Date fromDate,
                                          java.util.Date toDate)
Searches for patients who have observations as described by the arguments to this method

Parameters:
conceptId -
timeModifier -
modifier -
value -
fromDate -
toDate -
Returns:
all patients with observations matching the arguments to this method
Expected behavior:
get patients by concept and true boolean value, get patients by concept and false boolean value

getPatientsHavingEncounters

@Transactional(readOnly=true)
Cohort getPatientsHavingEncounters(EncounterType encounterType,
                                                 Location location,
                                                 Form form,
                                                 java.util.Date fromDate,
                                                 java.util.Date toDate,
                                                 java.lang.Integer minCount,
                                                 java.lang.Integer maxCount)
Searches for patients who have encounters as described by the arguments to this method

Parameters:
encounterType -
location -
form -
fromDate -
toDate -
minCount -
maxCount -
Returns:
all patients with encounters matching the arguments to this method
Expected behavior:
get all patients with encounters when no parameters specified

getPatientsHavingEncounters

@Transactional(readOnly=true)
Cohort getPatientsHavingEncounters(java.util.List<EncounterType> encounterTypeList,
                                                 Location location,
                                                 Form form,
                                                 java.util.Date fromDate,
                                                 java.util.Date toDate,
                                                 java.lang.Integer minCount,
                                                 java.lang.Integer maxCount)
Gets patients who have encounters as described by the parameters specified (all optional)

Parameters:
encounterTypeList -
location -
form -
fromDate -
toDate -
minCount -
maxCount -
Returns:
Cohort with matching Patients
Expected behavior:
get all patients with encounters when no parameters specified, get patients with encounters of type, get patients with encounters of multiple types, get patients with encounters at location, get patients with encounters from form, get patients with encounters before date, get patients with encounters after date, get patients with encounters between dates, get patients with at least n encounters, get patients with at most n encounters, get all patients with encounters when passed an empty encounterTypeList

getPatientsByProgramAndState

@Transactional(readOnly=true)
Cohort getPatientsByProgramAndState(Program program,
                                                  java.util.List<ProgramWorkflowState> stateList,
                                                  java.util.Date fromDate,
                                                  java.util.Date toDate)
Gets patients who are enrolled in the given program or in the given state(s) at the specified time

Parameters:
program -
stateList -
fromDate -
toDate -
Returns:
Cohort with matching Patients
Expected behavior:
get all patients in any program given null parameters, get patients in program, get patients in program from date, get patients in program to date, get patients in program between dates, get patients in state, get patients in states, get patients in state from date, get patients in state to date, get patients in state between dates

getPatientsInProgram

@Transactional(readOnly=true)
Cohort getPatientsInProgram(Program program,
                                          java.util.Date fromDate,
                                          java.util.Date toDate)

getPatientsHavingDateObs

@Transactional(readOnly=true)
Cohort getPatientsHavingDateObs(java.lang.Integer conceptId,
                                              java.util.Date startTime,
                                              java.util.Date endTime)

getPatientsHavingTextObs

@Transactional(readOnly=true)
Cohort getPatientsHavingTextObs(Concept concept,
                                              java.lang.String value,
                                              PatientSetService.TimeModifier timeModifier)

getPatientsHavingTextObs

@Transactional(readOnly=true)
Cohort getPatientsHavingTextObs(java.lang.Integer conceptId,
                                              java.lang.String value,
                                              PatientSetService.TimeModifier timeModifier)

getPatientsHavingLocation

@Transactional(readOnly=true)
Cohort getPatientsHavingLocation(Location loc)

getPatientsHavingLocation

@Transactional(readOnly=true)
Cohort getPatientsHavingLocation(Location loc,
                                               PatientSetService.PatientLocationMethod method)

getPatientsHavingLocation

@Transactional(readOnly=true)
Cohort getPatientsHavingLocation(java.lang.Integer locationId)

getPatientsHavingLocation

@Transactional(readOnly=true)
Cohort getPatientsHavingLocation(java.lang.Integer locationId,
                                               PatientSetService.PatientLocationMethod method)

getPatientsHavingDrugOrder

@Transactional(readOnly=true)
Cohort getPatientsHavingDrugOrder(java.util.Collection<java.lang.Integer> patientIds,
                                                java.util.Collection<java.lang.Integer> takingIds,
                                                java.util.Date onDate)
Returns a Cohort of patient who had drug orders for a set of drugs active on a certain date. Can also be used to find patient with no drug orders on that date.

Parameters:
patientIds - Collection of patientIds you're interested in. NULL means all patients.
takingIds - Collection of drugIds the patient is taking. (Or the empty set to mean "any drug" or NULL to mean "no drugs")
onDate - Which date to look at the patients' drug orders. (NULL defaults to now().)

getPatientsHavingDrugOrder

@Transactional(readOnly=true)
Cohort getPatientsHavingDrugOrder(java.util.Collection<java.lang.Integer> patientIds,
                                                java.util.Collection<java.lang.Integer> drugIds,
                                                PatientSetService.GroupMethod groupMethod,
                                                java.util.Date fromDate,
                                                java.util.Date toDate)
Returns a Cohort of patient who had drug orders for a set of drugs active between a pair of dates. Can also be used to find patient with no drug orders on that date.

Parameters:
patientIds - Collection of patientIds you're interested in. NULL means all patients.
drugIds - Collection of drugIds the patient is taking. (Or the empty set to mean "any drug" or NULL to mean "no drugs")
groupMethod - whether to do NONE, ALL, or ANY of the list of specified ids.
fromDate - Beginning of date range to look at (NULL defaults to toDate if that isn't null, or now() if it is.)
toDate - End of date range to look at (NULL defaults to fromDate if that isn't null, or now() if it is.)
Returns:
Cohort with matching Patients
Expected behavior:
get all patients with drug orders given null parameters, get patients with no drug orders, get patients with drug orders for drugs, get patients with no drug orders for drugs, get patients with drug orders from date, get patients with drug orders to date, get patients with drug order for drug between dates

getPatientsHavingDrugOrder

@Transactional(readOnly=true)
Cohort getPatientsHavingDrugOrder(java.util.List<Drug> drug,
                                                java.util.List<Concept> drugConcept,
                                                java.util.Date startDateFrom,
                                                java.util.Date startDateTo,
                                                java.util.Date stopDateFrom,
                                                java.util.Date stopDateTo,
                                                java.lang.Boolean discontinued,
                                                java.util.List<Concept> discontinuedReason)
Returns:
A Cohort of patients who had drug order for particular drugs or generics, with start dates within a range, with end dates within a range, and a reason for discontinuation.

getPatientsHavingPersonAttribute

@Transactional(readOnly=true)
Cohort getPatientsHavingPersonAttribute(PersonAttributeType attribute,
                                                      java.lang.String value)
At least one of attribute and value must be non-null

Parameters:
attribute - if not null, look for this attribute
value - if not null, look for this value
Returns:
Cohort of patients who have a person attribute (optionally) with attributeType of attribute and (optionally) value of value.

getShortPatientDescriptions

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.lang.String> getShortPatientDescriptions(java.util.Collection<java.lang.Integer> patientIds)

getObservations

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<Obs>> getObservations(Cohort patients,
                                                                                   Concept concept)

getObservations

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<Obs>> getObservations(Cohort patients,
                                                                                   Concept concept,
                                                                                   java.util.Date fromDate,
                                                                                   java.util.Date toDate)
Date range is inclusive of both endpoints


getObservationsValues

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> getObservationsValues(Cohort patients,
                                                                                                                      Concept c)
TODO write something here

Parameters:
patients -
c -
Returns:
Map>

getObservationsValues

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<java.util.List<java.lang.Object>>> getObservationsValues(Cohort patients,
                                                                                                                      Concept c,
                                                                                                                      java.util.List<java.lang.String> attributes)
Returns a mapping from patient id to obs for concept c

The returned List< attribute value > is [obs value, attr value, attr value, attr value...] The returned List> represents the obs rows

Parameters:
patients -
c -
attributes - list of attributes
Returns:
Map>>

getEncountersByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,Encounter> getEncountersByType(Cohort patients,
                                                                             EncounterType encType)
TODO write something here

Parameters:
patients - Cohort of patients to search
encType - the type of the encounter
Returns:
Map of patientId to encounters matching a specific type

getEncounterAttrsByType

java.util.Map<java.lang.Integer,java.lang.Object> getEncounterAttrsByType(Cohort patients,
                                                                          java.util.List<EncounterType> encTypes,
                                                                          java.lang.String attr)
TODO write something here

Parameters:
patients - Cohort of patients to search
encTypes - List to include in the search
attr - String of attributes to get
Returns:
Map of encounter attributes

getEncountersByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,Encounter> getEncountersByType(Cohort patients,
                                                                             java.util.List<EncounterType> encType)
TODO write something here

Parameters:
patients - Cohort of patients to search
encType - List to include in the search
Returns:
Map of patientId to encounters matching a specific type

getEncounters

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,Encounter> getEncounters(Cohort patients)
TODO write something here

Parameters:
patients - Cohort of patients to search
Returns:
Map of all encounters for specified patients.

getFirstEncountersByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,Encounter> getFirstEncountersByType(Cohort patients,
                                                                                  EncounterType encType)
TODO write something here

Parameters:
patients - Cohort of patients to search
encType -
Returns:
Map of patientId to first encounters of specified patients, from a specific type

getFirstEncountersByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,Encounter> getFirstEncountersByType(Cohort patients,
                                                                                  java.util.List<EncounterType> types)
TODO write something here

Parameters:
patients - Cohort of patients to search
types - List to include in the search
Returns:
Map of patientId to first encounters of specified patients, from a specific list of types

getFirstEncounterAttrsByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.lang.Object> getFirstEncounterAttrsByType(Cohort patients,
                                                                                             java.util.List<EncounterType> encTypes,
                                                                                             java.lang.String attr)
TODO write something here

Parameters:
patients - Cohort of patients to search
encTypes - List to include in the search
attr -
Returns:
Map of patientId to first encounters properties

getPatientAttributes

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.lang.Object> getPatientAttributes(Cohort patients,
                                                                                     java.lang.String className,
                                                                                     java.lang.String property,
                                                                                     boolean returnAll)
TODO write something here

Parameters:
patients - Cohort of patients to search
className -
property -
returnAll -
Returns:
Map of patientId to patient properties

getPatientAttributes

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.lang.Object> getPatientAttributes(Cohort patients,
                                                                                     java.lang.String classNameDotProperty,
                                                                                     boolean returnAll)
TODO write something here

Parameters:
patients -
classNameDotProperty -
returnAll -
Returns:
Map of patientId to patient properties

getPersonAttributes

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.lang.Object> getPersonAttributes(Cohort patients,
                                                                                    java.lang.String attributeName,
                                                                                    java.lang.String joinClass,
                                                                                    java.lang.String joinProperty,
                                                                                    java.lang.String outputColumn,
                                                                                    boolean returnAll)
Parameters:
patients -
attributeName -
joinClass -
joinProperty -
outputColumn -
returnAll -
Returns:
Map of patientId to person properties
Expected behavior:
return person attributes of type Location

getCharacteristics

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>> getCharacteristics(Cohort patients)
TODO write something here

Parameters:
patients - Cohort of patients to look up
Returns:
Map> with characteristics of specified patients

getPatientIdentifiersByType

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,PatientIdentifier> getPatientIdentifiersByType(Cohort patients,
                                                                                             PatientIdentifierType type)
Gets a map of patient identifiers by identifier type, indexed by patient primary key.

Parameters:
patients - Cohort of patients to look up
type - PatientIdentifierType to retrieve
Returns:
Map of patient identifiers and PatientIdentifierTypes, for all patients in the specified cohort

convertPatientIdentifier

@Transactional(readOnly=true)
Cohort convertPatientIdentifier(java.util.List<java.lang.String> identifiers)
TODO write something here

Parameters:
identifiers - List of String patient identifiers
Returns:
Cohort of patients matching specified identifiers

getPatients

@Transactional(readOnly=true)
java.util.List<Patient> getPatients(java.util.Collection<java.lang.Integer> patientIds)
TODO write something here

Parameters:
patientIds -
Returns:
List of matching patients

getCurrentStates

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,PatientState> getCurrentStates(Cohort ps,
                                                                             ProgramWorkflow wf)

getCurrentPatientPrograms

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,PatientProgram> getCurrentPatientPrograms(Cohort ps,
                                                                                        Program program)

getPatientPrograms

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,PatientProgram> getPatientPrograms(Cohort ps,
                                                                                 Program program)

getRelationships

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<Relationship>> getRelationships(Cohort ps,
                                                                                             RelationshipType relType)

getRelatives

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<Person>> getRelatives(Cohort ps,
                                                                                   RelationshipType relType,
                                                                                   boolean forwards)

getCurrentDrugOrders

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<DrugOrder>> getCurrentDrugOrders(Cohort ps,
                                                                                              Concept drugSet)
Returns:
all active drug orders whose drug concept is in the given set (or all drugs if that's null)

getDrugOrders

@Transactional(readOnly=true)
java.util.Map<java.lang.Integer,java.util.List<DrugOrder>> getDrugOrders(Cohort ps,
                                                                                       Concept drugSet)
Returns:
all active or finished drug orders whose drug concept is in the given set (or all drugs if that's null)
Expected behavior:
return an empty list if cohort is empty

getEncountersByForm

@Transactional(readOnly=true)
java.util.List<Encounter> getEncountersByForm(Cohort patients,
                                                            java.util.List<Form> form)
Gets a list of encounters associated with the given form, filtered by the given patient set.

Parameters:
patients - Cohort of the patients to filter by (null will return all encounters for all patients)
form - List
of the forms to filter by

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change