@Transactional @Handler(supports=Provider.class) public interface ProviderService extends OpenmrsService
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> attributes) |
java.util.List<Provider> |
getProviders(java.lang.String query,
java.lang.Integer start,
java.lang.Integer length,
java.util.Map<ProviderAttributeType,java.lang.Object> attributes,
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.
|
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
|
Provider |
unretireProvider(Provider provider)
Unretire a given Provider
|
ProviderAttributeType |
unretireProviderAttributeType(ProviderAttributeType providerAttributeType)
Un-Retire a provider attribute type
|
onShutdown, onStartup
@Transactional(readOnly=true) @Authorized(value="View Providers") java.util.List<Provider> getAllProviders()
@Transactional(readOnly=true) @Authorized(value="View Providers") java.util.List<Provider> getAllProviders(boolean includeRetired)
includeRetired
- - whether or not to include retired Provider@Authorized(value="Manage Providers") void retireProvider(Provider provider, java.lang.String reason)
Provider
- provider to retireString
- reason why the provider is retired@Authorized(value="Manage Providers") Provider unretireProvider(Provider provider)
Provider
- provider to unretire@Authorized(value="Purge Providers") void purgeProvider(Provider provider)
Provider
- provider to be deleted@Transactional(readOnly=true) @Authorized(value="View Providers") Provider getProvider(java.lang.Integer providerId)
providerId
- the provider id@Authorized(value="Manage Providers") Provider saveProvider(Provider provider)
provider
- @Transactional(readOnly=true) @Authorized(value="View Providers") Provider getProviderByUuid(java.lang.String uuid)
string
- @Transactional(readOnly=true) @Authorized(value="View Providers") java.util.Collection<Provider> getProvidersByPerson(Person person)
person
- @Transactional(readOnly=true) @Authorized(value="View Providers") java.util.Collection<Provider> getProvidersByPerson(Person person, boolean includeRetired)
person
- includeRetired
- @Transactional(readOnly=true) @Authorized(value="View Providers") java.util.List<Provider> getProviders(java.lang.String query, java.lang.Integer start, java.lang.Integer length, java.util.Map<ProviderAttributeType,java.lang.Object> attributes, boolean includeRetired)
query
- start
- length
- attributes
- includeRetired
- @Authorized(value="View Providers") java.util.List<Provider> getProviders(java.lang.String query, java.lang.Integer start, java.lang.Integer length, java.util.Map<ProviderAttributeType,java.lang.Object> attributes)
query
- start
- length
- attributes
- @Transactional(readOnly=true) @Authorized(value="View Providers") java.lang.Integer getCountOfProviders(java.lang.String query)
query
- @Authorized(value="View Providers") java.lang.Integer getCountOfProviders(java.lang.String query, boolean includeRetired)
query
- the text to matchincludeRetired
- specifies whether retired providers should be include or not@Transactional(readOnly=true) java.util.List<ProviderAttributeType> getAllProviderAttributeTypes()
@Transactional(readOnly=true) java.util.List<ProviderAttributeType> getAllProviderAttributeTypes(boolean includeRetired)
includeRetired
- boolean value to indicate whether to include retired records or notProviderAttributeType getProviderAttributeType(java.lang.Integer providerAttributeTypeId)
providerAttributeTypeId
- the provider attribute type idProviderAttributeType getProviderAttributeTypeByUuid(java.lang.String uuid)
uuid
- the uuid of the provider attribute typeProviderAttribute getProviderAttribute(java.lang.Integer providerAttributeID)
providerAttributeID
- the provider attribute ID of the providerAttributeProviderAttribute getProviderAttributeByUuid(java.lang.String uuid)
uuid
- the provider attribute uuid of the providerAttributeProviderAttributeType saveProviderAttributeType(ProviderAttributeType providerAttributeType)
providerAttributeType
- the provider attribute type to be savedProviderAttributeType retireProviderAttributeType(ProviderAttributeType providerAttributeType, java.lang.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@Transactional(readOnly=true) @Authorized(value="View Providers") boolean isProviderIdentifierUnique(Provider provider) throws APIException
provider
- the provider whose identifier to checkAPIException
@Transactional(readOnly=true) @Authorized(value="View Providers") Provider getProviderByIdentifier(java.lang.String identifier)
identifier
- the identifier to match againstProvider
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.