public class ProviderServiceImpl extends BaseOpenmrsService implements ProviderService
ProviderService
. This class should not be used on its own.
The current OpenMRS implementation should be fetched from the Context.Constructor and Description |
---|
ProviderServiceImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ProviderAttributeType> |
getAllProviderAttributeTypes()
Gets all provider attribute types including retired provider attribute types.
|
java.util.List<ProviderAttributeType> |
getAllProviderAttributeTypes(boolean includeRetired)
Gets all provider attribute types optionally including retired provider attribute types.
|
java.util.List<Provider> |
getAllProviders()
Gets all providers.
|
java.util.List<Provider> |
getAllProviders(boolean includeRetired)
Gets all Provider
|
java.lang.Integer |
getCountOfProviders(java.lang.String query) |
java.lang.Integer |
getCountOfProviders(java.lang.String query,
boolean includeRetired)
Gets the count of providers with a person name or identifier or name that matches the
specified query
|
Provider |
getProvider(java.lang.Integer providerId)
Gets a provider by its provider id
|
ProviderAttribute |
getProviderAttribute(java.lang.Integer providerAttributeID)
Get a provider attribute by it's providerAttributeID
|
ProviderAttribute |
getProviderAttributeByUuid(java.lang.String uuid)
Get a provider attribute by it's providerAttributeUuid
|
ProviderAttributeType |
getProviderAttributeType(java.lang.Integer providerAttributeTypeId)
Gets a provider attribute type by it's id
|
ProviderAttributeType |
getProviderAttributeTypeByUuid(java.lang.String uuid)
Get a provider attribute type by it's uuid
|
Provider |
getProviderByIdentifier(java.lang.String identifier)
Gets a provider with a matching identifier, this method performs a case insensitive search
|
Provider |
getProviderByUuid(java.lang.String uuid) |
java.util.List<Provider> |
getProviders(java.lang.String query,
java.lang.Integer start,
java.lang.Integer length,
java.util.Map<ProviderAttributeType,java.lang.Object> attributeValues) |
java.util.List<Provider> |
getProviders(java.lang.String query,
java.lang.Integer start,
java.lang.Integer length,
java.util.Map<ProviderAttributeType,java.lang.Object> attributeValues,
boolean includeRetired) |
java.util.Collection<Provider> |
getProvidersByPerson(Person person)
Gets the Providers for the given person.
|
java.util.Collection<Provider> |
getProvidersByPerson(Person person,
boolean includeRetired)
Gets the Providers for the given person including or excluding retired.
|
Provider |
getUnknownProvider()
Gets the unknown provider account, i.e.
|
boolean |
isProviderIdentifierUnique(Provider provider)
Checks if the identifier for the specified provider is unique
|
void |
purgeProvider(Provider provider)
Deletes a given Provider
|
void |
purgeProviderAttributeType(ProviderAttributeType providerAttributeType)
Deletes a provider attribute type
|
void |
retireProvider(Provider provider,
java.lang.String reason)
Retires a given Provider
|
ProviderAttributeType |
retireProviderAttributeType(ProviderAttributeType providerAttributeType,
java.lang.String reason)
Retire a provider attribute type
|
Provider |
saveProvider(Provider provider) |
ProviderAttributeType |
saveProviderAttributeType(ProviderAttributeType providerAttributeType)
Save the provider attribute type
|
void |
setProviderDAO(ProviderDAO dao)
Sets the data access object for Concepts.
|
Provider |
unretireProvider(Provider provider)
Unretire a given Provider
|
ProviderAttributeType |
unretireProviderAttributeType(ProviderAttributeType providerAttributeType)
Un-Retire a provider attribute type
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
public void setProviderDAO(ProviderDAO dao)
dao
- The data access object to usepublic java.util.List<Provider> getAllProviders()
ProviderService
getAllProviders
in interface ProviderService
ProviderService.getAllProviders()
public java.util.List<Provider> getAllProviders(boolean includeRetired)
ProviderService
getAllProviders
in interface ProviderService
includeRetired
- - whether or not to include retired ProviderProviderService.getAllProviders(boolean)
public void retireProvider(Provider provider, java.lang.String reason)
ProviderService
retireProvider
in interface ProviderService
ProviderService.retireProvider(org.openmrs.Provider, java.lang.String)
public Provider unretireProvider(Provider provider)
ProviderService
unretireProvider
in interface ProviderService
ProviderService.unretireProvider(org.openmrs.Provider)
public void purgeProvider(Provider provider)
ProviderService
purgeProvider
in interface ProviderService
ProviderService.purgeProvider(org.openmrs.Provider)
public Provider getProvider(java.lang.Integer providerId)
ProviderService
getProvider
in interface ProviderService
providerId
- the provider idProviderService.getProvider(java.lang.Integer)
public Provider saveProvider(Provider provider)
saveProvider
in interface ProviderService
ProviderService.saveProvider(org.openmrs.Provider)
public Provider getProviderByUuid(java.lang.String uuid)
getProviderByUuid
in interface ProviderService
ProviderService.getProviderByUuid(java.lang.String)
public java.util.Collection<Provider> getProvidersByPerson(Person person, boolean includeRetired)
ProviderService
getProvidersByPerson
in interface ProviderService
ProviderService.getProvidersByPerson(org.openmrs.Person, boolean )
public java.util.Collection<Provider> getProvidersByPerson(Person person)
ProviderService
getProvidersByPerson
in interface ProviderService
ProviderService.getProvidersByPerson(org.openmrs.Person)
public java.lang.Integer getCountOfProviders(java.lang.String query)
getCountOfProviders
in interface ProviderService
ProviderService.getCountOfProviders(java.lang.String)
public java.lang.Integer getCountOfProviders(java.lang.String query, boolean includeRetired)
ProviderService
getCountOfProviders
in interface ProviderService
query
- the text to matchincludeRetired
- specifies whether retired providers should be include or notProviderService.getCountOfProviders(java.lang.String, boolean)
public java.util.List<Provider> getProviders(java.lang.String query, java.lang.Integer start, java.lang.Integer length, java.util.Map<ProviderAttributeType,java.lang.Object> attributeValues, boolean includeRetired)
getProviders
in interface ProviderService
ProviderService.getProviders(String, Integer, Integer, java.util.Map,
boolean)
public java.util.List<Provider> getProviders(java.lang.String query, java.lang.Integer start, java.lang.Integer length, java.util.Map<ProviderAttributeType,java.lang.Object> attributeValues)
getProviders
in interface ProviderService
ProviderService.getProviders(String, Integer, Integer, java.util.Map)
public java.util.List<ProviderAttributeType> getAllProviderAttributeTypes()
ProviderService
getAllProviderAttributeTypes
in interface ProviderService
ProviderService.getAllProviderAttributeTypes()
public java.util.List<ProviderAttributeType> getAllProviderAttributeTypes(boolean includeRetired)
ProviderService
getAllProviderAttributeTypes
in interface ProviderService
includeRetired
- boolean value to indicate whether to include retired records or notProviderService.getAllProviderAttributeTypes(boolean)
public ProviderAttributeType getProviderAttributeType(java.lang.Integer providerAttributeTypeId)
ProviderService
getProviderAttributeType
in interface ProviderService
providerAttributeTypeId
- the provider attribute type idProviderService.getProviderAttributeType(java.lang.Integer)
public ProviderAttributeType getProviderAttributeTypeByUuid(java.lang.String uuid)
ProviderService
getProviderAttributeTypeByUuid
in interface ProviderService
uuid
- the uuid of the provider attribute typeProviderService.getProviderAttributeTypeByUuid(java.lang.String)
public ProviderAttribute getProviderAttribute(java.lang.Integer providerAttributeID)
ProviderService
getProviderAttribute
in interface ProviderService
providerAttributeID
- the provider attribute ID of the providerAttributeProviderService.getProviderAttribute(java.lang.Integer)
public ProviderAttribute getProviderAttributeByUuid(java.lang.String uuid)
ProviderService
getProviderAttributeByUuid
in interface ProviderService
uuid
- the provider attribute uuid of the providerAttributeProviderService.getProviderAttributeByUuid(String)
public ProviderAttributeType saveProviderAttributeType(ProviderAttributeType providerAttributeType)
ProviderService
saveProviderAttributeType
in interface ProviderService
providerAttributeType
- the provider attribute type to be savedProviderService.saveProviderAttributeType(org.openmrs.ProviderAttributeType)
public ProviderAttributeType retireProviderAttributeType(ProviderAttributeType providerAttributeType, java.lang.String reason)
ProviderService
retireProviderAttributeType
in interface ProviderService
providerAttributeType
- the provider attribute type to be retiredreason
- for retiring the provider attribute typeProviderService.retireProviderAttributeType(org.openmrs.ProviderAttributeType,
java.lang.String)
public ProviderAttributeType unretireProviderAttributeType(ProviderAttributeType providerAttributeType)
ProviderService
unretireProviderAttributeType
in interface ProviderService
providerAttributeType
- the provider type attribute to unretireProviderService.unretireProviderAttributeType(org.openmrs.ProviderAttributeType)
public void purgeProviderAttributeType(ProviderAttributeType providerAttributeType)
ProviderService
purgeProviderAttributeType
in interface ProviderService
providerAttributeType
- provider attribute type to be deletedProviderService.purgeProviderAttributeType(org.openmrs.ProviderAttributeType)
public boolean isProviderIdentifierUnique(Provider provider) throws APIException
ProviderService
isProviderIdentifierUnique
in interface ProviderService
provider
- the provider whose identifier to checkAPIException
ProviderService.isProviderIdentifierUnique(Provider)
public Provider getProviderByIdentifier(java.lang.String identifier)
ProviderService
getProviderByIdentifier
in interface ProviderService
identifier
- the identifier to match againstProvider
ProviderService.getProviderByIdentifier(java.lang.String)
public Provider getUnknownProvider()
ProviderService
OpenmrsConstants.GP_UNKNOWN_PROVIDER_UUID
getUnknownProvider
in interface ProviderService
Provider
ProviderService.getUnknownProvider()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.