public class ConceptServiceImpl extends BaseOpenmrsService implements ConceptService
to access these methods
Modifier and Type | Field and Description |
---|---|
static java.lang.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
|
java.util.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)
|
void |
deleteConceptStopWord(java.lang.Integer conceptStopWordId)
Delete the given
ConceptStopWord in the database |
java.util.List<ConceptSearchResult> |
findConceptAnswers(java.lang.String phrase,
java.util.Locale locale,
Concept concept)
Finds concepts that are possible value coded answers to concept parameter
|
java.util.List<ConceptWord> |
findConceptAnswers(java.lang.String phrase,
java.util.Locale locale,
Concept concept,
boolean includeRetired)
Deprecated.
|
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes)
Deprecated.
|
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired)
Deprecated.
|
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired,
int start,
int size)
Deprecated.
|
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes)
Deprecated.
|
java.util.List<Drug> |
findDrugs(java.lang.String phrase,
boolean includeRetired)
Deprecated.
Use
getDrugs(String) |
java.util.List<ConceptProposal> |
findMatchingConceptProposals(java.lang.String text)
Deprecated.
|
java.util.List<Concept> |
findProposedConcepts(java.lang.String text)
Deprecated.
|
java.util.List<ConceptMapType> |
getActiveConceptMapTypes()
Returns a list of concept map types currently in the database excluding hidden ones
|
java.util.List<ConceptClass> |
getAllConceptClasses()
Return a list of concept classes currently in the database
|
java.util.List<ConceptClass> |
getAllConceptClasses(boolean includeRetired)
Return a list of concept classes currently in the database
|
java.util.List<ConceptDatatype> |
getAllConceptDatatypes()
Return a list of all concept datatypes currently in the database
|
java.util.List<ConceptDatatype> |
getAllConceptDatatypes(boolean includeRetired)
Return a list of concept datatypes currently in the database
|
java.util.List<ConceptNameTag> |
getAllConceptNameTags()
Get all the concept name tags defined in the database, included voided ones
|
java.util.List<ConceptProposal> |
getAllConceptProposals(boolean includeCompleted)
Get a List of all concept proposals
|
java.util.List<ConceptReferenceTerm> |
getAllConceptReferenceTerms()
Gets a list of all concept reference terms saved in the database
|
java.util.List<Concept> |
getAllConcepts()
Return a list of unretired concepts sorted by concept id ascending and
|
java.util.List<Concept> |
getAllConcepts(java.lang.String sortBy,
boolean asc,
boolean includeRetired)
Return a list of concepts sorted on sortBy in dir direction (asc/desc)
|
java.util.List<ConceptSource> |
getAllConceptSources()
Return a list of concept sources currently in the database that are not voided
|
java.util.List<ConceptStopWord> |
getAllConceptStopWords()
Get all the concept stop words
|
java.util.List<Drug> |
getAllDrugs()
Return a list of drugs currently in the database that are not retired
|
java.util.List<Drug> |
getAllDrugs(boolean includeRetired)
Get drugs by concept.
|
Concept |
getConcept(java.lang.Integer conceptId)
Gets the concept with the given id
|
Concept |
getConcept(java.lang.String conceptIdOrName)
Get Concept by id or name convenience method
|
ConceptAnswer |
getConceptAnswer(java.lang.Integer conceptAnswerId)
Gets the ConceptAnswer with the given id
|
ConceptAnswer |
getConceptAnswerByUuid(java.lang.String uuid)
Get ConceptAnswer by its UUID
|
java.util.List<ConceptWord> |
getConceptAnswers(java.lang.String phrase,
java.util.Locale locale,
Concept concept)
Deprecated.
|
Concept |
getConceptByIdOrName(java.lang.String idOrName)
Deprecated.
|
Concept |
getConceptByMapping(java.lang.String code,
java.lang.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(java.lang.String code,
java.lang.String sourceName,
java.lang.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(java.lang.String name)
Return a Concept that matches the name exactly
|
Concept |
getConceptByUuid(java.lang.String uuid)
Get Concept by its UUID
|
ConceptClass |
getConceptClass(java.lang.Integer i)
Return a Concept class matching the given identifier
|
ConceptClass |
getConceptClassByName(java.lang.String name)
Return a Concept class matching the given name
|
ConceptClass |
getConceptClassByUuid(java.lang.String uuid)
Get ConceptClass by its UUID
|
java.util.List<ConceptClass> |
getConceptClasses()
Deprecated.
|
ConceptComplex |
getConceptComplex(java.lang.Integer conceptId)
Get a ComplexConcept with the given conceptId
|
ConceptDatatype |
getConceptDatatype(java.lang.Integer i)
Return a ConceptDatatype matching the given identifier
|
ConceptDatatype |
getConceptDatatypeByName(java.lang.String name)
Return a Concept datatype matching the given name
|
ConceptDatatype |
getConceptDatatypeByUuid(java.lang.String uuid)
Get ConceptDatatype by its UUID
|
java.util.List<ConceptDatatype> |
getConceptDatatypes()
Deprecated.
|
java.util.List<ConceptDatatype> |
getConceptDatatypes(java.lang.String name)
Find concept datatypes that contain the given name string
|
ConceptDescription |
getConceptDescriptionByUuid(java.lang.String uuid)
Get ConceptDescription by its UUID
|
java.util.List<ConceptMap> |
getConceptMappingsToSource(ConceptSource conceptSource)
Returns a list of mappings from concepts to terms in the given reference terminology
|
ConceptMapType |
getConceptMapType(java.lang.Integer conceptMapTypeId)
Return a concept map type matching the given concept map type id
|
ConceptMapType |
getConceptMapTypeByName(java.lang.String name)
Return a concept map type matching the given name
|
ConceptMapType |
getConceptMapTypeByUuid(java.lang.String uuid)
Return a concept map type matching the given uuid
|
java.util.List<ConceptMapType> |
getConceptMapTypes(boolean includeRetired,
boolean includeHidden)
Returns a list of concept map types currently in the database including or excluding retired
and hidden ones as specified by the includeRetired and includeHidden arguments
|
ConceptName |
getConceptName(java.lang.Integer conceptNameId)
Gets the concept-name with the given id
|
ConceptName |
getConceptNameByUuid(java.lang.String uuid)
Get ConceptName by its UUID
|
ConceptNameTag |
getConceptNameTag(java.lang.Integer id)
Gets the
ConceptNameTag with the given database primary key |
ConceptNameTag |
getConceptNameTagByName(java.lang.String tagName)
Search for a ConceptNameTag by name
|
ConceptNameTag |
getConceptNameTagByUuid(java.lang.String uuid)
Get ConceptNameTag by its UUID
|
ConceptNumeric |
getConceptNumeric(java.lang.Integer conceptId)
Get the ConceptNumeric with the given id
|
ConceptNumeric |
getConceptNumericByUuid(java.lang.String uuid)
Get ConceptNumeric by its UUID
|
ConceptProposal |
getConceptProposal(java.lang.Integer conceptProposalId)
Get a ConceptProposal by conceptProposalId
|
ConceptProposal |
getConceptProposalByUuid(java.lang.String uuid)
Get ConceptProposal by its UUID
|
java.util.List<ConceptProposal> |
getConceptProposals(boolean includeCompleted)
Deprecated.
|
java.util.List<ConceptProposal> |
getConceptProposals(java.lang.String cp)
Find matching concept proposals
|
ConceptReferenceTerm |
getConceptReferenceTerm(java.lang.Integer conceptReferenceTermId)
Gets the concept reference term with the specified concept reference term id
|
ConceptReferenceTerm |
getConceptReferenceTermByCode(java.lang.String code,
ConceptSource conceptSource)
Gets a concept reference term with the specified code from the specified concept source
|
ConceptReferenceTerm |
getConceptReferenceTermByName(java.lang.String name,
ConceptSource conceptSource)
Gets a concept reference term with the specified name from the specified concept source
ignoring all retired ones
|
ConceptReferenceTerm |
getConceptReferenceTermByUuid(java.lang.String uuid)
Gets the concept reference term with the specified uuid
|
java.util.List<ConceptReferenceTerm> |
getConceptReferenceTerms(boolean includeRetired)
Gets a list of concept reference terms saved in the database
|
java.util.List<ConceptReferenceTerm> |
getConceptReferenceTerms(java.lang.String query,
ConceptSource conceptSource,
java.lang.Integer start,
java.lang.Integer length,
boolean includeRetired)
Finds the concept reference term in the database that have a code or name that contains the
specified search phrase.
|
java.util.List<ConceptSearchResult> |
getConcepts(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept,
java.lang.Integer start,
java.lang.Integer size)
Searches for concepts by the given parameters.
|
java.util.List<ConceptSearchResult> |
getConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired)
Searches for concepts with the given parameters
|
java.util.List<Concept> |
getConcepts(java.lang.String sortBy,
java.lang.String dir)
Deprecated.
|
java.util.List<Concept> |
getConceptsByAnswer(Concept concept)
Returns all possible Concepts to which this concept is a value-coded answer.
|
java.util.List<Concept> |
getConceptsByClass(ConceptClass cc) |
java.util.List<Concept> |
getConceptsByConceptSet(Concept c)
Return a List of all concepts within a concept set
|
java.util.List<ConceptMap> |
getConceptsByConceptSource(ConceptSource conceptSource)
Looks up a list of ConceptMaps for a given ConceptSource
|
java.util.List<Concept> |
getConceptsByMapping(java.lang.String code,
java.lang.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 |
java.util.List<Concept> |
getConceptsByMapping(java.lang.String code,
java.lang.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 . |
java.util.List<Concept> |
getConceptsByName(java.lang.String name)
Returns a list of concepts matching any part of a concept name, this method is case
insensitive to the concept name string
|
java.util.List<Concept> |
getConceptsByName(java.lang.String name,
java.util.Locale locale,
java.lang.Boolean exactLocale)
Returns a list of concepts with the same name in the given locale.
|
ConceptSet |
getConceptSetByUuid(java.lang.String uuid)
Get ConceptSet by its UUID
|
java.util.List<ConceptSet> |
getConceptSets(Concept c)
Deprecated.
|
java.util.List<ConceptSet> |
getConceptSetsByConcept(Concept concept)
Return a list of the concept sets with concept_set matching concept
|
java.util.List<Concept> |
getConceptsInSet(Concept c)
Deprecated.
|
ConceptSource |
getConceptSource(java.lang.Integer conceptSourceId)
Return a Concept source matching the given concept source id
|
ConceptSource |
getConceptSourceByName(java.lang.String conceptSourceName)
Lookup a ConceptSource by its name property
|
ConceptSource |
getConceptSourceByUuid(java.lang.String uuid)
Get ConceptSource by its UUID
|
java.util.List<java.lang.String> |
getConceptStopWords(java.util.Locale locale)
Gets the list of
ConceptStopWord for given locale |
java.util.List<Concept> |
getConceptsWithDrugsInFormulary()
Convenience method for finding concepts associated with drugs in formulary.
|
java.util.List<ConceptWord> |
getConceptWords(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes,
Concept answerToConcept,
java.lang.Integer start,
java.lang.Integer size)
Deprecated.
|
java.util.List<ConceptWord> |
getConceptWords(java.lang.String phrase,
java.util.Locale locale)
Deprecated.
|
java.lang.Integer |
getCountOfConceptReferenceTerms(java.lang.String query,
ConceptSource conceptSource,
boolean includeRetired)
Returns the count of concept reference terms that match the specified arguments
|
java.lang.Integer |
getCountOfConcepts(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept)
Return the number of concepts matching a search phrase and the specified arguments
|
java.lang.Integer |
getCountOfDrugs(java.lang.String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired)
Return the number of drugs with matching names or concept drug names
|
ConceptMapType |
getDefaultConceptMapType()
Gets the concept map type to be used as the default.
|
Drug |
getDrug(java.lang.Integer drugId)
Get the Drug with the given id
|
Drug |
getDrug(java.lang.String drugNameOrId)
Return the drug object corresponding to the given name or drugId
|
Drug |
getDrugByMapping(java.lang.String code,
ConceptSource conceptSource,
java.util.Collection<ConceptMapType> withAnyOfTheseTypesOrOrderOfPreference)
Gets the "best" matching drug, i.e.
|
Drug |
getDrugByNameOrId(java.lang.String drugNameOrId)
Deprecated.
use
getDrug(String) |
Drug |
getDrugByUuid(java.lang.String uuid)
Get Drug by its UUID
|
DrugIngredient |
getDrugIngredientByUuid(java.lang.String uuid)
Get Drug Ingredient by its UUID
|
java.util.List<Drug> |
getDrugs()
Deprecated.
use
getAllDrugs() |
java.util.List<Drug> |
getDrugs(boolean includeVoided)
Deprecated.
|
java.util.List<Drug> |
getDrugs(Concept concept)
Deprecated.
|
java.util.List<Drug> |
getDrugs(Concept concept,
boolean includeRetired)
Deprecated.
|
java.util.List<Drug> |
getDrugs(java.lang.String phrase)
Find drugs in the system.
|
java.util.List<Drug> |
getDrugs(java.lang.String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired,
java.lang.Integer start,
java.lang.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.
|
java.util.List<Drug> |
getDrugs(java.lang.String searchPhrase,
java.util.Locale locale,
boolean exactLocale,
boolean includeRetired)
Fetches un retired drugs that match the specified search phrase.
|
java.util.List<Drug> |
getDrugsByConcept(Concept concept)
Return a list of drugs associated with the given concept
|
java.util.List<Drug> |
getDrugsByMapping(java.lang.String code,
ConceptSource conceptSource,
java.util.Collection<ConceptMapType> withAnyOfTheseTypes,
boolean includeRetired)
Fetches all drugs with reference mappings to the specified concept source that match the
specified code and concept map types
|
Concept |
getFalseConcept()
Returns the FALSE concept
|
java.util.Set<java.util.Locale> |
getLocalesOfConceptNames()
Gets the set of unique Locales used by existing concept names.
|
java.lang.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
|
java.util.List<ConceptSearchResult> |
getOrderableConcepts(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
boolean includeRetired,
java.lang.Integer start,
java.lang.Integer length)
An Orderable concept is one where its conceptClass has a mapping in the order_type_class_map
table.
|
Concept |
getPrevConcept(Concept c)
Finds the previous concept in the dictionary that has the next lowest concept id
|
java.util.List<Concept> |
getProposedConcepts(java.lang.String text)
Find matching proposed concepts
|
java.util.List<Concept> |
getQuestionsForAnswer(Concept concept)
Deprecated.
|
java.util.List<ConceptReferenceTermMap> |
getReferenceTermMappingsTo(ConceptReferenceTerm term)
Fetches all the
ConceptReferenceTermMap where the specified reference term is the
termB i.e mappings added to other terms pointing to it |
java.util.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,
java.util.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)
Deprecated.
as of 1.9 because users should never delete datatypes, it could harm data and
other code expecting them to be here
|
void |
purgeConceptMapType(ConceptMapType conceptMapType)
Completely purges a concept map type from the database
|
void |
purgeConceptProposal(ConceptProposal cp)
Removes a concept proposal from the database entirely.
|
void |
purgeConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm)
Purges the specified concept reference term from the database
|
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,
java.lang.String reason)
Retiring a concept essentially removes it from circulation
|
ConceptMapType |
retireConceptMapType(ConceptMapType conceptMapType,
java.lang.String retireReason)
Retiring a concept map type essentially removes it from circulation
|
ConceptReferenceTerm |
retireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm,
java.lang.String retireReason)
Retiring a concept reference term essentially removes it from circulation
|
ConceptSource |
retireConceptSource(ConceptSource cs,
java.lang.String reason)
This effectively removes a concept source from the database.
|
Drug |
retireDrug(Drug drug,
java.lang.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)
Deprecated.
as of 1.9 because users should never change datatypes, it could harm data and
other code expecting them to be here
|
ConceptMapType |
saveConceptMapType(ConceptMapType conceptMapType)
Saves or updates the specified concept map type in the database
|
ConceptNameTag |
saveConceptNameTag(ConceptNameTag nameTag)
Creates a new Concept name tag if none exists.
|
ConceptProposal |
saveConceptProposal(ConceptProposal conceptProposal)
Saves/updates/proposes a concept proposal
|
ConceptReferenceTerm |
saveConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm)
Stores the specified concept reference term to the database
|
ConceptSource |
saveConceptSource(ConceptSource conceptSource)
Create a new ConceptSource
|
ConceptStopWord |
saveConceptStopWord(ConceptStopWord conceptStopWord)
Save the given
ConceptStopWord in the database |
Drug |
saveDrug(Drug drug)
Save or update the given
Drug in the database. |
void |
setConceptDAO(ConceptDAO dao)
Sets the data access object for Concepts.
|
ConceptMapType |
unretireConceptMapType(ConceptMapType conceptMapType)
Marks a concept map type that is currently retired as not retired.
|
ConceptReferenceTerm |
unretireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm)
Marks a concept reference term that is currently retired as not retired.
|
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(java.lang.Integer conceptIdStart,
java.lang.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(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
Deprecated.
|
void |
updateDrug(Drug drug)
Deprecated.
Use #saveDrug(Drug)
|
void |
voidConcept(Concept concept,
java.lang.String reason)
Deprecated.
use
retireConcept(Concept, String) etireConcept |
protected java.util.List<ConceptWord> |
weightWords(java.lang.String phrase,
java.util.List<java.util.Locale> locales,
java.util.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 java.lang.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, java.lang.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, java.lang.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, java.lang.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(java.lang.Integer conceptId) throws APIException
ConceptService
getConcept
in interface ConceptService
APIException
ConceptService.getConcept(java.lang.Integer)
public ConceptName getConceptName(java.lang.Integer conceptNameId) throws APIException
ConceptService
getConceptName
in interface ConceptService
APIException
ConceptService.getConceptName(java.lang.Integer)
public ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId) throws APIException
ConceptService
getConceptAnswer
in interface ConceptService
APIException
ConceptService.getConceptAnswer(java.lang.Integer)
public Drug getDrug(java.lang.Integer drugId) throws APIException
ConceptService
getDrug
in interface ConceptService
APIException
ConceptService.getDrug(java.lang.Integer)
public ConceptNumeric getConceptNumeric(java.lang.Integer conceptId) throws APIException
ConceptService
getConceptNumeric
in interface ConceptService
conceptId
- The ConceptNumeric idAPIException
ConceptService.getConceptNumeric(java.lang.Integer)
public ConceptComplex getConceptComplex(java.lang.Integer conceptId)
ConceptService
getConceptComplex
in interface ConceptService
conceptId
- of the ComplexConceptConceptService.getConceptComplex(java.lang.Integer)
public java.util.List<Concept> getAllConcepts() throws APIException
ConceptService
getAllConcepts
in interface ConceptService
APIException
ConceptService.getAllConcepts()
public java.util.List<Concept> getAllConcepts(java.lang.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 java.util.List<Concept> getConcepts(java.lang.String sortBy, java.lang.String dir) throws APIException
getAllConcepts(String, boolean, boolean)
getConcepts
in interface ConceptService
APIException
public java.util.List<Concept> getConceptsByName(java.lang.String name) throws APIException
ConceptService
getConceptsByName
in interface ConceptService
name
- The search stringAPIException
ConceptService.getConceptsByName(java.lang.String)
public Concept getConceptByName(java.lang.String name)
ConceptService
getConceptByName
in interface ConceptService
name
- The search stringConceptService.getConceptByName(java.lang.String)
@Deprecated public Concept getConceptByIdOrName(java.lang.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(java.lang.String conceptIdOrName)
ConceptService
getConcept
in interface ConceptService
ConceptService.getConcept(java.lang.String)
@Deprecated public java.util.List<ConceptWord> getConceptWords(java.lang.String phrase, java.util.List<java.util.Locale> locales, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.List<ConceptDatatype> excludeDatatypes, Concept answerToConcept, java.lang.Integer start, java.lang.Integer size)
getConceptWords
in interface ConceptService
ConceptService.getConcepts(String, List, boolean, List, List, List, List, Concept,
Integer, Integer)
@Deprecated public java.util.List<ConceptWord> getConceptWords(java.lang.String phrase, java.util.Locale locale) throws APIException
getConceptWords
in interface ConceptService
APIException
ConceptService.getConceptWords(String, Locale)
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired, int start, int size)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean, int, int)
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean)
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.List<ConceptDatatype> excludeDatatypes)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, Locale, boolean, List, List, List, List)
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.List<java.util.Locale> locales, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.List<ConceptDatatype> excludeDatatypes)
findConcepts
in interface ConceptService
ConceptService.findConcepts(String, List, boolean, List, List, List, List)
public Drug getDrug(java.lang.String drugNameOrId)
ConceptService
getDrug
in interface ConceptService
drugNameOrId
- String name or drugId to match exactly onConceptService.getDrug(java.lang.String)
@Deprecated public Drug getDrugByNameOrId(java.lang.String drugNameOrId)
getDrug(String)
ConceptService
getDrugByNameOrId
in interface ConceptService
drugNameOrId
- StringConceptService.getDrugByNameOrId(java.lang.String)
@Deprecated public java.util.List<Drug> getDrugs()
getAllDrugs()
getDrugs
in interface ConceptService
public java.util.List<Drug> getAllDrugs()
ConceptService
getAllDrugs
in interface ConceptService
ConceptService.getAllDrugs()
public java.util.List<Drug> getAllDrugs(boolean includeRetired)
ConceptService
getAllDrugs
in interface ConceptService
includeRetired
- If true
then the search will include voided DrugsConceptService.getAllDrugs(boolean)
@Deprecated public java.util.List<Drug> getDrugs(Concept concept)
getDrugsByConcept(Concept)
getDrugs
in interface ConceptService
ConceptService.getDrugs(org.openmrs.Concept)
public java.util.List<Drug> getDrugsByConcept(Concept concept)
ConceptService
getDrugsByConcept
in interface ConceptService
ConceptService.getDrugsByConcept(org.openmrs.Concept)
@Deprecated public java.util.List<Drug> getDrugs(Concept concept, boolean includeRetired)
getDrugsByConcept(Concept)
ConceptService.getDrugs(Concept)
@Deprecated public java.util.List<Drug> getDrugs(boolean includeVoided)
getAllDrugs(boolean)
ConceptService.getAllDrugs(boolean)
@Deprecated public java.util.List<Drug> findDrugs(java.lang.String phrase, boolean includeRetired)
getDrugs(String)
findDrugs
in interface ConceptService
ConceptService.findDrugs(java.lang.String, boolean)
public java.util.List<Drug> getDrugs(java.lang.String phrase)
ConceptService
getDrugs
in interface ConceptService
phrase
- Search phraseConceptService.getDrugs(java.lang.String)
public java.util.List<Concept> getConceptsByClass(ConceptClass cc)
getConceptsByClass
in interface ConceptService
cc
- ConceptClassConceptService.getConceptsByClass(org.openmrs.ConceptClass)
@Deprecated public java.util.List<ConceptClass> getConceptClasses()
ConceptService
getConceptClasses
in interface ConceptService
ConceptService.getConceptClasses()
public java.util.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(java.lang.Integer i)
ConceptService
getConceptClass
in interface ConceptService
i
- the concept class identifierConceptService.getConceptClass(java.lang.Integer)
public ConceptClass getConceptClassByName(java.lang.String name)
ConceptService
getConceptClassByName
in interface ConceptService
ConceptService.getConceptClassByName(java.lang.String)
public java.util.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)
@Deprecated public void purgeConceptDatatype(ConceptDatatype cd)
ConceptService
purgeConceptDatatype
in interface ConceptService
cd
- ConceptDatatype to purgeConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)
@Deprecated 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 java.util.List<ConceptDatatype> getConceptDatatypes()
getAllConceptDatatypes()
ConceptService.getAllConceptDatatypes()
public java.util.List<ConceptDatatype> getAllConceptDatatypes()
ConceptService
getAllConceptDatatypes
in interface ConceptService
ConceptService.getAllConceptDatatypes()
public java.util.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(java.lang.Integer i)
ConceptService
getConceptDatatype
in interface ConceptService
i
- Integer for the requested ConceptDatatypeConceptService.getConceptDatatype(java.lang.Integer)
public java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
ConceptService
getConceptDatatypes
in interface ConceptService
ConceptService.getConceptDatatypes(java.lang.String)
public ConceptDatatype getConceptDatatypeByName(java.lang.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 java.util.List<ConceptSet> getConceptSets(Concept c)
getConceptSetsByConcept(Concept)
getConceptSets
in interface ConceptService
ConceptService.getConceptSets(org.openmrs.Concept)
public java.util.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 java.util.List<Concept> getConceptsInSet(Concept c)
getConceptsByConceptSet(Concept)
getConceptsInSet
in interface ConceptService
ConceptService.getConceptsInSet(org.openmrs.Concept)
public java.util.List<Concept> getConceptsByConceptSet(Concept c)
ConceptService
getConceptsByConceptSet
in interface ConceptService
c
- The concept representing the concept setConceptService.getConceptsInSet(org.openmrs.Concept)
public java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
ConceptService
getSetsContainingConcept
in interface ConceptService
ConceptService.getSetsContainingConcept(org.openmrs.Concept)
public ConceptProposal getConceptProposal(java.lang.Integer conceptProposalId)
ConceptService
getConceptProposal
in interface ConceptService
conceptProposalId
- the Integer concept proposal IdConceptService.getConceptProposal(java.lang.Integer)
@Deprecated public java.util.List<ConceptProposal> getConceptProposals(boolean includeCompleted)
getAllConceptProposals(boolean)
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(boolean)
public java.util.List<ConceptProposal> getAllConceptProposals(boolean includeCompleted)
ConceptService
getAllConceptProposals
in interface ConceptService
includeCompleted
- boolean - include completed proposals as well?ConceptService.getAllConceptProposals(boolean)
public java.util.List<ConceptProposal> getConceptProposals(java.lang.String cp)
ConceptService
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(java.lang.String)
@Deprecated public java.util.List<Concept> findProposedConcepts(java.lang.String text)
findProposedConcepts
in interface ConceptService
ConceptService.findProposedConcepts(java.lang.String)
public java.util.List<Concept> getProposedConcepts(java.lang.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, java.util.Locale locale) throws APIException
ConceptService
mapConceptProposalToConcept
in interface ConceptService
locale
- of concept proposalAPIException
org.openmrs.api.ConceptService#mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept, java.util.locale)
public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
ConceptService
mapConceptProposalToConcept
in interface ConceptService
APIException
ConceptService.mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept)
@Deprecated public void rejectConceptProposal(ConceptProposal cp)
ConceptProposal.rejectConceptProposal()
rejectConceptProposal
in interface ConceptService
ConceptService.rejectConceptProposal(org.openmrs.ConceptProposal)
@Deprecated public java.util.List<ConceptProposal> findMatchingConceptProposals(java.lang.String text)
getConceptProposals(String)
findMatchingConceptProposals
in interface ConceptService
ConceptService.findMatchingConceptProposals(String text)
@Deprecated public java.util.List<ConceptWord> findConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept, boolean includeRetired)
findConceptAnswers
in interface ConceptService
ConceptService.findConceptAnswers(String, Locale, Concept, boolean)
@Deprecated public java.util.List<ConceptWord> getConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept) throws APIException
getConceptAnswers
in interface ConceptService
APIException
ConceptService.findConceptAnswers(String, Locale, Concept)
@Deprecated public java.util.List<Concept> getQuestionsForAnswer(Concept concept)
getConceptsByAnswer(Concept)
getQuestionsForAnswer
in interface ConceptService
ConceptService.getQuestionsForAnswer(org.openmrs.Concept)
public java.util.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 java.util.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(java.lang.Integer conceptIdStart, java.lang.Integer conceptIdEnd) throws APIException
updateConceptWords
in interface ConceptService
APIException
ConceptService.updateConceptWords(java.lang.Integer, java.lang.Integer)
public java.lang.Integer getMaxConceptId()
ConceptService
getMaxConceptId
in interface ConceptService
ConceptService.getMaxConceptId()
protected java.util.List<ConceptWord> weightWords(java.lang.String phrase, java.util.List<java.util.Locale> locales, java.util.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(java.lang.String tagName)
ConceptService
getConceptNameTagByName
in interface ConceptService
tagName
- String name of ConceptNameTagConceptService.getConceptNameTagByName(java.lang.String)
public java.util.Set<java.util.Locale> getLocalesOfConceptNames()
ConceptService
getLocalesOfConceptNames
in interface ConceptService
ConceptService.getLocalesOfConceptNames()
public ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
ConceptService
getConceptSource
in interface ConceptService
conceptSourceId
- Integer conceptSourceIdConceptService.getConceptSource(java.lang.Integer)
public java.util.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, java.lang.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 java.util.Iterator<Concept> conceptIterator()
ConceptService
conceptIterator
in interface ConceptService
ConceptService.conceptIterator()
public Concept getConceptByUuid(java.lang.String uuid)
ConceptService
getConceptByUuid
in interface ConceptService
ConceptService.getConceptByUuid(java.lang.String)
public ConceptClass getConceptClassByUuid(java.lang.String uuid)
ConceptService
getConceptClassByUuid
in interface ConceptService
ConceptService.getConceptClassByUuid(java.lang.String)
public ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
ConceptService
getConceptAnswerByUuid
in interface ConceptService
public ConceptName getConceptNameByUuid(java.lang.String uuid)
ConceptService
getConceptNameByUuid
in interface ConceptService
public ConceptSet getConceptSetByUuid(java.lang.String uuid)
ConceptService
getConceptSetByUuid
in interface ConceptService
public ConceptSource getConceptSourceByUuid(java.lang.String uuid)
ConceptService
getConceptSourceByUuid
in interface ConceptService
public ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
ConceptService
getConceptDatatypeByUuid
in interface ConceptService
ConceptService.getConceptDatatypeByUuid(java.lang.String)
public ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
ConceptService
getConceptNumericByUuid
in interface ConceptService
ConceptService.getConceptNumericByUuid(java.lang.String)
public ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
ConceptService
getConceptProposalByUuid
in interface ConceptService
ConceptService.getConceptProposalByUuid(java.lang.String)
public Drug getDrugByUuid(java.lang.String uuid)
ConceptService
getDrugByUuid
in interface ConceptService
ConceptService.getDrugByUuid(java.lang.String)
public DrugIngredient getDrugIngredientByUuid(java.lang.String uuid)
ConceptService
getDrugIngredientByUuid
in interface ConceptService
uuid
- the uuid for the drug ingredient to getConceptService.getDrugIngredientByUuid(java.lang.String)
public ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
ConceptService
getConceptDescriptionByUuid
in interface ConceptService
ConceptService.getConceptDescriptionByUuid(java.lang.String)
public ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
ConceptService
getConceptNameTagByUuid
in interface ConceptService
ConceptService.getConceptNameTagByUuid(java.lang.String)
public java.util.List<ConceptNameTag> getAllConceptNameTags()
ConceptService
getAllConceptNameTags
in interface ConceptService
ConceptService.getAllConceptNameTags()
public ConceptNameTag getConceptNameTag(java.lang.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(java.lang.String code, java.lang.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(java.lang.String code, java.lang.String sourceName, java.lang.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 java.util.List<Concept> getConceptsByMapping(java.lang.String code, java.lang.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 java.util.List<Concept> getConceptsByMapping(java.lang.String code, java.lang.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 java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
ConceptService
getConceptsByConceptSource
in interface ConceptService
APIException
ConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)
public ConceptSource getConceptSourceByName(java.lang.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 java.util.List<ConceptSearchResult> findConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept) throws APIException
ConceptService
findConceptAnswers
in interface ConceptService
concept
- the answers to match onAPIException
ConceptService.findConceptAnswers(String, Locale, Concept)
public java.util.List<java.lang.String> getConceptStopWords(java.util.Locale locale)
ConceptService
ConceptStopWord
for given localegetConceptStopWords
in interface ConceptService
locale
- The locale in which to search for the ConceptStopWord
ConceptService.getConceptStopWords(java.util.Locale)
public ConceptStopWord saveConceptStopWord(ConceptStopWord conceptStopWord) throws APIException
ConceptService
ConceptStopWord
in the database
If this is a new concept stop word, the returned concept stop word will have a new
ConceptStopWord.getConceptStopWordId()
inserted into it that was
generated by the database
saveConceptStopWord
in interface ConceptService
conceptStopWord
- The ConceptStopWord
to save or updateConceptStopWord
that was saved or updatedAPIException
ConceptService.saveConceptStopWord(org.openmrs.ConceptStopWord)
public void deleteConceptStopWord(java.lang.Integer conceptStopWordId) throws APIException
ConceptService
ConceptStopWord
in the databasedeleteConceptStopWord
in interface ConceptService
conceptStopWordId
- The ConceptStopWord
to deleteAPIException
ConceptService.deleteConceptStopWord(Integer)
public java.util.List<ConceptStopWord> getAllConceptStopWords()
ConceptService
getAllConceptStopWords
in interface ConceptService
ConceptStopWord
ConceptService.getAllConceptStopWords()
public java.util.List<ConceptSearchResult> getConcepts(java.lang.String phrase, java.util.List<java.util.Locale> locales, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, java.lang.Integer start, java.lang.Integer size) throws APIException
ConceptService
getConcepts
in interface ConceptService
phrase
- matched to the start of any word in any of the names of a concept (if
blank/null, matches all concepts)locales
- 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(java.lang.Integer conceptIdStart, java.lang.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.updateConceptIndex(Concept)
public void updateConceptIndexes() throws APIException
ConceptService
updateConceptIndexes
in interface ConceptService
APIException
ConceptService.updateConceptIndexes()
public java.lang.Integer getCountOfConcepts(java.lang.String phrase, java.util.List<java.util.Locale> locales, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.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 java.lang.Integer getCountOfDrugs(java.lang.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 java.util.List<Drug> getDrugs(java.lang.String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired, java.lang.Integer start, java.lang.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 java.util.List<ConceptSearchResult> getConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired) throws APIException
ConceptService
getConcepts
in interface ConceptService
phrase
- the string to search against (if blank/null, matches all concepts)locale
- the locale in which to search for the conceptsincludeRetired
- Specifies whether to include retired conceptsAPIException
ConceptService.getConcepts(String, Locale, boolean)
public java.util.List<ConceptMap> getConceptMappingsToSource(ConceptSource conceptSource) throws APIException
ConceptService
getConceptMappingsToSource
in interface ConceptService
APIException
ConceptService.getConceptMappingsToSource(ConceptSource)
public java.util.List<ConceptMapType> getActiveConceptMapTypes() throws APIException
ConceptService
getActiveConceptMapTypes
in interface ConceptService
APIException
ConceptService.getActiveConceptMapTypes()
public java.util.List<ConceptMapType> getConceptMapTypes(boolean includeRetired, boolean includeHidden) throws APIException
ConceptService
getConceptMapTypes
in interface ConceptService
includeRetired
- specifies if retired concept map types should be includedAPIException
ConceptService.getConceptMapTypes(boolean, boolean)
public ConceptMapType getConceptMapType(java.lang.Integer conceptMapTypeId) throws APIException
ConceptService
getConceptMapType
in interface ConceptService
conceptMapTypeId
- Integer concept map type idAPIException
ConceptService.getConceptMapType(Integer)
public ConceptMapType getConceptMapTypeByUuid(java.lang.String uuid) throws APIException
ConceptService
getConceptMapTypeByUuid
in interface ConceptService
uuid
- the uuid to search againstAPIException
ConceptService.getConceptMapTypeByUuid(String)
public ConceptMapType getConceptMapTypeByName(java.lang.String name) throws APIException
ConceptService
getConceptMapTypeByName
in interface ConceptService
name
- the name to search againstAPIException
ConceptService.getConceptMapTypeByName(java.lang.String)
public ConceptMapType saveConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptService
saveConceptMapType
in interface ConceptService
conceptMapType
- the concept map type to saveAPIException
ConceptService.saveConceptMapType(org.openmrs.ConceptMapType)
public ConceptMapType retireConceptMapType(ConceptMapType conceptMapType, java.lang.String retireReason) throws APIException
ConceptService
retireConceptMapType
in interface ConceptService
conceptMapType
- the concept map type to retireretireReason
- the reason why the concept map type is being retiredAPIException
ConceptService.retireConceptMapType(org.openmrs.ConceptMapType,
java.lang.String)
public ConceptMapType unretireConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptService
unretireConceptMapType
in interface ConceptService
conceptMapType
- the concept map type to unretireAPIException
ConceptService.unretireConceptMapType(org.openmrs.ConceptMapType)
public void purgeConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptService
purgeConceptMapType
in interface ConceptService
conceptMapType
- the concept map type to purge from the databaseAPIException
ConceptService.purgeConceptMapType(org.openmrs.ConceptMapType)
public java.util.List<ConceptReferenceTerm> getAllConceptReferenceTerms() throws APIException
ConceptService
getAllConceptReferenceTerms
in interface ConceptService
APIException
ConceptService.getAllConceptReferenceTerms()
public java.util.List<ConceptReferenceTerm> getConceptReferenceTerms(boolean includeRetired) throws APIException
ConceptService
getConceptReferenceTerms
in interface ConceptService
includeRetired
- specifies if retired concept reference terms should be includedAPIException
ConceptService.getConceptReferenceTerms(boolean)
public ConceptReferenceTerm getConceptReferenceTerm(java.lang.Integer conceptReferenceTermId) throws APIException
ConceptService
getConceptReferenceTerm
in interface ConceptService
conceptReferenceTermId
- the concept reference term id to search againstAPIException
ConceptService.getConceptReferenceTerm(java.lang.Integer)
public ConceptReferenceTerm getConceptReferenceTermByUuid(java.lang.String uuid) throws APIException
ConceptService
getConceptReferenceTermByUuid
in interface ConceptService
uuid
- the uuid to search againstAPIException
ConceptService.getConceptReferenceTermByUuid(java.lang.String)
public ConceptReferenceTerm getConceptReferenceTermByName(java.lang.String name, ConceptSource conceptSource) throws APIException
ConceptService
getConceptReferenceTermByName
in interface ConceptService
name
- the name to match againstconceptSource
- the concept source to match againstAPIException
ConceptService.getConceptReferenceTermByName(java.lang.String,
org.openmrs.ConceptSource)
public ConceptReferenceTerm getConceptReferenceTermByCode(java.lang.String code, ConceptSource conceptSource) throws APIException
ConceptService
getConceptReferenceTermByCode
in interface ConceptService
code
- the code to match againstconceptSource
- the concept source to match againstAPIException
ConceptService.getConceptReferenceTermByCode(java.lang.String,
org.openmrs.ConceptSource)
public ConceptReferenceTerm saveConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptService
saveConceptReferenceTerm
in interface ConceptService
conceptReferenceTerm
- the concept reference term object to saveAPIException
ConceptService.saveConceptReferenceTerm(org.openmrs.ConceptReferenceTerm)
public ConceptReferenceTerm retireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm, java.lang.String retireReason) throws APIException
ConceptService
retireConceptReferenceTerm
in interface ConceptService
conceptReferenceTerm
- the concept reference term object to retireretireReason
- the reason why the concept reference term is being retiredAPIException
ConceptService.retireConceptReferenceTerm(ConceptReferenceTerm, String)
public ConceptReferenceTerm unretireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptService
unretireConceptReferenceTerm
in interface ConceptService
conceptReferenceTerm
- the concept reference term to unretireAPIException
ConceptService.unretireConceptReferenceTerm(org.openmrs.ConceptReferenceTerm)
public void purgeConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptService
purgeConceptReferenceTerm
in interface ConceptService
conceptReferenceTerm
- the concept reference term object to purgeAPIException
ConceptService.purgeConceptReferenceTerm(org.openmrs.ConceptReferenceTerm)
public java.util.List<ConceptReferenceTerm> getConceptReferenceTerms(java.lang.String query, ConceptSource conceptSource, java.lang.Integer start, java.lang.Integer length, boolean includeRetired) throws APIException
ConceptService
getConceptReferenceTerms
in interface ConceptService
query
- the string to match against the reference term names or codesconceptSource
- the concept source from which the terms should be looked upstart
- beginning index for the batchlength
- number of terms to return in the batchincludeRetired
- specifies if the retired terms should be includedConceptReferenceTerm
sAPIException
ConceptService.getConceptReferenceTerms(java.lang.String,
org.openmrs.ConceptSource, java.lang.Integer, java.lang.Integer, boolean)
public java.lang.Integer getCountOfConceptReferenceTerms(java.lang.String query, ConceptSource conceptSource, boolean includeRetired)
ConceptService
getCountOfConceptReferenceTerms
in interface ConceptService
query
- the string to match against the reference term namesconceptSource
- the concept source from which the terms should be looked upincludeRetired
- specifies if retired concept reference terms should be includedConceptService.getCountOfConceptReferenceTerms(String, ConceptSource,
boolean)
public java.util.List<ConceptReferenceTermMap> getReferenceTermMappingsTo(ConceptReferenceTerm term) throws APIException
ConceptService
ConceptReferenceTermMap
where the specified reference term is the
termB i.e mappings added to other terms pointing to itgetReferenceTermMappingsTo
in interface ConceptService
term
- the term to match againstConceptReferenceTermMap
sAPIException
ConceptService.getReferenceTermMappingsTo(ConceptReferenceTerm)
public java.util.List<Concept> getConceptsByName(java.lang.String name, java.util.Locale locale, java.lang.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)
public ConceptMapType getDefaultConceptMapType() throws APIException
ConceptService
concept.defaultConceptMapType
global property.getDefaultConceptMapType
in interface ConceptService
ConceptMapType
APIException
ConceptService.getDefaultConceptMapType()
public java.util.List<Drug> getDrugs(java.lang.String searchPhrase, java.util.Locale locale, boolean exactLocale, boolean includeRetired) throws APIException
ConceptService
getDrugs
in interface ConceptService
searchPhrase
- The string to match againstlocale
- The locale to match against when searching in drug concept namesexactLocale
- If false then concepts with names in a broader locale will be matched e.g
in case en_GB is passed in then en will be matchedincludeRetired
- Specifies if retired drugs that match should be included or notAPIException
ConceptService.getDrugs(String, java.util.Locale, boolean, boolean)
public java.util.List<Drug> getDrugsByMapping(java.lang.String code, ConceptSource conceptSource, java.util.Collection<ConceptMapType> withAnyOfTheseTypes, boolean includeRetired) throws APIException
ConceptService
getDrugsByMapping
in interface ConceptService
code
- the code the reference term code to match onconceptSource
- the concept source on which to match onwithAnyOfTheseTypes
- the ConceptMapTypes to match onincludeRetired
- specifies if retired drugs should be included or notDrug
APIException
ConceptService.getDrugsByMapping(String, ConceptSource, Collection,
boolean)
public Drug getDrugByMapping(java.lang.String code, ConceptSource conceptSource, java.util.Collection<ConceptMapType> withAnyOfTheseTypesOrOrderOfPreference) throws APIException
ConceptService
getDrugByMapping
in interface ConceptService
code
- the code the reference term code to match onconceptSource
- the concept source to match onwithAnyOfTheseTypesOrOrderOfPreference
- the ConceptMapTypes to match onDrug
APIException
org.openmrs.api.ConceptService#getDrugByMapping(String, org.openmrs.ConceptSource,
java.util.Collection
public java.util.List<ConceptSearchResult> getOrderableConcepts(java.lang.String phrase, java.util.List<java.util.Locale> locales, boolean includeRetired, java.lang.Integer start, java.lang.Integer length)
ConceptService
getOrderableConcepts
in interface ConceptService
phrase
- the phrase to match onlocales
- list of locales to match onincludeRetired
- include retired concepts or notstart
- start index of search resultslength
- number of concept results to be returnedConceptService.getOrderableConcepts(String, java.util.List, boolean,
Integer, Integer)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.