Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
DWRPersonService() |
Modifier and Type | Method and Description |
---|---|
Object |
createPerson(String given,
String middle,
String family,
String birthdate,
String dateformat,
String age,
String gender)
Creates a new person stub.
|
Vector<Object> |
findBatchOfPeopleByRoles(String searchPhrase,
boolean includeRetired,
String roles,
Integer start,
Integer length)
Find Person objects based on the given searchPhrase
|
Map<String,Object> |
findCountAndPeople(String phrase,
boolean includeRetired,
String roles,
Integer start,
Integer length,
boolean getMatchCount)
Returns a map of results with the values as count of matches and a partial list of the
matching people (depending on values of start and length parameters) while the keys are are
'count' and 'objectList' respectively, if the length parameter is not specified, then all
matches will be returned from the start index if specified.
|
List<?> |
findPeople(String searchPhrase,
boolean includeVoided) |
List<Object> |
findPeopleByRoles(String searchPhrase,
boolean includeVoided,
String roles)
Find Person objects based on the given searchPhrase
|
PersonListItem |
getPerson(Integer personId) |
List<?> |
getSimilarPeople(String name,
String birthdate,
String age,
String gender)
Searches for Person records that have a name similar to the given name, a birthdate that is
null or within a few years of the given birthdate, and a gender that matches.
|
public List<?> getSimilarPeople(String name, String birthdate, String age, String gender)
name
- birthdate
- age
- gender
- public List<?> findPeople(String searchPhrase, boolean includeVoided)
searchPhrase
- includeVoided
- public List<Object> findPeopleByRoles(String searchPhrase, boolean includeVoided, String roles)
searchPhrase
- partial name or partial identifierincludeVoided
- true/false whether to include the voided objectsroles
- if not null, restricts search to only users and only users with these rolespublic Object createPerson(String given, String middle, String family, String birthdate, String dateformat, String age, String gender)
given
- middle
- family
- birthdate
- dateformat
- age
- gender
- public PersonListItem getPerson(Integer personId)
personId
- public Vector<Object> findBatchOfPeopleByRoles(String searchPhrase, boolean includeRetired, String roles, Integer start, Integer length)
searchPhrase
- partial name or partial identifierincludeRetired
- true/false whether to include the voided objectsroles
- if not null, restricts search to only users and only users with these rolesstart
- the beginning index (this is only used for user search i.e of roles are
specified)length
- the number of matching people to return (this is only used for user search i.e
of roles are specified)public Map<String,Object> findCountAndPeople(String phrase, boolean includeRetired, String roles, Integer start, Integer length, boolean getMatchCount) throws APIException
phrase
- is the string used to search for peopleincludeRetired
- Specifies if retired people should be included or notroles
- If not null, restricts search to only users and only users with these rolesstart
- the beginning indexlength
- the number of matching encounters to returngetMatchCount
- Specifies if the count of matches should be included in the returned mapAPIException
Copyright © 2015 OpenMRS Inc.. All rights reserved.