public class ConceptServiceImpl extends BaseOpenmrsService implements ConceptService
to access these methods
Modifier and Type | Field and Description |
---|---|
static String |
CONCEPT_WORD_UPDATE_TASK_NAME |
Constructor and Description |
---|
ConceptServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
checkIfLocked()
Check if the concepts are locked and if so, throw exception during manipulation of concept
|
Iterator<Concept> |
conceptIterator()
Returns an iterator for all concepts, including retired and expired.
|
void |
convertBooleanConceptToCoded(Concept conceptToChange)
Changes the datatype of a concept from boolean to coded when it has observations it is
associated to.
|
void |
createConcept(Concept concept)
Deprecated.
|
void |
createConcept(ConceptNumeric concept)
Deprecated.
|
void |
createDrug(Drug drug)
Deprecated.
use #saveDrug(Drug)
|
void |
deleteConcept(Concept concept)
Deprecated.
use #purgeConcept(Concept concept)
|
List<ConceptSearchResult> |
findConceptAnswers(String phrase,
Locale locale,
Concept concept)
Finds concepts that are possible value coded answers to concept parameter
|
List<ConceptWord> |
findConceptAnswers(String phrase,
Locale locale,
Concept concept,
boolean includeRetired)
Deprecated.
|
List<ConceptWord> |
findConcepts(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes)
Deprecated.
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired)
Deprecated.
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired,
int start,
int size)
Deprecated.
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes)
Deprecated.
|
List<Drug> |
findDrugs(String phrase,
boolean includeRetired)
Deprecated.
Use
getDrugs(String) |
List<ConceptProposal> |
findMatchingConceptProposals(String text)
Deprecated.
|
List<Concept> |
findProposedConcepts(String text)
Deprecated.
|
List<ConceptClass> |
getAllConceptClasses()
Return a list of concept classes currently in the database
|
List<ConceptClass> |
getAllConceptClasses(boolean includeRetired)
Return a list of concept classes currently in the database
|
List<ConceptDatatype> |
getAllConceptDatatypes()
Return a list of all concept datatypes currently in the database
|
List<ConceptDatatype> |
getAllConceptDatatypes(boolean includeRetired)
Return a list of concept datatypes currently in the database
|
List<ConceptNameTag> |
getAllConceptNameTags()
Get all the concept name tags defined in the database, included voided ones
|
List<ConceptProposal> |
getAllConceptProposals(boolean includeCompleted)
Get a List of all concept proposals
|
List<Concept> |
getAllConcepts()
Return a list of unretired concepts sorted by concept id ascending and
|
List<Concept> |
getAllConcepts(String sortBy,
boolean asc,
boolean includeRetired)
Return a list of concepts sorted on sortBy in dir direction (asc/desc)
|
List<ConceptSource> |
getAllConceptSources()
Return a list of concept sources currently in the database that are not voided
|
List<Drug> |
getAllDrugs()
Return a list of drugs currently in the database that are not retired
|
List<Drug> |
getAllDrugs(boolean includeRetired)
Get drugs by concept.
|
Concept |
getConcept(Integer conceptId)
Gets the concept with the given id
|
Concept |
getConcept(String conceptIdOrName)
Get Concept by id or name convenience method
|
ConceptAnswer |
getConceptAnswer(Integer conceptAnswerId)
Gets the ConceptAnswer with the given id
|
ConceptAnswer |
getConceptAnswerByUuid(String uuid)
Get ConceptAnswer by its UUID
|
List<ConceptWord> |
getConceptAnswers(String phrase,
Locale locale,
Concept concept)
Deprecated.
|
Concept |
getConceptByIdOrName(String idOrName)
Deprecated.
|
Concept |
getConceptByMapping(String code,
String sourceName)
Looks up a concept via
ConceptMap This will return the Concept which contains
a ConceptMap entry whose sourceCode is equal to the passed
conceptCode and whose ConceptSource has either a name or
hl7Code that is equal to the passed mappingCode . |
Concept |
getConceptByMapping(String code,
String sourceName,
Boolean includeRetired)
Looks up a concept via
ConceptMap This will return the Concept which contains
a ConceptMap entry whose sourceCode is equal to the passed
conceptCode and whose ConceptSource has either a name or
hl7Code that is equal to the passed mappingCode . |
Concept |
getConceptByName(String name)
Return a Concept that matches the name exactly
|
Concept |
getConceptByUuid(String uuid)
Get Concept by its UUID
|
ConceptClass |
getConceptClass(Integer i)
Return a Concept class matching the given identifier
|
ConceptClass |
getConceptClassByName(String name)
Return a Concept class matching the given name
|
ConceptClass |
getConceptClassByUuid(String uuid)
Get ConceptClass by its UUID
|
List<ConceptClass> |
getConceptClasses()
Deprecated.
|
ConceptComplex |
getConceptComplex(Integer conceptId)
Get a ComplexConcept with the given conceptId
|
ConceptDatatype |
getConceptDatatype(Integer i)
Return a ConceptDatatype matching the given identifier
|
ConceptDatatype |
getConceptDatatypeByName(String name)
Return a Concept datatype matching the given name
|
ConceptDatatype |
getConceptDatatypeByUuid(String uuid)
Get ConceptDatatype by its UUID
|
List<ConceptDatatype> |
getConceptDatatypes()
Deprecated.
|
List<ConceptDatatype> |
getConceptDatatypes(String name)
Find concept datatypes that contain the given name string
|
ConceptDescription |
getConceptDescriptionByUuid(String uuid)
Get ConceptDescription by its UUID
|
ConceptName |
getConceptName(Integer conceptNameId)
Gets the concept-name with the given id
|
ConceptName |
getConceptNameByUuid(String uuid)
Get ConceptName by its UUID
|
ConceptNameTag |
getConceptNameTag(Integer id)
Gets the
ConceptNameTag with the given database primary key |
ConceptNameTag |
getConceptNameTagByName(String tagName)
Search for a ConceptNameTag by name
|
ConceptNameTag |
getConceptNameTagByUuid(String uuid)
Get ConceptNameTag by its UUID
|
ConceptNumeric |
getConceptNumeric(Integer conceptId)
Get the ConceptNumeric with the given id
|
ConceptNumeric |
getConceptNumericByUuid(String uuid)
Get ConceptNumeric by its UUID
|
ConceptProposal |
getConceptProposal(Integer conceptProposalId)
Get a ConceptProposal by conceptProposalId
|
ConceptProposal |
getConceptProposalByUuid(String uuid)
Get ConceptProposal by its UUID
|
List<ConceptProposal> |
getConceptProposals(boolean includeCompleted)
Deprecated.
|
List<ConceptProposal> |
getConceptProposals(String cp)
Find matching concept proposals
|
List<ConceptSearchResult> |
getConcepts(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept,
Integer start,
Integer size)
Searches for concepts by the given parameters
|
List<ConceptSearchResult> |
getConcepts(String phrase,
Locale locale,
boolean includeRetired)
Searches for concepts with the given parameters
|
List<Concept> |
getConcepts(String sortBy,
String dir)
Deprecated.
|
List<Concept> |
getConceptsByAnswer(Concept concept)
Returns all possible Concepts to which this concept is a value-coded answer.
|
List<Concept> |
getConceptsByClass(ConceptClass cc) |
List<Concept> |
getConceptsByConceptSet(Concept c)
Return a List of all concepts within a concept set
|
List<ConceptMap> |
getConceptsByConceptSource(ConceptSource conceptSource)
Looks up a list of ConceptMaps for a given ConceptSource
|
List<Concept> |
getConceptsByMapping(String code,
String sourceName)
Looks up a concept via
ConceptMap This will return the list of concepts
Concept s which contain a ConceptMap entry whose sourceCode is
equal to the passed conceptCode and whose ConceptSource has either a
name or hl7Code that is equal to the passed
mappingCode |
List<Concept> |
getConceptsByMapping(String code,
String sourceName,
boolean includeRetired)
Looks up a concept via
ConceptMap This will return the list of Concept s which
contain a ConceptMap entry whose sourceCode is equal to the passed
conceptCode and whose ConceptSource has either a name or
hl7Code that is equal to the passed mappingCode . |
List<Concept> |
getConceptsByName(String name)
Returns a list of concepts matching any part of a concept name, this method is case
insensitive to the concept name string
|
List<Concept> |
getConceptsByName(String name,
Locale locale,
Boolean exactLocale)
Returns a list of concepts with the same name in the given locale.
|
ConceptSet |
getConceptSetByUuid(String uuid)
Get ConceptSet by its UUID
|
List<ConceptSet> |
getConceptSets(Concept c)
Deprecated.
|
List<ConceptSet> |
getConceptSetsByConcept(Concept concept)
Return a list of the concept sets with concept_set matching concept
|
List<Concept> |
getConceptsInSet(Concept c)
Deprecated.
|
ConceptSource |
getConceptSource(Integer conceptSourceId)
Return a Concept source matching the given concept source id
|
ConceptSource |
getConceptSourceByName(String conceptSourceName)
Lookup a ConceptSource by its name property
|
ConceptSource |
getConceptSourceByUuid(String uuid)
Get ConceptSource by its UUID
|
List<Concept> |
getConceptsWithDrugsInFormulary()
Convenience method for finding concepts associated with drugs in formulary.
|
List<ConceptWord> |
getConceptWords(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answerToConcept,
Integer start,
Integer size)
Deprecated.
|
List<ConceptWord> |
getConceptWords(String phrase,
Locale locale)
Deprecated.
|
Integer |
getCountOfConcepts(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept)
Return the number of concepts matching a search phrase and the specified arguments
|
Integer |
getCountOfDrugs(String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired)
Return the number of drugs with matching names or concept drug names
|
Drug |
getDrug(Integer drugId)
Get the Drug with the given id
|
Drug |
getDrug(String drugNameOrId)
Return the drug object corresponding to the given name or drugId
|
Drug |
getDrugByNameOrId(String drugNameOrId)
Deprecated.
use
getDrug(String) |
Drug |
getDrugByUuid(String uuid)
Get Drug by its UUID
|
List<Drug> |
getDrugs()
Deprecated.
use
getAllDrugs() |
List<Drug> |
getDrugs(boolean includeVoided)
Deprecated.
|
List<Drug> |
getDrugs(Concept concept)
Deprecated.
|
List<Drug> |
getDrugs(Concept concept,
boolean includeRetired)
Deprecated.
|
List<Drug> |
getDrugs(String phrase)
<<<<<<< HEAD
Find drugs in the system.
|
List<Drug> |
getDrugs(String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired,
Integer start,
Integer length)
Returns a list of drugs with matching names or concept drug names and returns a specific
number of them from the specified starting position.
|
List<Drug> |
getDrugsByConcept(Concept concept)
Return a list of drugs associated with the given concept
|
Concept |
getFalseConcept()
Returns the FALSE concept
|
Set<Locale> |
getLocalesOfConceptNames()
Gets the set of unique Locales used by existing concept names.
|
Integer |
getMaxConceptId()
Gets the highest concept-id used by a concept.
|
Concept |
getNextConcept(Concept c)
Finds the next concept in the dictionary that has the next largest concept id
|
Concept |
getPrevConcept(Concept c)
Finds the previous concept in the dictionary that has the next lowest concept id
|
List<Concept> |
getProposedConcepts(String text)
Find matching proposed concepts
|
List<Concept> |
getQuestionsForAnswer(Concept concept)
Deprecated.
|
List<ConceptSet> |
getSetsContainingConcept(Concept concept)
Find all sets that the given concept is a member of
|
Concept |
getTrueConcept()
Returns the TRUE concept
|
boolean |
hasAnyObservation(Concept concept)
Checks if there are any observations (including voided observations) for a concept.
|
boolean |
hasAnyObservation(ConceptName conceptName)
Checks if there are any observations (including voided observations) using a conceptName.
|
Concept |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept)
Maps a concept proposal to a concept
|
Concept |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept,
Locale locale)
Maps a concept proposal to a concept
|
void |
proposeConcept(ConceptProposal conceptProposal)
Deprecated.
|
void |
purgeConcept(Concept concept)
Completely purge a
Concept or ConceptNumeric from the database. |
void |
purgeConceptClass(ConceptClass cc)
Purge a ConceptClass
|
void |
purgeConceptDatatype(ConceptDatatype cd)
Purge a ConceptDatatype.
|
void |
purgeConceptProposal(ConceptProposal cp)
Removes a concept proposal from the database entirely.
|
ConceptSource |
purgeConceptSource(ConceptSource cs)
Delete ConceptSource
|
void |
purgeDrug(Drug drug)
Completely purge a Drug from the database.
|
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated.
|
Concept |
retireConcept(Concept concept,
String reason)
Retiring a concept essentially removes it from circulation
|
ConceptSource |
retireConceptSource(ConceptSource cs,
String reason)
This effectively removes a concept source from the database.
|
Drug |
retireDrug(Drug drug,
String reason)
Retiring a Drug essentially removes it from circulation
|
Concept |
saveConcept(Concept concept)
Save or update the given
Concept or ConceptNumeric in the database |
ConceptClass |
saveConceptClass(ConceptClass cc)
Creates or updates a concept class
|
ConceptDatatype |
saveConceptDatatype(ConceptDatatype cd)
Create or update a ConceptDatatype
|
ConceptNameTag |
saveConceptNameTag(ConceptNameTag nameTag)
Creates a new Concept name tag if none exists.
|
ConceptProposal |
saveConceptProposal(ConceptProposal conceptProposal)
Saves/updates/proposes a concept proposal
|
ConceptSource |
saveConceptSource(ConceptSource conceptSource)
Create a new ConceptSource
|
Drug |
saveDrug(Drug drug)
Save or update the given
Drug in the database. |
void |
setConceptDAO(ConceptDAO dao)
Sets the data access object for Concepts.
|
Drug |
unretireDrug(Drug drug)
Marks a drug that is currently retired as not retired.
|
void |
updateConcept(Concept concept)
Deprecated.
|
void |
updateConcept(ConceptNumeric concept)
Deprecated.
|
void |
updateConceptIndex(Concept concept)
Iterates over the words in names and synonyms (for each locale) and updates the concept
index, note that this only updates the index of the specified concept.
|
void |
updateConceptIndexes()
Iterates over all concepts and calls upddateConceptIndexes(Concept concept)
|
void |
updateConceptIndexes(Integer conceptIdStart,
Integer conceptIdEnd)
Iterates over all concepts with conceptIds between
conceptIdStart and
conceptIdEnd (inclusive) and calls updateConceptIndexes(concept) |
void |
updateConceptSetDerived()
Iterates over all concepts calling updateConceptSetDerived(concept)
|
void |
updateConceptSetDerived(Concept concept)
Updates the concept set derived business table for this concept (bursting the concept sets)
|
void |
updateConceptWord(Concept concept)
Deprecated.
|
void |
updateConceptWords()
Deprecated.
|
void |
updateConceptWords(Integer conceptIdStart,
Integer conceptIdEnd)
Deprecated.
|
void |
updateDrug(Drug drug)
Deprecated.
Use #saveDrug(Drug)
|
void |
voidConcept(Concept concept,
String reason)
Deprecated.
use
retireConcept(Concept, String) etireConcept |
protected List<ConceptWord> |
weightWords(String phrase,
List<Locale> locales,
List<ConceptWord> conceptWords)
This will weight and sort the concepts according to how many of the words in the name match
the words in the search phrase.
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
public static final String CONCEPT_WORD_UPDATE_TASK_NAME
public void setConceptDAO(ConceptDAO dao)
ConceptService
setConceptDAO
in interface ConceptService
dao
- The data access object to useConceptService.setConceptDAO(org.openmrs.api.db.ConceptDAO)
@Deprecated public void createConcept(Concept concept)
saveConcept(Concept)
createConcept
in interface ConceptService
@Deprecated public void createConcept(ConceptNumeric concept)
saveConcept(Concept)
createConcept
in interface ConceptService
@Deprecated public void updateConcept(Concept concept)
saveConcept(Concept)
updateConcept
in interface ConceptService
@Deprecated public void updateConcept(ConceptNumeric concept)
saveConcept(Concept)
updateConcept
in interface ConceptService
@Deprecated public void createDrug(Drug drug)
createDrug
in interface ConceptService
@Deprecated public void updateDrug(Drug drug)
updateDrug
in interface ConceptService
@Deprecated public void deleteConcept(Concept concept)
deleteConcept
in interface ConceptService
@Deprecated public void voidConcept(Concept concept, String reason)
retireConcept(Concept, String)
etireConceptvoidConcept
in interface ConceptService
public Concept saveConcept(Concept concept) throws APIException
ConceptService
Concept
or ConceptNumeric
in the database
If this is a new concept, the returned concept will have a new Concept.getConceptId()
inserted into it that was generated by the database
saveConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to save or updateConcept
or ConceptNumeric
that was saved or updatedAPIException
ConceptsLockedException
ConceptInUseException
ConceptService.saveConcept(org.openmrs.Concept)
public Drug saveDrug(Drug drug) throws APIException
ConceptService
Drug
in the database. If this is a new drug, the
returned drug object will have a new Drug.getDrugId()
inserted into it that was
generated by the databasesaveDrug
in interface ConceptService
drug
- The Drug to save or updateAPIException
ConceptService.saveDrug(org.openmrs.Drug)
public void purgeConcept(Concept concept) throws APIException
ConceptService
Concept
or ConceptNumeric
from the database.
This should not typically be used unless desperately needed. Most should just be retired. See
ConceptService.retireConcept(Concept, String)
purgeConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to
remove from the systemAPIException
ConceptService.purgeConcept(Concept)
public Concept retireConcept(Concept concept, String reason) throws APIException
ConceptService
retireConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to
retirereason
- The retire reasonConcept
or ConceptNumeric
APIException
ConceptService.retireConcept(org.openmrs.Concept, java.lang.String)
public Drug retireDrug(Drug drug, String reason) throws APIException
ConceptService
retireDrug
in interface ConceptService
drug
- The Drug to retirereason
- The retire reasonAPIException
ConceptService.retireDrug(org.openmrs.Drug, java.lang.String)
public Drug unretireDrug(Drug drug) throws APIException
ConceptService
unretireDrug
in interface ConceptService
drug
- that is current set as retiredAPIException
ConceptService.unretireDrug(org.openmrs.Drug)
public void purgeDrug(Drug drug) throws APIException
ConceptService
purgeDrug
in interface ConceptService
drug
- The Drug to remove from the systemAPIException
ConceptService.purgeDrug(org.openmrs.Drug)
public Concept getConcept(Integer conceptId) throws APIException
ConceptService
getConcept
in interface ConceptService
APIException
ConceptService.getConcept(java.lang.Integer)
public ConceptName getConceptName(Integer conceptNameId) throws APIException
ConceptService
getConceptName
in interface ConceptService
APIException
ConceptService.getConceptName(java.lang.Integer)
public ConceptAnswer getConceptAnswer(Integer conceptAnswerId) throws APIException
ConceptService
getConceptAnswer
in interface ConceptService
APIException
ConceptService.getConceptAnswer(java.lang.Integer)
public Drug getDrug(Integer drugId) throws APIException
ConceptService
getDrug
in interface ConceptService
APIException
ConceptService.getDrug(java.lang.Integer)
public ConceptNumeric getConceptNumeric(Integer conceptId) throws APIException
ConceptService
getConceptNumeric
in interface ConceptService
conceptId
- The ConceptNumeric idAPIException
ConceptService.getConceptNumeric(java.lang.Integer)
public ConceptComplex getConceptComplex(Integer conceptId)
ConceptService
getConceptComplex
in interface ConceptService
conceptId
- of the ComplexConceptConceptService.getConceptComplex(java.lang.Integer)
public List<Concept> getAllConcepts() throws APIException
ConceptService
getAllConcepts
in interface ConceptService
APIException
ConceptService.getAllConcepts()
public List<Concept> getAllConcepts(String sortBy, boolean asc, boolean includeRetired) throws APIException
ConceptService
getAllConcepts
in interface ConceptService
sortBy
- The property name to sort by; if null or invalid, concept_id is used.asc
- true = sort ascending; false = sort descendingincludeRetired
- If true
, retired concepts will also be returnedAPIException
ConceptService.getAllConcepts(java.lang.String, boolean, boolean)
@Deprecated public List<Concept> getConcepts(String sortBy, String dir) throws APIException
getAllConcepts(String, boolean, boolean)
getConcepts
in interface ConceptService
APIException
public List<Concept> getConceptsByName(String name) throws APIException
ConceptService
getConceptsByName
in interface ConceptService
name
- The search stringAPIException
ConceptService.getConceptsByName(java.lang.String)
public Concept getConceptByName(String name)
ConceptService
getConceptByName
in interface ConceptService
name
- The search stringConceptService.getConceptByName(java.lang.String)
@Deprecated public Concept getConceptByIdOrName(String idOrName)
getConcept(String)
ConceptService
Note: this just calls other impl methods; no DAO of its own
getConceptByIdOrName
in interface ConceptService
ConceptService.getConceptByIdOrName(java.lang.String)
public Concept getConcept(String conceptIdOrName)
ConceptService
getConcept
in interface ConceptService
ConceptService.getConcept(java.lang.String)
@Deprecated public List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answerToConcept, Integer start, Integer size)
getConceptWords
in interface ConceptService
ConceptService.getConcepts(String, List, boolean, List, List, List, List, Concept,
Integer, Integer)
@Deprecated public List<ConceptWord> getConceptWords(String phrase, Locale locale) throws APIException
getConceptWords
in interface ConceptService
APIException
ConceptService.getConceptWords(String, Locale)
@Deprecated public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, int start, int size)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean, int, int)
@Deprecated public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean)
@Deprecated public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean, List, List, List, List)
@Deprecated public List<ConceptWord> findConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, List, boolean, List, List, List, List)
public Drug getDrug(String drugNameOrId)
ConceptService
getDrug
in interface ConceptService
drugNameOrId
- String name or drugId to match exactly onConceptService.getDrug(java.lang.String)
@Deprecated public Drug getDrugByNameOrId(String drugNameOrId)
getDrug(String)
ConceptService
getDrugByNameOrId
in interface ConceptService
drugNameOrId
- StringConceptService.getDrugByNameOrId(java.lang.String)
@Deprecated public List<Drug> getDrugs()
getAllDrugs()
getDrugs
in interface ConceptService
public List<Drug> getAllDrugs()
ConceptService
getAllDrugs
in interface ConceptService
ConceptService.getAllDrugs()
public List<Drug> getAllDrugs(boolean includeRetired)
ConceptService
getAllDrugs
in interface ConceptService
includeRetired
- If true
then the search will include voided DrugsConceptService.getAllDrugs(boolean)
@Deprecated public List<Drug> getDrugs(Concept concept)
getDrugsByConcept(Concept)
getDrugs
in interface ConceptService
ConceptService.getDrugs(org.openmrs.Concept)
public List<Drug> getDrugsByConcept(Concept concept)
ConceptService
getDrugsByConcept
in interface ConceptService
ConceptService.getDrugsByConcept(org.openmrs.Concept)
@Deprecated public List<Drug> getDrugs(Concept concept, boolean includeRetired)
getDrugsByConcept(Concept)
ConceptService.getDrugs(Concept)
@Deprecated public List<Drug> getDrugs(boolean includeVoided)
getAllDrugs(boolean)
ConceptService.getAllDrugs(boolean)
@Deprecated public List<Drug> findDrugs(String phrase, boolean includeRetired)
getDrugs(String)
findDrugs
in interface ConceptService
ConceptService.findDrugs(java.lang.String, boolean)
public List<Drug> getDrugs(String phrase)
ConceptService
getDrugs
in interface ConceptService
phrase
- Search phraseConceptService.getDrugs(java.lang.String)
public List<Concept> getConceptsByClass(ConceptClass cc)
getConceptsByClass
in interface ConceptService
cc
- ConceptClassConceptService.getConceptsByClass(org.openmrs.ConceptClass)
@Deprecated public List<ConceptClass> getConceptClasses()
ConceptService
getConceptClasses
in interface ConceptService
ConceptService.getConceptClasses()
public List<ConceptClass> getAllConceptClasses(boolean includeRetired)
ConceptService
getAllConceptClasses
in interface ConceptService
includeRetired
- include retired concept classes in the search results?ConceptService.getAllConceptClasses(boolean)
public ConceptClass getConceptClass(Integer i)
ConceptService
getConceptClass
in interface ConceptService
i
- the concept class identifierConceptService.getConceptClass(java.lang.Integer)
public ConceptClass getConceptClassByName(String name)
ConceptService
getConceptClassByName
in interface ConceptService
ConceptService.getConceptClassByName(java.lang.String)
public List<ConceptClass> getAllConceptClasses() throws APIException
ConceptService
getAllConceptClasses
in interface ConceptService
APIException
ConceptService.getAllConceptClasses(boolean)
public ConceptClass saveConceptClass(ConceptClass cc) throws APIException
ConceptService
saveConceptClass
in interface ConceptService
cc
- ConceptClass to create or updateAPIException
ConceptService.saveConceptClass(org.openmrs.ConceptClass)
public void purgeConceptClass(ConceptClass cc)
ConceptService
purgeConceptClass
in interface ConceptService
cc
- ConceptClass to deleteConceptService.purgeConceptClass(org.openmrs.ConceptClass)
public void purgeConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService
purgeConceptDatatype
in interface ConceptService
cd
- ConceptDatatype to purgeAPIException
ConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)
public ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService
saveConceptDatatype
in interface ConceptService
cd
- ConceptDatatype to create or updateAPIException
ConceptService.saveConceptDatatype(org.openmrs.ConceptDatatype)
@Deprecated public List<ConceptDatatype> getConceptDatatypes()
getAllConceptDatatypes()
ConceptService.getAllConceptDatatypes()
public List<ConceptDatatype> getAllConceptDatatypes()
ConceptService
getAllConceptDatatypes
in interface ConceptService
ConceptService.getAllConceptDatatypes()
public List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws APIException
ConceptService
getAllConceptDatatypes
in interface ConceptService
includeRetired
- boolean - include the retired datatypes?APIException
ConceptService.getAllConceptDatatypes(boolean)
public ConceptDatatype getConceptDatatype(Integer i)
ConceptService
getConceptDatatype
in interface ConceptService
i
- Integer for the requested ConceptDatatypeConceptService.getConceptDatatype(java.lang.Integer)
public List<ConceptDatatype> getConceptDatatypes(String name)
ConceptService
getConceptDatatypes
in interface ConceptService
ConceptService.getConceptDatatypes(java.lang.String)
public ConceptDatatype getConceptDatatypeByName(String name)
ConceptService
getConceptDatatypeByName
in interface ConceptService
ConceptService.getConceptDatatypeByName(java.lang.String)
public void updateConceptSetDerived(Concept concept) throws APIException
ConceptService
updateConceptSetDerived
in interface ConceptService
APIException
ConceptService.updateConceptSetDerived(org.openmrs.Concept)
public void updateConceptSetDerived() throws APIException
ConceptService
updateConceptSetDerived
in interface ConceptService
APIException
ConceptService.updateConceptSetDerived()
@Deprecated public List<ConceptSet> getConceptSets(Concept c)
getConceptSetsByConcept(Concept)
getConceptSets
in interface ConceptService
ConceptService.getConceptSets(org.openmrs.Concept)
public List<ConceptSet> getConceptSetsByConcept(Concept concept) throws APIException
ConceptService
For example to find all concepts for ARVs, you would do getConceptSets(getConcept("ANTIRETROVIRAL MEDICATIONS")) and then take the conceptIds from the resulting list.
getConceptSetsByConcept
in interface ConceptService
concept
- The concept representing the concept setAPIException
ConceptService.getConceptSetsByConcept(org.openmrs.Concept)
@Deprecated public List<Concept> getConceptsInSet(Concept c)
getConceptsByConceptSet(Concept)
getConceptsInSet
in interface ConceptService
ConceptService.getConceptsInSet(org.openmrs.Concept)
public List<Concept> getConceptsByConceptSet(Concept c)
ConceptService
getConceptsByConceptSet
in interface ConceptService
c
- The concept representing the concept setConceptService.getConceptsInSet(org.openmrs.Concept)
public List<ConceptSet> getSetsContainingConcept(Concept concept)
ConceptService
getSetsContainingConcept
in interface ConceptService
ConceptService.getSetsContainingConcept(org.openmrs.Concept)
public ConceptProposal getConceptProposal(Integer conceptProposalId)
ConceptService
getConceptProposal
in interface ConceptService
conceptProposalId
- the Integer concept proposal IdConceptService.getConceptProposal(java.lang.Integer)
@Deprecated public List<ConceptProposal> getConceptProposals(boolean includeCompleted)
getAllConceptProposals(boolean)
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(boolean)
public List<ConceptProposal> getAllConceptProposals(boolean includeCompleted)
ConceptService
getAllConceptProposals
in interface ConceptService
includeCompleted
- boolean - include completed proposals as well?ConceptService.getAllConceptProposals(boolean)
public List<ConceptProposal> getConceptProposals(String cp)
ConceptService
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(java.lang.String)
@Deprecated public List<Concept> findProposedConcepts(String text)
findProposedConcepts
in interface ConceptService
ConceptService.findProposedConcepts(java.lang.String)
public List<Concept> getProposedConcepts(String text)
ConceptService
getProposedConcepts
in interface ConceptService
ConceptService.getProposedConcepts(java.lang.String)
@Deprecated public void proposeConcept(ConceptProposal conceptProposal)
proposeConcept
in interface ConceptService
ConceptService.proposeConcept(org.openmrs.ConceptProposal)
public ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException
ConceptService
saveConceptProposal
in interface ConceptService
conceptProposal
- The ConceptProposal to saveAPIException
ConceptService.saveConceptProposal(org.openmrs.ConceptProposal)
public void purgeConceptProposal(ConceptProposal cp) throws APIException
ConceptService
purgeConceptProposal
in interface ConceptService
APIException
ConceptService.purgeConceptProposal(org.openmrs.ConceptProposal)
public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
ConceptService
mapConceptProposalToConcept
in interface ConceptService
APIException
ConceptService.mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept)
public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept, Locale locale) throws APIException
ConceptService
mapConceptProposalToConcept
in interface ConceptService
locale
- of concept proposalAPIException
ConceptService.mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept, java.util.Locale)
@Deprecated public void rejectConceptProposal(ConceptProposal cp)
ConceptProposal.rejectConceptProposal()
rejectConceptProposal
in interface ConceptService
ConceptService.rejectConceptProposal(org.openmrs.ConceptProposal)
@Deprecated public List<ConceptProposal> findMatchingConceptProposals(String text)
getConceptProposals(String)
findMatchingConceptProposals
in interface ConceptService
ConceptService.findMatchingConceptProposals(String text)
@Deprecated public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concept concept, boolean includeRetired)
findConceptAnswers
in interface ConceptService
ConceptService.findConceptAnswers(String, Locale, Concept, boolean)
@Deprecated public List<ConceptWord> getConceptAnswers(String phrase, Locale locale, Concept concept) throws APIException
getConceptAnswers
in interface ConceptService
APIException
ConceptService.findConceptAnswers(String, Locale, Concept)
@Deprecated public List<Concept> getQuestionsForAnswer(Concept concept)
getConceptsByAnswer(Concept)
getQuestionsForAnswer
in interface ConceptService
ConceptService.getQuestionsForAnswer(org.openmrs.Concept)
public List<Concept> getConceptsByAnswer(Concept concept) throws APIException
ConceptService
getConceptsByAnswer
in interface ConceptService
APIException
ConceptService.getConceptsByAnswer(org.openmrs.Concept)
public Concept getPrevConcept(Concept c)
ConceptService
getPrevConcept
in interface ConceptService
c
- the offset ConceptConceptService.getPrevConcept(org.openmrs.Concept)
public Concept getNextConcept(Concept c)
ConceptService
getNextConcept
in interface ConceptService
c
- the offset ConceptConceptService.getNextConcept(org.openmrs.Concept)
public void checkIfLocked() throws ConceptsLockedException
ConceptService
checkIfLocked
in interface ConceptService
ConceptsLockedException
ConceptService.checkIfLocked()
public List<Concept> getConceptsWithDrugsInFormulary()
ConceptService
getConceptsWithDrugsInFormulary
in interface ConceptService
ConceptService.getConceptsWithDrugsInFormulary()
@Deprecated public void updateConceptWords() throws APIException
updateConceptWords
in interface ConceptService
APIException
ConceptService.updateConceptWords()
@Deprecated public void updateConceptWord(Concept concept) throws APIException
updateConceptWord
in interface ConceptService
APIException
ConceptService.updateConceptWord(org.openmrs.Concept)
@Deprecated public void updateConceptWords(Integer conceptIdStart, Integer conceptIdEnd) throws APIException
updateConceptWords
in interface ConceptService
APIException
ConceptService.updateConceptWords(java.lang.Integer, java.lang.Integer)
public Integer getMaxConceptId()
ConceptService
getMaxConceptId
in interface ConceptService
ConceptService.getMaxConceptId()
protected List<ConceptWord> weightWords(String phrase, List<Locale> locales, List<ConceptWord> conceptWords)
phrase
- that was used to get this searchlocales
- ListconceptWords
- the words that were found via a db search and now must be weighted before
being shown to the userConceptWord
spublic ConceptNameTag getConceptNameTagByName(String tagName)
ConceptService
getConceptNameTagByName
in interface ConceptService
tagName
- String name of ConceptNameTagConceptService.getConceptNameTagByName(java.lang.String)
public Set<Locale> getLocalesOfConceptNames()
ConceptService
getLocalesOfConceptNames
in interface ConceptService
ConceptService.getLocalesOfConceptNames()
public ConceptSource getConceptSource(Integer conceptSourceId)
ConceptService
getConceptSource
in interface ConceptService
conceptSourceId
- Integer conceptSourceIdConceptService.getConceptSource(java.lang.Integer)
public List<ConceptSource> getAllConceptSources()
ConceptService
getAllConceptSources
in interface ConceptService
ConceptService.getAllConceptSources()
public ConceptSource purgeConceptSource(ConceptSource cs) throws APIException
ConceptService
purgeConceptSource
in interface ConceptService
cs
- ConceptSource object deleteAPIException
ConceptService.purgeConceptSource(org.openmrs.ConceptSource)
public ConceptSource retireConceptSource(ConceptSource cs, String reason) throws APIException
ConceptService
retireConceptSource
in interface ConceptService
cs
- the concept source to retirereason
- why the concept source is to be retired, must not be empty of nullAPIException
ConceptService.retireConceptSource(org.openmrs.ConceptSource,String)
public ConceptSource saveConceptSource(ConceptSource conceptSource) throws APIException
ConceptService
saveConceptSource
in interface ConceptService
conceptSource
- ConceptSource to createAPIException
ConceptService.saveConceptSource(org.openmrs.ConceptSource)
public ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
ConceptService
saveConceptNameTag
in interface ConceptService
nameTag
- the concept name tag to be savedConceptService.saveConceptNameTag(org.openmrs.ConceptNameTag)
public Iterator<Concept> conceptIterator()
ConceptService
conceptIterator
in interface ConceptService
ConceptService.conceptIterator()
public Concept getConceptByUuid(String uuid)
ConceptService
getConceptByUuid
in interface ConceptService
ConceptService.getConceptByUuid(java.lang.String)
public ConceptClass getConceptClassByUuid(String uuid)
ConceptService
getConceptClassByUuid
in interface ConceptService
ConceptService.getConceptClassByUuid(java.lang.String)
public ConceptAnswer getConceptAnswerByUuid(String uuid)
ConceptService
getConceptAnswerByUuid
in interface ConceptService
public ConceptName getConceptNameByUuid(String uuid)
ConceptService
getConceptNameByUuid
in interface ConceptService
public ConceptSet getConceptSetByUuid(String uuid)
ConceptService
getConceptSetByUuid
in interface ConceptService
public ConceptSource getConceptSourceByUuid(String uuid)
ConceptService
getConceptSourceByUuid
in interface ConceptService
public ConceptDatatype getConceptDatatypeByUuid(String uuid)
ConceptService
getConceptDatatypeByUuid
in interface ConceptService
ConceptService.getConceptDatatypeByUuid(java.lang.String)
public ConceptNumeric getConceptNumericByUuid(String uuid)
ConceptService
getConceptNumericByUuid
in interface ConceptService
ConceptService.getConceptNumericByUuid(java.lang.String)
public ConceptProposal getConceptProposalByUuid(String uuid)
ConceptService
getConceptProposalByUuid
in interface ConceptService
ConceptService.getConceptProposalByUuid(java.lang.String)
public Drug getDrugByUuid(String uuid)
ConceptService
getDrugByUuid
in interface ConceptService
ConceptService.getDrugByUuid(java.lang.String)
public ConceptDescription getConceptDescriptionByUuid(String uuid)
ConceptService
getConceptDescriptionByUuid
in interface ConceptService
ConceptService.getConceptDescriptionByUuid(java.lang.String)
public ConceptNameTag getConceptNameTagByUuid(String uuid)
ConceptService
getConceptNameTagByUuid
in interface ConceptService
ConceptService.getConceptNameTagByUuid(java.lang.String)
public List<ConceptNameTag> getAllConceptNameTags()
ConceptService
getAllConceptNameTags
in interface ConceptService
ConceptService.getAllConceptNameTags()
public ConceptNameTag getConceptNameTag(Integer id)
ConceptService
ConceptNameTag
with the given database primary keygetConceptNameTag
in interface ConceptService
id
- the concept name tag id to findConceptNameTag
or null if none foundConceptService.getConceptNameTag(java.lang.Integer)
public Concept getConceptByMapping(String code, String sourceName) throws APIException
ConceptService
ConceptMap
This will return the Concept
which contains
a ConceptMap
entry whose sourceCode
is equal to the passed
conceptCode
and whose ConceptSource
has either a name
or
hl7Code
that is equal to the passed mappingCode
. Delegates to
getConceptByMapping(code,sourceName,includeRetired) with includeRetired=truegetConceptByMapping
in interface ConceptService
code
- the code associated with a concept within a given ConceptSource
sourceName
- the name or hl7Code of the ConceptSource
to checkConcept
that has the given mapping, or null if no Concept
foundAPIException
ConceptService.getConceptByMapping(java.lang.String, java.lang.String)
public Concept getConceptByMapping(String code, String sourceName, Boolean includeRetired) throws APIException
ConceptService
ConceptMap
This will return the Concept
which contains
a ConceptMap
entry whose sourceCode
is equal to the passed
conceptCode
and whose ConceptSource
has either a name
or
hl7Code
that is equal to the passed mappingCode
. Operates under
the assumption that each mappingCode in a ConceptSource
references one and only one
non-retired {@link Concept): if the underlying dao method returns more than one non-retired concept, this
method will throw an exception; if the underlying dao method returns more than one concept, but
only one non-retired concept, this method will return the non-retired concept; if the dao only
returns retired concepts, this method will simply return the first concept in the list returns by
the dao method; retired concepts can be excluded by setting the includeRetired parameter to false,
but the above logic still appliesgetConceptByMapping
in interface ConceptService
code
- the code associated with a concept within a given ConceptSource
sourceName
- the name or hl7Code of the ConceptSource
to checkincludeRetired
- whether or not to include retired conceptsConcept
that has the given mapping, or null if no Concept
foundAPIException
ConceptService.getConceptByMapping(java.lang.String, java.lang.String,
java.lang.Boolean)
public List<Concept> getConceptsByMapping(String code, String sourceName) throws APIException
ConceptService
ConceptMap
This will return the list of concepts
Concept
s which contain a ConceptMap
entry whose sourceCode
is
equal to the passed conceptCode
and whose ConceptSource
has either a
name
or hl7Code
that is equal to the passed
mappingCode
getConceptsByMapping
in interface ConceptService
code
- the code associated with a concept within a given ConceptSource
sourceName
- the name or hl7Code of the ConceptSource
to checkConcept
s that has the given mapping, or null if no
Concept
foundAPIException
- if the specified source+code maps to more than one conceptConceptService
public List<Concept> getConceptsByMapping(String code, String sourceName, boolean includeRetired) throws APIException
ConceptService
ConceptMap
This will return the list of Concept
s which
contain a ConceptMap
entry whose sourceCode
is equal to the passed
conceptCode
and whose ConceptSource
has either a name
or
hl7Code
that is equal to the passed mappingCode
. Delegates to
getConceptsByMapping(code,sourceName,includeRetired) with includeRetired=truegetConceptsByMapping
in interface ConceptService
code
- the code associated with a concept within a given ConceptSource
sourceName
- the name or hl7Code of the ConceptSource
to checkincludeRetired
- whether or not to include retired conceptsConcept
s that has the given mapping, or null if no
Concept
foundAPIException
- if the specified source+code maps to more than one conceptConceptService
public Concept getFalseConcept()
ConceptService
getFalseConcept
in interface ConceptService
ConceptService.getFalseConcept()
public Concept getTrueConcept()
ConceptService
getTrueConcept
in interface ConceptService
ConceptService.getTrueConcept()
public List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
ConceptService
getConceptsByConceptSource
in interface ConceptService
APIException
ConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)
public ConceptSource getConceptSourceByName(String conceptSourceName) throws APIException
ConceptService
getConceptSourceByName
in interface ConceptService
APIException
ConceptService.getConceptSourceByName(java.lang.String)
public boolean hasAnyObservation(Concept concept)
ConceptService
hasAnyObservation
in interface ConceptService
concept
- which used or not used by an observationConceptService.hasAnyObservation(org.openmrs.Concept)
public void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException
ConceptService
convertBooleanConceptToCoded
in interface ConceptService
conceptToChange
- the concept which to changeAPIException
ConceptService.convertBooleanConceptToCoded(org.openmrs.Concept)
public boolean hasAnyObservation(ConceptName conceptName) throws APIException
ConceptService
hasAnyObservation
in interface ConceptService
conceptName
- which is used or not used by an observationAPIException
ConceptService.hasAnyObservation(org.openmrs.ConceptName)
public List<ConceptSearchResult> findConceptAnswers(String phrase, Locale locale, Concept concept) throws APIException
ConceptService
findConceptAnswers
in interface ConceptService
concept
- the answers to match onAPIException
ConceptService.findConceptAnswers(String, Locale, Concept)
public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size) throws APIException
ConceptService
getConcepts
in interface ConceptService
phrase
- matched to the start of any word in any of the names of a conceptlocales
- ListincludeRetired
- boolean if false, will exclude retired conceptsrequireClasses
- ListexcludeClasses
- ListrequireDatatypes
- ListexcludeDatatypes
- ListanswersToConcept
- all results will be a possible answer to this conceptstart
- all results less than this number will be removedsize
- if non zero, all results after start
+ size
will be
removedAPIException
ConceptService.getConcepts(String, List, boolean, List, List, List, List, Concept,
Integer, Integer)
public void updateConceptIndexes(Integer conceptIdStart, Integer conceptIdEnd) throws APIException
ConceptService
conceptIdStart
and
conceptIdEnd
(inclusive) and calls updateConceptIndexes(concept)updateConceptIndexes
in interface ConceptService
conceptIdStart
- starts update with this concept_idconceptIdEnd
- ends update with this concept_idAPIException
ConceptService.updateConceptIndexes(Integer, Integer)
public void updateConceptIndex(Concept concept) throws APIException
ConceptService
ConceptService.updateConceptIndexes()
if you wish to update the entire concept index.updateConceptIndex
in interface ConceptService
concept
- the concept whose index is to be updatedAPIException
ConceptService#updateConceptNameIndex(Concept)
public void updateConceptIndexes() throws APIException
ConceptService
updateConceptIndexes
in interface ConceptService
APIException
ConceptService#updateConceptNameIndexes()
public Integer getCountOfConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept)
ConceptService
getCountOfConcepts
in interface ConceptService
phrase
- matched to the start of any word in any of the names of a conceptlocales
- ListincludeRetired
- Specifies whether to include retired conceptsrequireClasses
- ListexcludeClasses
- ListrequireDatatypes
- ListexcludeDatatypes
- ListanswersToConcept
- all results will be a possible answer to this conceptConceptService.getCountOfConcepts(String, List, boolean, List, List, List, List,
Concept)
public Integer getCountOfDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired) throws APIException
ConceptService
getCountOfDrugs
in interface ConceptService
drugName
- the name of the drugconcept
- the drug conceptsearchOnPhrase
- Specifies if the search should match names starting with or contain the
textsearchDrugConceptNames
- Specifies whether a search on concept names for the drug's
concept should be done or notincludeRetired
- specifies whether to include retired drugsAPIException
ConceptService.getCountOfDrugs(String, Concept, boolean, boolean, boolean)
public List<Drug> getDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired, Integer start, Integer length) throws APIException
ConceptService
getDrugs
in interface ConceptService
drugName
- the name of the drugconcept
- the drug conceptsearchOnPhrase
- Specifies if the search should match names starting with or contain the
textsearchDrugConceptNames
- Specifies whether a search on concept names for the drug's
concept should be done or notincludeRetired
- specifies whether to include retired drugsstart
- beginning index for the batchlength
- number of drugs to return in the batchAPIException
ConceptService.getDrugs(String, Concept, boolean, boolean, boolean, Integer, Integer)
public List<ConceptSearchResult> getConcepts(String phrase, Locale locale, boolean includeRetired) throws APIException
ConceptService
getConcepts
in interface ConceptService
phrase
- the string to search againstlocale
- the locale in which to search for the conceptsincludeRetired
- Specifies whether to include retired conceptsAPIException
ConceptService.getConcepts(String, Locale, boolean)
public List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale) throws APIException
ConceptService
This method is case insensitive. It searches for exactly matching names and close matching locales (if exactLocale = false). It considers only non-voided names and all concepts.
getConceptsByName
in interface ConceptService
locale
- null
= all localesexactLocale
- false
if search for both global and country specific, true
if null
APIException
ConceptService.getConceptsByName(java.lang.String, java.util.Locale, java.lang.Boolean)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.