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
Concepts 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 Concepts 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, onStartupclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonShutdown, onStartuppublic static final java.lang.String CONCEPT_WORD_UPDATE_TASK_NAME
public void setConceptDAO(ConceptDAO dao)
ConceptServicesetConceptDAO in interface ConceptServicedao - 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 ConceptServicepublic Concept saveConcept(Concept concept) throws APIException
ConceptServiceConcept 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 ConceptServiceconcept - The Concept or ConceptNumeric to save or updateConcept or ConceptNumeric that was saved or updatedAPIExceptionConceptsLockedExceptionConceptInUseExceptionConceptService.saveConcept(org.openmrs.Concept)public Drug saveDrug(Drug drug) throws APIException
ConceptServiceDrug 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 ConceptServicedrug - The Drug to save or updateAPIExceptionConceptService.saveDrug(org.openmrs.Drug)public void purgeConcept(Concept concept) throws APIException
ConceptServiceConcept 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 ConceptServiceconcept - The Concept or ConceptNumeric to
remove from the systemAPIExceptionConceptService.purgeConcept(Concept)public Concept retireConcept(Concept concept, java.lang.String reason) throws APIException
ConceptServiceretireConcept in interface ConceptServiceconcept - The Concept or ConceptNumeric to
retirereason - The retire reasonConcept or ConceptNumericAPIExceptionConceptService.retireConcept(org.openmrs.Concept, java.lang.String)public Drug retireDrug(Drug drug, java.lang.String reason) throws APIException
ConceptServiceretireDrug in interface ConceptServicedrug - The Drug to retirereason - The retire reasonAPIExceptionConceptService.retireDrug(org.openmrs.Drug, java.lang.String)public Drug unretireDrug(Drug drug) throws APIException
ConceptServiceunretireDrug in interface ConceptServicedrug - that is current set as retiredAPIExceptionConceptService.unretireDrug(org.openmrs.Drug)public void purgeDrug(Drug drug) throws APIException
ConceptServicepurgeDrug in interface ConceptServicedrug - The Drug to remove from the systemAPIExceptionConceptService.purgeDrug(org.openmrs.Drug)public Concept getConcept(java.lang.Integer conceptId) throws APIException
ConceptServicegetConcept in interface ConceptServiceAPIExceptionConceptService.getConcept(java.lang.Integer)public ConceptName getConceptName(java.lang.Integer conceptNameId) throws APIException
ConceptServicegetConceptName in interface ConceptServiceAPIExceptionConceptService.getConceptName(java.lang.Integer)public ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId) throws APIException
ConceptServicegetConceptAnswer in interface ConceptServiceAPIExceptionConceptService.getConceptAnswer(java.lang.Integer)public Drug getDrug(java.lang.Integer drugId) throws APIException
ConceptServicegetDrug in interface ConceptServiceAPIExceptionConceptService.getDrug(java.lang.Integer)public ConceptNumeric getConceptNumeric(java.lang.Integer conceptId) throws APIException
ConceptServicegetConceptNumeric in interface ConceptServiceconceptId - The ConceptNumeric idAPIExceptionConceptService.getConceptNumeric(java.lang.Integer)public ConceptComplex getConceptComplex(java.lang.Integer conceptId)
ConceptServicegetConceptComplex in interface ConceptServiceconceptId - of the ComplexConceptConceptService.getConceptComplex(java.lang.Integer)public java.util.List<Concept> getAllConcepts() throws APIException
ConceptServicegetAllConcepts in interface ConceptServiceAPIExceptionConceptService.getAllConcepts()public java.util.List<Concept> getAllConcepts(java.lang.String sortBy, boolean asc, boolean includeRetired) throws APIException
ConceptServicegetAllConcepts in interface ConceptServicesortBy - 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 returnedAPIExceptionConceptService.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 ConceptServiceAPIExceptionpublic java.util.List<Concept> getConceptsByName(java.lang.String name) throws APIException
ConceptServicegetConceptsByName in interface ConceptServicename - The search stringAPIExceptionConceptService.getConceptsByName(java.lang.String)public Concept getConceptByName(java.lang.String name)
ConceptServicegetConceptByName in interface ConceptServicename - The search stringConceptService.getConceptByName(java.lang.String)@Deprecated public Concept getConceptByIdOrName(java.lang.String idOrName)
getConcept(String)ConceptServiceNote: this just calls other impl methods; no DAO of its own
getConceptByIdOrName in interface ConceptServiceConceptService.getConceptByIdOrName(java.lang.String)public Concept getConcept(java.lang.String conceptIdOrName)
ConceptServicegetConcept in interface ConceptServiceConceptService.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 ConceptServiceConceptService.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 ConceptServiceAPIExceptionConceptService.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 ConceptServiceConceptService.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 ConceptServiceConceptService.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 ConceptServiceConceptService.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 ConceptServiceConceptService.findConcepts(String, List, boolean, List, List, List, List)public Drug getDrug(java.lang.String drugNameOrId)
ConceptServicegetDrug in interface ConceptServicedrugNameOrId - String name or drugId to match exactly onConceptService.getDrug(java.lang.String)@Deprecated public Drug getDrugByNameOrId(java.lang.String drugNameOrId)
getDrug(String)ConceptServicegetDrugByNameOrId in interface ConceptServicedrugNameOrId - StringConceptService.getDrugByNameOrId(java.lang.String)@Deprecated public java.util.List<Drug> getDrugs()
getAllDrugs()getDrugs in interface ConceptServicepublic java.util.List<Drug> getAllDrugs()
ConceptServicegetAllDrugs in interface ConceptServiceConceptService.getAllDrugs()public java.util.List<Drug> getAllDrugs(boolean includeRetired)
ConceptServicegetAllDrugs in interface ConceptServiceincludeRetired - 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 ConceptServiceConceptService.getDrugs(org.openmrs.Concept)public java.util.List<Drug> getDrugsByConcept(Concept concept)
ConceptServicegetDrugsByConcept in interface ConceptServiceConceptService.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 ConceptServiceConceptService.findDrugs(java.lang.String, boolean)public java.util.List<Drug> getDrugs(java.lang.String phrase)
ConceptServicegetDrugs in interface ConceptServicephrase - Search phraseConceptService.getDrugs(java.lang.String)public java.util.List<Concept> getConceptsByClass(ConceptClass cc)
getConceptsByClass in interface ConceptServicecc - ConceptClassConceptService.getConceptsByClass(org.openmrs.ConceptClass)@Deprecated public java.util.List<ConceptClass> getConceptClasses()
ConceptServicegetConceptClasses in interface ConceptServiceConceptService.getConceptClasses()public java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired)
ConceptServicegetAllConceptClasses in interface ConceptServiceincludeRetired - include retired concept classes in the search results?ConceptService.getAllConceptClasses(boolean)public ConceptClass getConceptClass(java.lang.Integer i)
ConceptServicegetConceptClass in interface ConceptServicei - the concept class identifierConceptService.getConceptClass(java.lang.Integer)public ConceptClass getConceptClassByName(java.lang.String name)
ConceptServicegetConceptClassByName in interface ConceptServiceConceptService.getConceptClassByName(java.lang.String)public java.util.List<ConceptClass> getAllConceptClasses() throws APIException
ConceptServicegetAllConceptClasses in interface ConceptServiceAPIExceptionConceptService.getAllConceptClasses(boolean)public ConceptClass saveConceptClass(ConceptClass cc) throws APIException
ConceptServicesaveConceptClass in interface ConceptServicecc - ConceptClass to create or updateAPIExceptionConceptService.saveConceptClass(org.openmrs.ConceptClass)public void purgeConceptClass(ConceptClass cc)
ConceptServicepurgeConceptClass in interface ConceptServicecc - ConceptClass to deleteConceptService.purgeConceptClass(org.openmrs.ConceptClass)@Deprecated public void purgeConceptDatatype(ConceptDatatype cd)
ConceptServicepurgeConceptDatatype in interface ConceptServicecd - ConceptDatatype to purgeConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)@Deprecated public ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws APIException
ConceptServicesaveConceptDatatype in interface ConceptServicecd - ConceptDatatype to create or updateAPIExceptionConceptService.saveConceptDatatype(org.openmrs.ConceptDatatype)@Deprecated public java.util.List<ConceptDatatype> getConceptDatatypes()
getAllConceptDatatypes()ConceptService.getAllConceptDatatypes()public java.util.List<ConceptDatatype> getAllConceptDatatypes()
ConceptServicegetAllConceptDatatypes in interface ConceptServiceConceptService.getAllConceptDatatypes()public java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws APIException
ConceptServicegetAllConceptDatatypes in interface ConceptServiceincludeRetired - boolean - include the retired datatypes?APIExceptionConceptService.getAllConceptDatatypes(boolean)public ConceptDatatype getConceptDatatype(java.lang.Integer i)
ConceptServicegetConceptDatatype in interface ConceptServicei - Integer for the requested ConceptDatatypeConceptService.getConceptDatatype(java.lang.Integer)public java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
ConceptServicegetConceptDatatypes in interface ConceptServiceConceptService.getConceptDatatypes(java.lang.String)public ConceptDatatype getConceptDatatypeByName(java.lang.String name)
ConceptServicegetConceptDatatypeByName in interface ConceptServiceConceptService.getConceptDatatypeByName(java.lang.String)public void updateConceptSetDerived(Concept concept) throws APIException
ConceptServiceupdateConceptSetDerived in interface ConceptServiceAPIExceptionConceptService.updateConceptSetDerived(org.openmrs.Concept)public void updateConceptSetDerived()
throws APIException
ConceptServiceupdateConceptSetDerived in interface ConceptServiceAPIExceptionConceptService.updateConceptSetDerived()@Deprecated public java.util.List<ConceptSet> getConceptSets(Concept c)
getConceptSetsByConcept(Concept)getConceptSets in interface ConceptServiceConceptService.getConceptSets(org.openmrs.Concept)public java.util.List<ConceptSet> getConceptSetsByConcept(Concept concept) throws APIException
ConceptServiceFor 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 ConceptServiceconcept - The concept representing the concept setAPIExceptionConceptService.getConceptSetsByConcept(org.openmrs.Concept)@Deprecated public java.util.List<Concept> getConceptsInSet(Concept c)
getConceptsByConceptSet(Concept)getConceptsInSet in interface ConceptServiceConceptService.getConceptsInSet(org.openmrs.Concept)public java.util.List<Concept> getConceptsByConceptSet(Concept c)
ConceptServicegetConceptsByConceptSet in interface ConceptServicec - The concept representing the concept setConceptService.getConceptsInSet(org.openmrs.Concept)public java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
ConceptServicegetSetsContainingConcept in interface ConceptServiceConceptService.getSetsContainingConcept(org.openmrs.Concept)public ConceptProposal getConceptProposal(java.lang.Integer conceptProposalId)
ConceptServicegetConceptProposal in interface ConceptServiceconceptProposalId - the Integer concept proposal IdConceptService.getConceptProposal(java.lang.Integer)@Deprecated public java.util.List<ConceptProposal> getConceptProposals(boolean includeCompleted)
getAllConceptProposals(boolean)getConceptProposals in interface ConceptServiceConceptService.getConceptProposals(boolean)public java.util.List<ConceptProposal> getAllConceptProposals(boolean includeCompleted)
ConceptServicegetAllConceptProposals in interface ConceptServiceincludeCompleted - boolean - include completed proposals as well?ConceptService.getAllConceptProposals(boolean)public java.util.List<ConceptProposal> getConceptProposals(java.lang.String cp)
ConceptServicegetConceptProposals in interface ConceptServiceConceptService.getConceptProposals(java.lang.String)@Deprecated public java.util.List<Concept> findProposedConcepts(java.lang.String text)
findProposedConcepts in interface ConceptServiceConceptService.findProposedConcepts(java.lang.String)public java.util.List<Concept> getProposedConcepts(java.lang.String text)
ConceptServicegetProposedConcepts in interface ConceptServiceConceptService.getProposedConcepts(java.lang.String)@Deprecated public void proposeConcept(ConceptProposal conceptProposal)
proposeConcept in interface ConceptServiceConceptService.proposeConcept(org.openmrs.ConceptProposal)public ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException
ConceptServicesaveConceptProposal in interface ConceptServiceconceptProposal - The ConceptProposal to saveAPIExceptionConceptService.saveConceptProposal(org.openmrs.ConceptProposal)public void purgeConceptProposal(ConceptProposal cp) throws APIException
ConceptServicepurgeConceptProposal in interface ConceptServiceAPIExceptionConceptService.purgeConceptProposal(org.openmrs.ConceptProposal)public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept, java.util.Locale locale) throws APIException
ConceptServicemapConceptProposalToConcept in interface ConceptServicelocale - of concept proposalAPIExceptionorg.openmrs.api.ConceptService#mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept, java.util.locale)public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
ConceptServicemapConceptProposalToConcept in interface ConceptServiceAPIExceptionConceptService.mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept)@Deprecated public void rejectConceptProposal(ConceptProposal cp)
ConceptProposal.rejectConceptProposal()rejectConceptProposal in interface ConceptServiceConceptService.rejectConceptProposal(org.openmrs.ConceptProposal)@Deprecated public java.util.List<ConceptProposal> findMatchingConceptProposals(java.lang.String text)
getConceptProposals(String)findMatchingConceptProposals in interface ConceptServiceConceptService.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 ConceptServiceConceptService.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 ConceptServiceAPIExceptionConceptService.findConceptAnswers(String, Locale, Concept)@Deprecated public java.util.List<Concept> getQuestionsForAnswer(Concept concept)
getConceptsByAnswer(Concept)getQuestionsForAnswer in interface ConceptServiceConceptService.getQuestionsForAnswer(org.openmrs.Concept)public java.util.List<Concept> getConceptsByAnswer(Concept concept) throws APIException
ConceptServicegetConceptsByAnswer in interface ConceptServiceAPIExceptionConceptService.getConceptsByAnswer(org.openmrs.Concept)public Concept getPrevConcept(Concept c)
ConceptServicegetPrevConcept in interface ConceptServicec - the offset ConceptConceptService.getPrevConcept(org.openmrs.Concept)public Concept getNextConcept(Concept c)
ConceptServicegetNextConcept in interface ConceptServicec - the offset ConceptConceptService.getNextConcept(org.openmrs.Concept)public void checkIfLocked()
throws ConceptsLockedException
ConceptServicecheckIfLocked in interface ConceptServiceConceptsLockedExceptionConceptService.checkIfLocked()public java.util.List<Concept> getConceptsWithDrugsInFormulary()
ConceptServicegetConceptsWithDrugsInFormulary in interface ConceptServiceConceptService.getConceptsWithDrugsInFormulary()@Deprecated
public void updateConceptWords()
throws APIException
updateConceptWords in interface ConceptServiceAPIExceptionConceptService.updateConceptWords()@Deprecated public void updateConceptWord(Concept concept) throws APIException
updateConceptWord in interface ConceptServiceAPIExceptionConceptService.updateConceptWord(org.openmrs.Concept)@Deprecated
public void updateConceptWords(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
throws APIException
updateConceptWords in interface ConceptServiceAPIExceptionConceptService.updateConceptWords(java.lang.Integer, java.lang.Integer)public java.lang.Integer getMaxConceptId()
ConceptServicegetMaxConceptId in interface ConceptServiceConceptService.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 userConceptWordspublic ConceptNameTag getConceptNameTagByName(java.lang.String tagName)
ConceptServicegetConceptNameTagByName in interface ConceptServicetagName - String name of ConceptNameTagConceptService.getConceptNameTagByName(java.lang.String)public java.util.Set<java.util.Locale> getLocalesOfConceptNames()
ConceptServicegetLocalesOfConceptNames in interface ConceptServiceConceptService.getLocalesOfConceptNames()public ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
ConceptServicegetConceptSource in interface ConceptServiceconceptSourceId - Integer conceptSourceIdConceptService.getConceptSource(java.lang.Integer)public java.util.List<ConceptSource> getAllConceptSources()
ConceptServicegetAllConceptSources in interface ConceptServiceConceptService.getAllConceptSources()public ConceptSource purgeConceptSource(ConceptSource cs) throws APIException
ConceptServicepurgeConceptSource in interface ConceptServicecs - ConceptSource object deleteAPIExceptionConceptService.purgeConceptSource(org.openmrs.ConceptSource)public ConceptSource retireConceptSource(ConceptSource cs, java.lang.String reason) throws APIException
ConceptServiceretireConceptSource in interface ConceptServicecs - the concept source to retirereason - why the concept source is to be retired, must not be empty of nullAPIExceptionConceptService.retireConceptSource(org.openmrs.ConceptSource,String)public ConceptSource saveConceptSource(ConceptSource conceptSource) throws APIException
ConceptServicesaveConceptSource in interface ConceptServiceconceptSource - ConceptSource to createAPIExceptionConceptService.saveConceptSource(org.openmrs.ConceptSource)public ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
ConceptServicesaveConceptNameTag in interface ConceptServicenameTag - the concept name tag to be savedConceptService.saveConceptNameTag(org.openmrs.ConceptNameTag)public java.util.Iterator<Concept> conceptIterator()
ConceptServiceconceptIterator in interface ConceptServiceConceptService.conceptIterator()public Concept getConceptByUuid(java.lang.String uuid)
ConceptServicegetConceptByUuid in interface ConceptServiceConceptService.getConceptByUuid(java.lang.String)public ConceptClass getConceptClassByUuid(java.lang.String uuid)
ConceptServicegetConceptClassByUuid in interface ConceptServiceConceptService.getConceptClassByUuid(java.lang.String)public ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
ConceptServicegetConceptAnswerByUuid in interface ConceptServicepublic ConceptName getConceptNameByUuid(java.lang.String uuid)
ConceptServicegetConceptNameByUuid in interface ConceptServicepublic ConceptSet getConceptSetByUuid(java.lang.String uuid)
ConceptServicegetConceptSetByUuid in interface ConceptServicepublic ConceptSource getConceptSourceByUuid(java.lang.String uuid)
ConceptServicegetConceptSourceByUuid in interface ConceptServicepublic ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
ConceptServicegetConceptDatatypeByUuid in interface ConceptServiceConceptService.getConceptDatatypeByUuid(java.lang.String)public ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
ConceptServicegetConceptNumericByUuid in interface ConceptServiceConceptService.getConceptNumericByUuid(java.lang.String)public ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
ConceptServicegetConceptProposalByUuid in interface ConceptServiceConceptService.getConceptProposalByUuid(java.lang.String)public Drug getDrugByUuid(java.lang.String uuid)
ConceptServicegetDrugByUuid in interface ConceptServiceConceptService.getDrugByUuid(java.lang.String)public DrugIngredient getDrugIngredientByUuid(java.lang.String uuid)
ConceptServicegetDrugIngredientByUuid in interface ConceptServiceuuid - the uuid for the drug ingredient to getConceptService.getDrugIngredientByUuid(java.lang.String)public ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
ConceptServicegetConceptDescriptionByUuid in interface ConceptServiceConceptService.getConceptDescriptionByUuid(java.lang.String)public ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
ConceptServicegetConceptNameTagByUuid in interface ConceptServiceConceptService.getConceptNameTagByUuid(java.lang.String)public java.util.List<ConceptNameTag> getAllConceptNameTags()
ConceptServicegetAllConceptNameTags in interface ConceptServiceConceptService.getAllConceptNameTags()public ConceptNameTag getConceptNameTag(java.lang.Integer id)
ConceptServiceConceptNameTag with the given database primary keygetConceptNameTag in interface ConceptServiceid - 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
ConceptServiceConceptMap 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 ConceptServicecode - the code associated with a concept within a given ConceptSourcesourceName - the name or hl7Code of the ConceptSource to checkConcept that has the given mapping, or null if no Concept foundAPIExceptionConceptService.getConceptByMapping(java.lang.String, java.lang.String)public Concept getConceptByMapping(java.lang.String code, java.lang.String sourceName, java.lang.Boolean includeRetired) throws APIException
ConceptServiceConceptMap 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 ConceptServicecode - the code associated with a concept within a given ConceptSourcesourceName - 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 foundAPIExceptionConceptService.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
ConceptServiceConceptMap This will return the list of concepts
Concepts 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
mappingCodegetConceptsByMapping in interface ConceptServicecode - the code associated with a concept within a given ConceptSourcesourceName - the name or hl7Code of the ConceptSource to checkConcepts that has the given mapping, or null if no
Concept foundAPIException - if the specified source+code maps to more than one conceptConceptServicepublic java.util.List<Concept> getConceptsByMapping(java.lang.String code, java.lang.String sourceName, boolean includeRetired) throws APIException
ConceptServiceConceptMap This will return the list of Concepts 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 ConceptServicecode - the code associated with a concept within a given ConceptSourcesourceName - the name or hl7Code of the ConceptSource to checkincludeRetired - whether or not to include retired conceptsConcepts that has the given mapping, or null if no
Concept foundAPIException - if the specified source+code maps to more than one conceptConceptServicepublic Concept getFalseConcept()
ConceptServicegetFalseConcept in interface ConceptServiceConceptService.getFalseConcept()public Concept getTrueConcept()
ConceptServicegetTrueConcept in interface ConceptServiceConceptService.getTrueConcept()public java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
ConceptServicegetConceptsByConceptSource in interface ConceptServiceAPIExceptionConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)public ConceptSource getConceptSourceByName(java.lang.String conceptSourceName) throws APIException
ConceptServicegetConceptSourceByName in interface ConceptServiceAPIExceptionConceptService.getConceptSourceByName(java.lang.String)public boolean hasAnyObservation(Concept concept)
ConceptServicehasAnyObservation in interface ConceptServiceconcept - which used or not used by an observationConceptService.hasAnyObservation(org.openmrs.Concept)public void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException
ConceptServiceconvertBooleanConceptToCoded in interface ConceptServiceconceptToChange - the concept which to changeAPIExceptionConceptService.convertBooleanConceptToCoded(org.openmrs.Concept)public boolean hasAnyObservation(ConceptName conceptName) throws APIException
ConceptServicehasAnyObservation in interface ConceptServiceconceptName - which is used or not used by an observationAPIExceptionConceptService.hasAnyObservation(org.openmrs.ConceptName)public java.util.List<ConceptSearchResult> findConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept) throws APIException
ConceptServicefindConceptAnswers in interface ConceptServiceconcept - the answers to match onAPIExceptionConceptService.findConceptAnswers(String, Locale, Concept)public java.util.List<java.lang.String> getConceptStopWords(java.util.Locale locale)
ConceptServiceConceptStopWord for given localegetConceptStopWords in interface ConceptServicelocale - The locale in which to search for the ConceptStopWordConceptService.getConceptStopWords(java.util.Locale)public ConceptStopWord saveConceptStopWord(ConceptStopWord conceptStopWord) throws APIException
ConceptServiceConceptStopWord 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 ConceptServiceconceptStopWord - The ConceptStopWord to save or updateConceptStopWord that was saved or updatedAPIExceptionConceptService.saveConceptStopWord(org.openmrs.ConceptStopWord)public void deleteConceptStopWord(java.lang.Integer conceptStopWordId)
throws APIException
ConceptServiceConceptStopWord in the databasedeleteConceptStopWord in interface ConceptServiceconceptStopWordId - The ConceptStopWord to deleteAPIExceptionConceptService.deleteConceptStopWord(Integer)public java.util.List<ConceptStopWord> getAllConceptStopWords()
ConceptServicegetAllConceptStopWords in interface ConceptServiceConceptStopWordConceptService.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
ConceptServicegetConcepts in interface ConceptServicephrase - 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
removedAPIExceptionConceptService.getConcepts(String, List, boolean, List, List, List, List, Concept,
Integer, Integer)public void updateConceptIndexes(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
throws APIException
ConceptServiceconceptIdStart and
conceptIdEnd (inclusive) and calls updateConceptIndexes(concept)updateConceptIndexes in interface ConceptServiceconceptIdStart - starts update with this concept_idconceptIdEnd - ends update with this concept_idAPIExceptionConceptService.updateConceptIndexes(Integer, Integer)public void updateConceptIndex(Concept concept) throws APIException
ConceptServiceConceptService.updateConceptIndexes() if you wish to update the entire concept index.updateConceptIndex in interface ConceptServiceconcept - the concept whose index is to be updatedAPIExceptionConceptService.updateConceptIndex(Concept)public void updateConceptIndexes()
throws APIException
ConceptServiceupdateConceptIndexes in interface ConceptServiceAPIExceptionConceptService.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)
ConceptServicegetCountOfConcepts in interface ConceptServicephrase - 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
ConceptServicegetCountOfDrugs in interface ConceptServicedrugName - 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 drugsAPIExceptionConceptService.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
ConceptServicegetDrugs in interface ConceptServicedrugName - 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 batchAPIExceptionConceptService.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
ConceptServicegetConcepts in interface ConceptServicephrase - 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 conceptsAPIExceptionConceptService.getConcepts(String, Locale, boolean)public java.util.List<ConceptMap> getConceptMappingsToSource(ConceptSource conceptSource) throws APIException
ConceptServicegetConceptMappingsToSource in interface ConceptServiceAPIExceptionConceptService.getConceptMappingsToSource(ConceptSource)public java.util.List<ConceptMapType> getActiveConceptMapTypes() throws APIException
ConceptServicegetActiveConceptMapTypes in interface ConceptServiceAPIExceptionConceptService.getActiveConceptMapTypes()public java.util.List<ConceptMapType> getConceptMapTypes(boolean includeRetired, boolean includeHidden) throws APIException
ConceptServicegetConceptMapTypes in interface ConceptServiceincludeRetired - specifies if retired concept map types should be includedAPIExceptionConceptService.getConceptMapTypes(boolean, boolean)public ConceptMapType getConceptMapType(java.lang.Integer conceptMapTypeId) throws APIException
ConceptServicegetConceptMapType in interface ConceptServiceconceptMapTypeId - Integer concept map type idAPIExceptionConceptService.getConceptMapType(Integer)public ConceptMapType getConceptMapTypeByUuid(java.lang.String uuid) throws APIException
ConceptServicegetConceptMapTypeByUuid in interface ConceptServiceuuid - the uuid to search againstAPIExceptionConceptService.getConceptMapTypeByUuid(String)public ConceptMapType getConceptMapTypeByName(java.lang.String name) throws APIException
ConceptServicegetConceptMapTypeByName in interface ConceptServicename - the name to search againstAPIExceptionConceptService.getConceptMapTypeByName(java.lang.String)public ConceptMapType saveConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptServicesaveConceptMapType in interface ConceptServiceconceptMapType - the concept map type to saveAPIExceptionConceptService.saveConceptMapType(org.openmrs.ConceptMapType)public ConceptMapType retireConceptMapType(ConceptMapType conceptMapType, java.lang.String retireReason) throws APIException
ConceptServiceretireConceptMapType in interface ConceptServiceconceptMapType - the concept map type to retireretireReason - the reason why the concept map type is being retiredAPIExceptionConceptService.retireConceptMapType(org.openmrs.ConceptMapType,
java.lang.String)public ConceptMapType unretireConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptServiceunretireConceptMapType in interface ConceptServiceconceptMapType - the concept map type to unretireAPIExceptionConceptService.unretireConceptMapType(org.openmrs.ConceptMapType)public void purgeConceptMapType(ConceptMapType conceptMapType) throws APIException
ConceptServicepurgeConceptMapType in interface ConceptServiceconceptMapType - the concept map type to purge from the databaseAPIExceptionConceptService.purgeConceptMapType(org.openmrs.ConceptMapType)public java.util.List<ConceptReferenceTerm> getAllConceptReferenceTerms() throws APIException
ConceptServicegetAllConceptReferenceTerms in interface ConceptServiceAPIExceptionConceptService.getAllConceptReferenceTerms()public java.util.List<ConceptReferenceTerm> getConceptReferenceTerms(boolean includeRetired) throws APIException
ConceptServicegetConceptReferenceTerms in interface ConceptServiceincludeRetired - specifies if retired concept reference terms should be includedAPIExceptionConceptService.getConceptReferenceTerms(boolean)public ConceptReferenceTerm getConceptReferenceTerm(java.lang.Integer conceptReferenceTermId) throws APIException
ConceptServicegetConceptReferenceTerm in interface ConceptServiceconceptReferenceTermId - the concept reference term id to search againstAPIExceptionConceptService.getConceptReferenceTerm(java.lang.Integer)public ConceptReferenceTerm getConceptReferenceTermByUuid(java.lang.String uuid) throws APIException
ConceptServicegetConceptReferenceTermByUuid in interface ConceptServiceuuid - the uuid to search againstAPIExceptionConceptService.getConceptReferenceTermByUuid(java.lang.String)public ConceptReferenceTerm getConceptReferenceTermByName(java.lang.String name, ConceptSource conceptSource) throws APIException
ConceptServicegetConceptReferenceTermByName in interface ConceptServicename - the name to match againstconceptSource - the concept source to match againstAPIExceptionConceptService.getConceptReferenceTermByName(java.lang.String,
org.openmrs.ConceptSource)public ConceptReferenceTerm getConceptReferenceTermByCode(java.lang.String code, ConceptSource conceptSource) throws APIException
ConceptServicegetConceptReferenceTermByCode in interface ConceptServicecode - the code to match againstconceptSource - the concept source to match againstAPIExceptionConceptService.getConceptReferenceTermByCode(java.lang.String,
org.openmrs.ConceptSource)public ConceptReferenceTerm saveConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptServicesaveConceptReferenceTerm in interface ConceptServiceconceptReferenceTerm - the concept reference term object to saveAPIExceptionConceptService.saveConceptReferenceTerm(org.openmrs.ConceptReferenceTerm)public ConceptReferenceTerm retireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm, java.lang.String retireReason) throws APIException
ConceptServiceretireConceptReferenceTerm in interface ConceptServiceconceptReferenceTerm - the concept reference term object to retireretireReason - the reason why the concept reference term is being retiredAPIExceptionConceptService.retireConceptReferenceTerm(ConceptReferenceTerm, String)public ConceptReferenceTerm unretireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptServiceunretireConceptReferenceTerm in interface ConceptServiceconceptReferenceTerm - the concept reference term to unretireAPIExceptionConceptService.unretireConceptReferenceTerm(org.openmrs.ConceptReferenceTerm)public void purgeConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm) throws APIException
ConceptServicepurgeConceptReferenceTerm in interface ConceptServiceconceptReferenceTerm - the concept reference term object to purgeAPIExceptionConceptService.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
ConceptServicegetConceptReferenceTerms in interface ConceptServicequery - 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 includedConceptReferenceTermsAPIExceptionConceptService.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)
ConceptServicegetCountOfConceptReferenceTerms in interface ConceptServicequery - 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
ConceptServiceConceptReferenceTermMap where the specified reference term is the
termB i.e mappings added to other terms pointing to itgetReferenceTermMappingsTo in interface ConceptServiceterm - the term to match againstConceptReferenceTermMapsAPIExceptionConceptService.getReferenceTermMappingsTo(ConceptReferenceTerm)public java.util.List<Concept> getConceptsByName(java.lang.String name, java.util.Locale locale, java.lang.Boolean exactLocale) throws APIException
ConceptServiceThis 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 ConceptServicelocale - null = all localesexactLocale - false if search for both global and country specific,
true if nullAPIExceptionConceptService.getConceptsByName(java.lang.String, java.util.Locale,
java.lang.Boolean)public ConceptMapType getDefaultConceptMapType() throws APIException
ConceptServiceconcept.defaultConceptMapType global property.getDefaultConceptMapType in interface ConceptServiceConceptMapTypeAPIExceptionConceptService.getDefaultConceptMapType()public java.util.List<Drug> getDrugs(java.lang.String searchPhrase, java.util.Locale locale, boolean exactLocale, boolean includeRetired) throws APIException
ConceptServicegetDrugs in interface ConceptServicesearchPhrase - 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 notAPIExceptionConceptService.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
ConceptServicegetDrugsByMapping in interface ConceptServicecode - 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 notDrugAPIExceptionConceptService.getDrugsByMapping(String, ConceptSource, Collection,
boolean)public Drug getDrugByMapping(java.lang.String code, ConceptSource conceptSource, java.util.Collection<ConceptMapType> withAnyOfTheseTypesOrOrderOfPreference) throws APIException
ConceptServicegetDrugByMapping in interface ConceptServicecode - the code the reference term code to match onconceptSource - the concept source to match onwithAnyOfTheseTypesOrOrderOfPreference - the ConceptMapTypes to match onDrugAPIExceptionorg.openmrs.api.ConceptService#getDrugByMapping(String, org.openmrs.ConceptSource,
java.util.Collectionpublic 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)
ConceptServicegetOrderableConcepts in interface ConceptServicephrase - 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.