|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.impl.BaseOpenmrsService org.openmrs.api.impl.PersonServiceImpl
public class PersonServiceImpl
Default implementation of the PersonService
Which implementation to use is determined by Spring. See the spring application context file in /metadata/api/spring/applicatContext-service.xml
PersonService
,
Context
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openmrs.api.PersonService |
---|
PersonService.ATTR_VIEW_TYPE |
Constructor Summary | |
---|---|
PersonServiceImpl()
|
Method Summary | |
---|---|
Person |
createPerson(Person person)
Deprecated. use savePerson(Person) |
void |
createPersonAttributeType(PersonAttributeType type)
Deprecated. use savePersonAttributeType(PersonAttributeType) |
void |
createRelationship(Relationship relationship)
Deprecated. use saveRelationship(Relationship) |
void |
createRelationshipType(RelationshipType relationshipType)
Deprecated. use saveRelationshipType(RelationshipType) |
void |
deletePerson(Person person)
Deprecated. use purgePerson(Person) |
void |
deletePersonAttributeType(java.lang.Integer attrTypeId)
Deprecated. use purgePersonAttributeType(PersonAttributeType) |
void |
deletePersonAttributeType(PersonAttributeType type)
Deprecated. use purgePersonAttributeType(PersonAttributeType) |
void |
deleteRelationship(Relationship relationship)
Deprecated. use purgeRelationship(Relationship) |
void |
deleteRelationshipType(RelationshipType relationshipType)
Deprecated. use purgeRelationshipType(RelationshipType) |
java.util.Set<Person> |
findPeople(java.lang.String searchPhrase,
boolean includeVoided)
Deprecated. use getPeople(String, Boolean) |
java.util.Set<Person> |
findPeople(java.lang.String searchPhrase,
boolean includeVoided,
java.util.List<java.lang.String> roles)
Deprecated. use getPeople(String, Boolean) |
java.util.Set<Person> |
findPeople(java.lang.String searchPhrase,
boolean includeVoided,
java.lang.String roles)
Deprecated. use getPeople(String, Boolean) |
RelationshipType |
findRelationshipType(java.lang.String relationshipTypeName)
Deprecated. use getRelationshipTypeByName(String) |
java.util.List<PersonAttributeType> |
getAllPersonAttributeTypes()
Get all PersonAttributeTypes in the database |
java.util.List<PersonAttributeType> |
getAllPersonAttributeTypes(boolean includeRetired)
Get all PersonAttributeTypes in the database with the option of including the retired types |
java.util.List<Relationship> |
getAllRelationships()
Get list of relationships that are not voided |
java.util.List<Relationship> |
getAllRelationships(boolean includeVoided)
Get list of relationships optionally including the voided ones or not |
java.util.List<RelationshipType> |
getAllRelationshipTypes()
Get all relationshipTypes Includes retired relationship types |
java.util.List<RelationshipType> |
getAllRelationshipTypes(boolean includeRetired)
Get all relationshipTypes with the option of including the retired types |
java.util.List<Person> |
getPeople(java.lang.String searchPhrase,
java.lang.Boolean dead)
Find a person matching the searchPhrase search string |
Person |
getPerson(java.lang.Integer personId)
Gets a person by internal id |
Person |
getPerson(Patient pat)
Deprecated. use getPerson(Integer) |
Person |
getPerson(User user)
Deprecated. use getPerson(Integer) |
PersonAddress |
getPersonAddressByUuid(java.lang.String uuid)
Get PersonAddress by its UUID |
PersonAttribute |
getPersonAttribute(java.lang.Integer id)
Get a PersonAttribute from the database with the given PersonAttributeid |
PersonAttribute |
getPersonAttributeByUuid(java.lang.String uuid)
Get PersonAttribute by its UUID |
PersonAttributeType |
getPersonAttributeType(java.lang.Integer typeId)
Get the PersonAttributeType given the type's PersonAttributeTypeId |
PersonAttributeType |
getPersonAttributeType(java.lang.String s)
Deprecated. use getPersonAttributeTypeByName(String) |
PersonAttributeType |
getPersonAttributeTypeByName(java.lang.String typeName)
Get the PersonAttributeType given the type's name |
PersonAttributeType |
getPersonAttributeTypeByUuid(java.lang.String uuid)
Gets a person attribute type with the given uuid. |
java.util.List<PersonAttributeType> |
getPersonAttributeTypes()
Deprecated. use getAllPersonAttributeTypes() |
java.util.List<PersonAttributeType> |
getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE personType,
PersonService.ATTR_VIEW_TYPE viewType)
Gets the types defined for the given person type (person, user, patient) and the given type of view (one person vs many person objects) |
java.util.List<PersonAttributeType> |
getPersonAttributeTypes(java.lang.String personTypeStr,
java.lang.String displayTypeStr)
Deprecated. @see PersonService.getPersonAttributeTypes(java.lang.String, java.lang.String) |
java.util.List<PersonAttributeType> |
getPersonAttributeTypes(java.lang.String exactName,
java.lang.String format,
java.lang.Integer foreignKey,
java.lang.Boolean searchable)
Find person attribute types matching the given parameters. |
Person |
getPersonByUuid(java.lang.String uuid)
Get Person by its UUID |
PersonName |
getPersonNameByUuid(java.lang.String uuid)
Get PersonName by its UUID |
Relationship |
getRelationship(java.lang.Integer relationshipId)
Get relationship by internal relationship identifier |
Relationship |
getRelationshipByUuid(java.lang.String uuid)
Get Relationship by its UUID |
java.util.Map<Person,java.util.List<Person>> |
getRelationshipMap(RelationshipType relType)
Get all relationships for a given type of relationship mapped from the personA to all of the personB's |
java.util.List<Relationship> |
getRelationships()
Deprecated. use getAllRelationships() |
java.util.List<Relationship> |
getRelationships(Person p)
Deprecated. use getRelationshipsByPerson(Person) |
java.util.List<Relationship> |
getRelationships(Person p,
boolean showVoided)
Deprecated. use getRelationshipsByPerson(Person) |
java.util.List<Relationship> |
getRelationships(Person fromPerson,
Person toPerson,
RelationshipType relType)
Get relationships stored in the database that |
java.util.Map<Person,java.util.List<Person>> |
getRelationships(RelationshipType relType)
Deprecated. use getRelationshipMap(RelationshipType) |
java.util.List<Relationship> |
getRelationshipsByPerson(Person p)
Get list of relationships that include Person in person_id or relative_id Does not include voided relationships |
java.util.List<Relationship> |
getRelationshipsTo(Person toPerson,
RelationshipType relType)
Deprecated. use getRelationships(Person, Person, RelationshipType) |
RelationshipType |
getRelationshipType(java.lang.Integer relationshipTypeId)
Get relationshipType by internal identifier |
RelationshipType |
getRelationshipTypeByName(java.lang.String relationshipTypeName)
Find relationshipType by exact name match |
RelationshipType |
getRelationshipTypeByUuid(java.lang.String uuid)
Gets the relationship type with the given uuid. |
java.util.List<RelationshipType> |
getRelationshipTypes()
Deprecated. use getAllRelationshipTypes() |
java.util.List<RelationshipType> |
getRelationshipTypes(java.lang.String searchString)
Get relationshipTypes by searching through the names and loosely matching to the given searchString |
java.util.List<RelationshipType> |
getRelationshipTypes(java.lang.String relationshipTypeName,
java.lang.Boolean preferred)
Find relationshipTypes by exact name match and/or preferred status |
java.util.Set<Person> |
getSimilarPeople(java.lang.String name,
java.lang.Integer birthyear,
java.lang.String gender)
Find a similar person given the attributes. |
java.util.Set<Person> |
getSimilarPeople(java.lang.String nameSearch,
java.lang.Integer birthyear,
java.lang.String gender,
java.lang.String personType)
Deprecated. @see getSimilarPeople(String, Integer, String) |
PersonName |
parsePersonName(java.lang.String name)
Parses a name into a PersonName (separate Given, Middle, and Family names) |
void |
purgePerson(Person person)
Purges a person from the database (cannot be undone) |
void |
purgePersonAttributeType(PersonAttributeType type)
Purges a PersonAttribute type from the database (cannot be undone) |
void |
purgeRelationship(Relationship relationship)
Purges a relationship from the database (cannot be undone) |
void |
purgeRelationshipType(RelationshipType relationshipType)
Purge relationship type from the database (cannot be undone) |
PersonAttributeType |
retirePersonAttributeType(PersonAttributeType type,
java.lang.String retiredReason)
Retire a Person Attribute Type |
RelationshipType |
retireRelationshipType(RelationshipType type,
java.lang.String retiredReason)
Retire a Person Relationship Type |
Person |
savePerson(Person person)
Creates or updates a Person in the database |
PersonAttributeType |
savePersonAttributeType(PersonAttributeType type)
Save the given person attribute type in the database. |
Relationship |
saveRelationship(Relationship relationship)
Create or update a relationship between people. |
RelationshipType |
saveRelationshipType(RelationshipType relationshipType)
Inserts or updates the given relationship type object in the database |
void |
setPersonDAO(PersonDAO dao)
Sets the DAO for this service. |
PersonName |
splitPersonName(java.lang.String name)
Deprecated. see #parsePersonName(String) |
Person |
unvoidPerson(Person person)
Effectively resurrects this person in the db. |
Relationship |
unvoidRelationship(Relationship relationship)
Unvoid Relationship in the database, effectively marking this as a valid relationship again |
void |
updatePerson(Person person)
Deprecated. use savePerson(Person) |
void |
updatePersonAttributeType(PersonAttributeType type)
Deprecated. use savePersonAttributeType(PersonAttributeType) |
void |
updateRelationship(Relationship relationship)
Deprecated. use saveRelationship(Relationship) |
void |
updateRelationshipType(RelationshipType relationshipType)
Deprecated. use saveRelationshipType(RelationshipType) |
Person |
voidPerson(Person person,
java.lang.String reason)
Effectively removes this person from the system. |
Relationship |
voidRelationship(Relationship relationship,
java.lang.String voidReason)
Voids the given Relationship, effectively removing it from openmrs. |
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
---|
onShutdown, onStartup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersonServiceImpl()
Method Detail |
---|
public void setPersonDAO(PersonDAO dao)
PersonService
setPersonDAO
in interface PersonService
dao
- DAO for this servicePersonService.setPersonDAO(org.openmrs.api.db.PersonDAO)
public java.util.Set<Person> getSimilarPeople(java.lang.String name, java.lang.Integer birthyear, java.lang.String gender) throws APIException
PersonService
nameSearch
parameter. This does a very loose lookup on birthyear
as
well. Any person with a null/missing birthdate is included and anyone with a birthyear
plus/minus one year from the given birthyear
is also included
getSimilarPeople
in interface PersonService
name
- string to search the person's name forbirthyear
- the year of birth to restrictgender
- The gender field to search on (Typically just "M" or "F")
APIException
PersonService.getSimilarPeople(java.lang.String, java.lang.Integer,
java.lang.String)
public java.util.Set<Person> getSimilarPeople(java.lang.String nameSearch, java.lang.Integer birthyear, java.lang.String gender, java.lang.String personType) throws APIException
getSimilarPeople(String, Integer, String)
PersonService
getSimilarPeople
in interface PersonService
nameSearch
- string to search the person's name forbirthyear
- the year of birth to restrictgender
- The gender field to search on (Typically just "M" or "F")personType
- one of person, user, or patient. If Person, any Person object is returned,
if Patient, only Persons that are Patients are returned, if User, only Persons
that are Users are returned
APIException
PersonService.getSimilarPeople(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String)
public java.util.List<Person> getPeople(java.lang.String searchPhrase, java.lang.Boolean dead) throws APIException
PersonService
getPeople
in interface PersonService
searchPhrase
- person name to match ondead
- if true will return only dead patients, if false will return only alive patients,
if null will return both
APIException
PersonService.getPeople(String, Boolean)
public java.util.Set<Person> findPeople(java.lang.String searchPhrase, boolean includeVoided)
getPeople(String, Boolean)
findPeople
in interface PersonService
public java.util.Set<Person> findPeople(java.lang.String searchPhrase, boolean includeVoided, java.lang.String roles)
getPeople(String, Boolean)
findPeople
in interface PersonService
public java.util.Set<Person> findPeople(java.lang.String searchPhrase, boolean includeVoided, java.util.List<java.lang.String> roles)
getPeople(String, Boolean)
findPeople
in interface PersonService
public java.util.List<PersonAttributeType> getAllPersonAttributeTypes() throws APIException
PersonService
getAllPersonAttributeTypes
in interface PersonService
APIException
PersonService.getAllPersonAttributeTypes()
public java.util.List<PersonAttributeType> getAllPersonAttributeTypes(boolean includeRetired) throws APIException
PersonService
getAllPersonAttributeTypes
in interface PersonService
includeRetired
- boolean - include retired attribute types as well?
APIException
PersonService.getAllPersonAttributeTypes(boolean)
public PersonAttributeType getPersonAttributeTypeByName(java.lang.String typeName) throws APIException
PersonService
getPersonAttributeTypeByName
in interface PersonService
APIException
PersonService.getPersonAttributeTypeByName(java.lang.String)
public void purgePersonAttributeType(PersonAttributeType type) throws APIException
PersonService
purgePersonAttributeType
in interface PersonService
type
- type to be purged from the database
APIException
PersonService.purgePersonAttributeType(org.openmrs.PersonAttributeType)
public PersonAttributeType savePersonAttributeType(PersonAttributeType type) throws APIException
PersonService
OpenmrsConstants.GLOBAL_PROPERTIES_OF_PERSON_ATTRIBUTES
and reference this given type,
prior to saving this given type.
savePersonAttributeType
in interface PersonService
APIException
PersonService.savePersonAttributeType(org.openmrs.PersonAttributeType)
public PersonAttributeType retirePersonAttributeType(PersonAttributeType type, java.lang.String retiredReason) throws APIException
PersonService
retirePersonAttributeType
in interface PersonService
APIException
org.openmrs.api.PersonService#retirePersonAttributeType(org.openmrs.PersonAttributeType)
public void createPersonAttributeType(PersonAttributeType type) throws APIException
savePersonAttributeType(PersonAttributeType)
createPersonAttributeType
in interface PersonService
APIException
public void updatePersonAttributeType(PersonAttributeType type) throws APIException
savePersonAttributeType(PersonAttributeType)
updatePersonAttributeType
in interface PersonService
APIException
public java.util.List<PersonAttributeType> getPersonAttributeTypes(java.lang.String exactName, java.lang.String format, java.lang.Integer foreignKey, java.lang.Boolean searchable) throws APIException
PersonService
getPersonAttributeTypes
in interface PersonService
exactName
- (optional) The name of typeformat
- (optional) The format for this typeforeignKey
- (optional) The foreign keysearchable
- (optional) if true only returns searchable types, if false returns only
nonsearchable and if null returns all
APIException
PersonService.getPersonAttributeTypes(java.lang.String,
java.lang.String, java.lang.Integer, java.lang.Boolean)
public void deletePersonAttributeType(java.lang.Integer attrTypeId)
purgePersonAttributeType(PersonAttributeType)
PersonService
deletePersonAttributeType
in interface PersonService
public void deletePersonAttributeType(PersonAttributeType type)
purgePersonAttributeType(PersonAttributeType)
deletePersonAttributeType
in interface PersonService
public java.util.List<PersonAttributeType> getPersonAttributeTypes()
getAllPersonAttributeTypes()
getPersonAttributeTypes
in interface PersonService
public PersonAttributeType getPersonAttributeType(java.lang.Integer typeId)
PersonService
getPersonAttributeType
in interface PersonService
typeId
- PersonAttributeType.personAttributeTypeId to match on
PersonService.getPersonAttributeType(java.lang.Integer)
public PersonAttribute getPersonAttribute(java.lang.Integer id)
PersonService
getPersonAttribute
in interface PersonService
id
- the PersonAttribute.personAttributeId to match on
PersonService.getPersonAttribute(java.lang.Integer)
public PersonAttributeType getPersonAttributeType(java.lang.String s)
getPersonAttributeTypeByName(String)
getPersonAttributeType
in interface PersonService
public Relationship getRelationship(java.lang.Integer relationshipId) throws APIException
PersonService
getRelationship
in interface PersonService
APIException
PersonService.getRelationship(java.lang.Integer)
public java.util.List<Relationship> getRelationships() throws APIException
getAllRelationships()
getRelationships
in interface PersonService
APIException
public java.util.List<Relationship> getRelationships(Person p, boolean showVoided) throws APIException
getRelationshipsByPerson(Person)
getRelationships
in interface PersonService
APIException
public java.util.List<Relationship> getRelationships(Person p) throws APIException
getRelationshipsByPerson(Person)
getRelationships
in interface PersonService
APIException
public java.util.List<Relationship> getRelationshipsTo(Person toPerson, RelationshipType relType) throws APIException
getRelationships(Person, Person, RelationshipType)
getRelationshipsTo
in interface PersonService
APIException
public java.util.List<RelationshipType> getRelationshipTypes() throws APIException
getAllRelationshipTypes()
getRelationshipTypes
in interface PersonService
APIException
public RelationshipType getRelationshipType(java.lang.Integer relationshipTypeId) throws APIException
PersonService
getRelationshipType
in interface PersonService
APIException
PersonService.getRelationshipType(java.lang.Integer)
public RelationshipType findRelationshipType(java.lang.String relationshipTypeName) throws APIException
getRelationshipTypeByName(String)
findRelationshipType
in interface PersonService
APIException
public RelationshipType getRelationshipTypeByName(java.lang.String relationshipTypeName) throws APIException
PersonService
getRelationshipTypeByName
in interface PersonService
relationshipTypeName
- name to match on
APIException
PersonService.getRelationshipTypeByName(java.lang.String)
public void purgePerson(Person person) throws APIException
PersonService
purgePerson
in interface PersonService
person
- person to be purged from the database
APIException
PersonService.purgePerson(org.openmrs.Person)
public Person savePerson(Person person) throws APIException
PersonService
savePerson
in interface PersonService
person
- person to be created or updated
APIException
PersonService.savePerson(org.openmrs.Person)
public Person createPerson(Person person) throws APIException
savePerson(Person)
createPerson
in interface PersonService
APIException
public void updatePerson(Person person) throws APIException
savePerson(Person)
updatePerson
in interface PersonService
APIException
public void deletePerson(Person person) throws APIException
purgePerson(Person)
deletePerson
in interface PersonService
APIException
public Person voidPerson(Person person, java.lang.String reason) throws APIException
PersonService
voidPerson
in interface PersonService
person
- person to be voidedreason
- reason for voiding person
APIException
PersonService.voidPerson(org.openmrs.Person, java.lang.String)
public Person unvoidPerson(Person person) throws APIException
PersonService
unvoidPerson
in interface PersonService
person
- person to be revived
APIException
PersonService.unvoidPerson(org.openmrs.Person)
public Person getPerson(java.lang.Integer personId) throws APIException
PersonService
getPerson
in interface PersonService
personId
- internal identifier of person to get
APIException
PersonService.getPerson(java.lang.Integer)
public Person getPerson(Patient pat) throws APIException
getPerson(Integer)
PersonService
PersonService.getPerson(Integer)
passing in pat.getPatientId() or just cast the pat
object to a Person object because Patient is a subclass of Person. (Person)pat
getPerson
in interface PersonService
APIException
public Person getPerson(User user) throws APIException
getPerson(Integer)
PersonService
PersonService.getPerson(Integer)
passing in user.getUserId() or just cast the user
object to a Person object because User is a subclass of Person. (Person)user
getPerson
in interface PersonService
APIException
public java.util.List<Relationship> getAllRelationships() throws APIException
PersonService
getAllRelationships
in interface PersonService
APIException
PersonService.getAllRelationships()
public java.util.List<Relationship> getAllRelationships(boolean includeVoided) throws APIException
PersonService
getAllRelationships
in interface PersonService
includeVoided
- true/false whether to include the voided relationships
APIException
PersonService.getAllRelationships(boolean)
public java.util.List<Relationship> getRelationships(Person fromPerson, Person toPerson, RelationshipType relType) throws APIException
PersonService
getRelationships
in interface PersonService
fromPerson
- (optional) Person to in the person_id columntoPerson
- (optional) Person in the relative_id columnrelType
- (optional) The RelationshipType to match
APIException
PersonService.getRelationships(org.openmrs.Person, org.openmrs.Person,
org.openmrs.RelationshipType)
public java.util.List<Relationship> getRelationshipsByPerson(Person p) throws APIException
PersonService
getRelationshipsByPerson
in interface PersonService
p
- person object listed on either side of the relationship
APIException
PersonService.getRelationshipsByPerson(org.openmrs.Person)
public void purgeRelationship(Relationship relationship) throws APIException
PersonService
purgeRelationship
in interface PersonService
relationship
- relationship to be purged from the database
APIException
PersonService.purgeRelationship(org.openmrs.Relationship)
public Relationship saveRelationship(Relationship relationship) throws APIException
PersonService
relationship
to
the database
saveRelationship
in interface PersonService
relationship
- relationship to be created or updated
APIException
PersonService.saveRelationship(org.openmrs.Relationship)
public void createRelationship(Relationship relationship) throws APIException
saveRelationship(Relationship)
createRelationship
in interface PersonService
APIException
public void updateRelationship(Relationship relationship) throws APIException
saveRelationship(Relationship)
updateRelationship
in interface PersonService
APIException
public void deleteRelationship(Relationship relationship) throws APIException
purgeRelationship(Relationship)
deleteRelationship
in interface PersonService
APIException
public Relationship voidRelationship(Relationship relationship, java.lang.String voidReason) throws APIException
PersonService
voidRelationship
in interface PersonService
relationship
- Relationship to voidvoidReason
- String reason the relationship is being voided.
APIException
PersonService.voidRelationship(org.openmrs.Relationship,
java.lang.String)
public Relationship unvoidRelationship(Relationship relationship) throws APIException
PersonService
unvoidRelationship
in interface PersonService
relationship
- Relationship to unvoid
APIException
PersonService.unvoidRelationship(org.openmrs.Relationship)
public void createRelationshipType(RelationshipType relationshipType) throws APIException
saveRelationshipType(RelationshipType)
createRelationshipType
in interface PersonService
APIException
public void updateRelationshipType(RelationshipType relationshipType) throws APIException
saveRelationshipType(RelationshipType)
updateRelationshipType
in interface PersonService
APIException
public void deleteRelationshipType(RelationshipType relationshipType) throws APIException
purgeRelationshipType(RelationshipType)
deleteRelationshipType
in interface PersonService
APIException
public java.util.List<RelationshipType> getAllRelationshipTypes() throws APIException
PersonService
getAllRelationshipTypes
in interface PersonService
APIException
PersonService.getAllRelationshipTypes()
public java.util.List<RelationshipType> getRelationshipTypes(java.lang.String searchString) throws APIException
PersonService
getRelationshipTypes
in interface PersonService
searchString
- string to match to a relationship type name
APIException
PersonService.getRelationshipTypes(java.lang.String)
public java.util.List<RelationshipType> getRelationshipTypes(java.lang.String relationshipTypeName, java.lang.Boolean preferred) throws APIException
PersonService
getRelationshipTypes
in interface PersonService
relationshipTypeName
- name to match onpreferred
- if true, returns on preferred types, if false returns only the nonpreferred
types. if null returns both
APIException
PersonService.getRelationshipTypes(java.lang.String, java.lang.Boolean)
public void purgeRelationshipType(RelationshipType relationshipType) throws APIException
PersonService
purgeRelationshipType
in interface PersonService
relationshipType
- relationship type to be purged
APIException
PersonService.purgeRelationshipType(org.openmrs.RelationshipType)
public RelationshipType saveRelationshipType(RelationshipType relationshipType) throws APIException
PersonService
saveRelationshipType
in interface PersonService
relationshipType
- type to be created or updated
APIException
PersonService.saveRelationshipType(org.openmrs.RelationshipType)
public java.util.List<PersonAttributeType> getPersonAttributeTypes(OpenmrsConstants.PERSON_TYPE personType, PersonService.ATTR_VIEW_TYPE viewType) throws APIException
PersonService
getPersonAttributeTypes
in interface PersonService
personType
- PERSON, USER, PATIENT, or null. Both PERSON and null mean to return attr
types for both patients and usersviewType
- whether this is a listing or viewing or null for both listing and viewing
APIException
PersonService.getPersonAttributeTypes(org.openmrs.util.OpenmrsConstants.PERSON_TYPE,
org.openmrs.api.PersonService.ATTR_VIEW_TYPE)
public java.util.List<PersonAttributeType> getPersonAttributeTypes(java.lang.String personTypeStr, java.lang.String displayTypeStr) throws APIException
PersonService.getPersonAttributeTypes(java.lang.String, java.lang.String)
getPersonAttributeTypes
in interface PersonService
APIException
public PersonName parsePersonName(java.lang.String name) throws APIException
PersonService
parsePersonName
in interface PersonService
name
- person name to be parsed
APIException
PersonService.parsePersonName(java.lang.String)
public PersonName splitPersonName(java.lang.String name)
PersonService
name
string into Given, Middle, and Family parts of a PersonName
splitPersonName
in interface PersonService
PersonService.parsePersonName(String)
public java.util.Map<Person,java.util.List<Person>> getRelationshipMap(RelationshipType relType) throws APIException
PersonService
getRelationshipMap
in interface PersonService
relType
- type of relationship for which to retrieve all relationships
APIException
PersonService.getRelationshipMap(org.openmrs.RelationshipType)
public java.util.Map<Person,java.util.List<Person>> getRelationships(RelationshipType relType) throws APIException
getRelationshipMap(RelationshipType)
getRelationships
in interface PersonService
APIException
public PersonAttributeType getPersonAttributeTypeByUuid(java.lang.String uuid)
PersonService
getPersonAttributeTypeByUuid
in interface PersonService
uuid
- the universally unique identifier to lookup
PersonService.getPersonAttributeTypeByUuid(java.lang.String)
public Person getPersonByUuid(java.lang.String uuid) throws APIException
PersonService
getPersonByUuid
in interface PersonService
APIException
PersonService.getPersonByUuid(java.lang.String)
public PersonAddress getPersonAddressByUuid(java.lang.String uuid) throws APIException
PersonService
getPersonAddressByUuid
in interface PersonService
APIException
public PersonAttribute getPersonAttributeByUuid(java.lang.String uuid) throws APIException
PersonService
getPersonAttributeByUuid
in interface PersonService
APIException
public PersonName getPersonNameByUuid(java.lang.String uuid) throws APIException
PersonService
getPersonNameByUuid
in interface PersonService
APIException
public Relationship getRelationshipByUuid(java.lang.String uuid) throws APIException
PersonService
getRelationshipByUuid
in interface PersonService
APIException
PersonService.getRelationshipByUuid(java.lang.String)
public RelationshipType getRelationshipTypeByUuid(java.lang.String uuid) throws APIException
PersonService
getRelationshipTypeByUuid
in interface PersonService
APIException
PersonService.getRelationshipTypeByUuid(java.lang.String)
public java.util.List<RelationshipType> getAllRelationshipTypes(boolean includeRetired) throws APIException
PersonService
getAllRelationshipTypes
in interface PersonService
includeRetired
- boolean - include retired relationshipTypes as well?
APIException
PersonService.getAllRelationshipTypes(boolean)
public RelationshipType retireRelationshipType(RelationshipType type, java.lang.String retiredReason) throws APIException
PersonService
retireRelationshipType
in interface PersonService
APIException
PersonService.retireRelationshipType(org.openmrs.RelationshipType, java.lang.String)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |