OpenMRSConceptService¶
-
public interface
OpenMRSConceptService
¶ Interface for handling concepts on the OpenMRS server.
Methods¶
createConcept¶
-
Concept
createConcept
(String configName, Concept concept)¶ Creates the given concept on the OpenMRS server. Configuration with the given
configName
will be used while performing this action.Parameters: - configName – the name of the configuration
- concept – the concept to be created
Throws: - ConceptNameAlreadyInUseException – if the concept with the given name already exists
Returns: the created concept
deleteConcept¶
getAllConcepts¶
-
List<Concept>
getAllConcepts
(String configName)¶ Returns the basic information (UUID and name) about all the concepts stored on the OpenMRS server. Configuration with the given
configName
will be used while performing this action.Parameters: - configName – the name of the configuration
Returns: the list of all concepts
getConceptByUuid¶
-
Concept
getConceptByUuid
(String configName, String uuid)¶ Returns the concept with the given
uuid
. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- uuid – the UUID of the concept
Returns: the concept with the given UUID
getConcepts¶
-
List<Concept>
getConcepts
(String configName, int page, int pageSize)¶ Returns a list of the concepts. The returned list will contain maximum of
pageSize
concepts fetched from the page with the givenpage
number. The list might contain less entries if the givenpage
is the last one and there is less thanpageSize
concepts on it. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- page – the number of the page
- pageSize – the size of the page
Returns: the list of concepts on the given page
resolveConceptUuidFromConceptName¶
-
String
resolveConceptUuidFromConceptName
(String configName, String name)¶ Returns the UUID of the concept with the given
name
. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- name – the name of the concept
Returns: the UUID of the concept
search¶
-
List<Concept>
search
(String configName, String phrase)¶ Returns a list of the concepts with the given
phrase
in their names. Configuration with the givenconfigName
will be used while performing this action.Parameters: - configName – the name of the configuration
- phrase – the phrase to search for
Returns: the list of concept with names containing the given phrase
updateConcept¶
-
Concept
updateConcept
(String configName, Concept concept)¶ Updates the concept with the information stored in the given concept. Fields name, names and display name will be ignored as changing them is not allowed by the system. Configuration with the given
configName
will be used while performing this action.Parameters: - configName – the name of the configuration
- concept – the concept used as an update source
Returns: the updated concept