@Handler(supports=Provider.class) public interface ProviderService extends OpenmrsService
Modifier and Type | Method and Description |
---|---|
List<ProviderAttributeType> |
getAllProviderAttributeTypes()
Gets all provider attribute types including retired provider attribute types.
|
List<ProviderAttributeType> |
getAllProviderAttributeTypes(boolean includeRetired)
Gets all provider attribute types optionally including retired provider attribute types.
|
List<Provider> |
getAllProviders()
Gets all providers. includes retired Provider.This method delegates to the
#getAllProviders(boolean) method
|
List<Provider> |
getAllProviders(boolean includeRetired)
Gets all providers
|
Integer |
getCountOfProviders(String query) |
Integer |
getCountOfProviders(String query,
boolean includeRetired)
Gets the count of providers with a person name or identifier or name that matches the
specified query
|
Provider |
getProvider(Integer providerId)
Gets a provider by its provider id
|
ProviderAttribute |
getProviderAttribute(Integer providerAttributeID)
Get a provider attribute by it's providerAttributeID
|
ProviderAttribute |
getProviderAttributeByUuid(String uuid)
Get a provider attribute by its providerAttributeUuid
|
ProviderAttributeType |
getProviderAttributeType(Integer providerAttributeTypeId)
Gets a provider attribute type by it's id
|
ProviderAttributeType |
getProviderAttributeTypeByName(String name)
Get a provider attribute type by its name
|
ProviderAttributeType |
getProviderAttributeTypeByUuid(String uuid)
Get a provider attribute type by its uuid
|
Provider |
getProviderByIdentifier(String identifier)
Gets a provider with a matching identifier, this method performs a case insensitive search
|
Provider |
getProviderByUuid(String uuid) |
List<Provider> |
getProviders(String query,
Integer start,
Integer length,
Map<ProviderAttributeType,Object> attributes) |
List<Provider> |
getProviders(String query,
Integer start,
Integer length,
Map<ProviderAttributeType,Object> attributes,
boolean includeRetired) |
Collection<Provider> |
getProvidersByPerson(Person person)
Gets the Providers for the given person.
|
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. the provider account that matches the uuid specified
as the value for the global property
OpenmrsConstants.GP_UNKNOWN_PROVIDER_UUID |
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,
String reason)
Retires a given Provider
|
ProviderAttributeType |
retireProviderAttributeType(ProviderAttributeType providerAttributeType,
String reason)
Retire a provider attribute type
|
Provider |
saveProvider(Provider provider) |
ProviderAttributeType |
saveProviderAttributeType(ProviderAttributeType providerAttributeType)
Save the provider attribute type
|
Provider |
unretireProvider(Provider provider)
Unretire a given Provider
|
ProviderAttributeType |
unretireProviderAttributeType(ProviderAttributeType providerAttributeType)
Un-Retire a provider attribute type
|
onShutdown, onStartup
@Authorized(value="Get Providers") List<Provider> getAllProviders()
@Authorized(value="Get Providers") List<Provider> getAllProviders(boolean includeRetired)
includeRetired
- - if true, retired providers are also included
Should get all providers that are unretired@Authorized(value="Manage Providers") void retireProvider(Provider provider, String reason)
provider
- provider to retirereason
- reason why the provider is retired
Should retire a provider@Authorized(value="Manage Providers") Provider unretireProvider(Provider provider)
provider
- provider to unretire
Should unretire a provider@Authorized(value="Purge Providers") void purgeProvider(Provider provider)
provider
- provider to be deleted
Should delete a provider@Authorized(value="Get Providers") Provider getProvider(Integer providerId)
providerId
- the provider id@Authorized(value="Manage Providers") Provider saveProvider(Provider provider)
provider
- @Authorized(value="Get Providers") Provider getProviderByUuid(String uuid)
uuid
- @Authorized(value="Get Providers") Collection<Provider> getProvidersByPerson(Person person)
person
- @Authorized(value="Get Providers") Collection<Provider> getProvidersByPerson(Person person, boolean includeRetired)
person
- includeRetired
- @Authorized(value="Get Providers") List<Provider> getProviders(String query, Integer start, Integer length, Map<ProviderAttributeType,Object> attributes, boolean includeRetired)
query
- start
- length
- attributes
- includeRetired
- @Authorized(value="Get Providers") List<Provider> getProviders(String query, Integer start, Integer length, Map<ProviderAttributeType,Object> attributes)
query
- start
- length
- attributes
- @Authorized(value="Get Providers") Integer getCountOfProviders(String query)
query
- @Authorized(value="Get Providers") Integer getCountOfProviders(String query, boolean includeRetired)
query
- the text to matchincludeRetired
- specifies whether retired providers should be include or notList<ProviderAttributeType> getAllProviderAttributeTypes()
List<ProviderAttributeType> getAllProviderAttributeTypes(boolean includeRetired)
includeRetired
- boolean value to indicate whether to include retired records or notProviderAttributeType getProviderAttributeType(Integer providerAttributeTypeId)
providerAttributeTypeId
- the provider attribute type idProviderAttributeType getProviderAttributeTypeByUuid(String uuid)
uuid
- the uuid of the provider attribute type@Authorized(value="Get Provider Attribute Types") ProviderAttributeType getProviderAttributeTypeByName(String name)
name
- the name of the provider attribute typeProviderAttribute getProviderAttribute(Integer providerAttributeID)
providerAttributeID
- the provider attribute ID of the providerAttributeProviderAttribute getProviderAttributeByUuid(String uuid)
uuid
- the provider attribute uuid of the providerAttributeProviderAttributeType saveProviderAttributeType(ProviderAttributeType providerAttributeType)
providerAttributeType
- the provider attribute type to be savedProviderAttributeType retireProviderAttributeType(ProviderAttributeType providerAttributeType, String reason)
providerAttributeType
- the provider attribute type to be retiredreason
- for retiring the provider attribute typeProviderAttributeType unretireProviderAttributeType(ProviderAttributeType providerAttributeType)
providerAttributeType
- the provider type attribute to unretirevoid purgeProviderAttributeType(ProviderAttributeType providerAttributeType)
providerAttributeType
- provider attribute type to be deleted
Should delete a provider attribute type@Authorized(value="Get Providers") boolean isProviderIdentifierUnique(Provider provider) throws APIException
provider
- the provider whose identifier to checkAPIException
- Should return false if the identifier is a duplicate
Should return true if the identifier is null
Should return true if the identifier is a blank string@Authorized(value="Get Providers") Provider getProviderByIdentifier(String identifier)
identifier
- the identifier to match againstProvider
Should get a provider matching the specified identifier ignoring case@Authorized(value="Get Providers") Provider getUnknownProvider()
OpenmrsConstants.GP_UNKNOWN_PROVIDER_UUID
Provider
Copyright © 2024 OpenMRS Inc.. All rights reserved.