@Transactional public interface ConceptService extends OpenmrsService
To get a list of concepts:
List<Concept> concepts = Context.getConceptService().getAllConcepts();To get a single concept:
// if there is a concept row in the database with concept_id = 3845 Concept concept = Context.getConceptService().getConcept(3845); String name = concept.getPreferredName(Context.getLocale()).getName();To save a concept to the database
Concept concept = new Concept(); concept.setConceptClass(Context.getConceptService().getConceptClass(3)); concept.setDatatype(Context.getConceptService().getConceptDatatype(17)); concept.setName... ... // and other required values on the concept Context.getConceptService().saveConcept(concept);
Context| Modifier and Type | Method and Description |
|---|---|
void |
checkIfLocked()
Check if the concepts are locked and if so, throw exception during manipulation of concept
|
Iterator<Concept> |
conceptIterator()
Returns an iterator for all concepts, including retired and expired.
|
void |
convertBooleanConceptToCoded(Concept conceptToChange)
Changes the datatype of a concept from boolean to coded when it has observations it is
associated to.
|
void |
createConcept(Concept concept)
Deprecated.
use #saveConcept(Concept)
|
void |
createConcept(ConceptNumeric concept)
Deprecated.
use #saveConcept(Concept)
|
void |
createDrug(Drug drug)
Deprecated.
use #saveDrug(Drug)
|
void |
deleteConcept(Concept concept)
Deprecated.
use #purgeConcept(Concept concept)
|
List<ConceptSearchResult> |
findConceptAnswers(String phrase,
Locale locale,
Concept concept)
Finds concepts that are possible value coded answers to concept parameter
|
List<ConceptWord> |
findConceptAnswers(String phrase,
Locale locale,
Concept concept,
boolean includeRetired)
Deprecated.
|
List<ConceptWord> |
findConcepts(String phrase,
List<Locale> searchLocales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes)
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired)
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired,
int start,
int size)
|
List<ConceptWord> |
findConcepts(String phrase,
Locale locale,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes)
|
List<Drug> |
findDrugs(String phrase,
boolean includeVoided)
Deprecated.
Use
getDrugs(String) |
List<ConceptProposal> |
findMatchingConceptProposals(String text)
Deprecated.
|
List<Concept> |
findProposedConcepts(String text)
Deprecated.
|
List<ConceptClass> |
getAllConceptClasses()
Return a list of concept classes currently in the database
|
List<ConceptClass> |
getAllConceptClasses(boolean includeRetired)
Return a list of concept classes currently in the database
|
List<ConceptDatatype> |
getAllConceptDatatypes()
Return a list of all concept datatypes currently in the database
|
List<ConceptDatatype> |
getAllConceptDatatypes(boolean includeRetired)
Return a list of concept datatypes currently in the database
|
List<ConceptNameTag> |
getAllConceptNameTags()
Get all the concept name tags defined in the database, included voided ones
|
List<ConceptProposal> |
getAllConceptProposals(boolean includeCompleted)
Get a List of all concept proposals
|
List<Concept> |
getAllConcepts()
Return a list of unretired concepts sorted by concept id ascending and
|
List<Concept> |
getAllConcepts(String sortBy,
boolean asc,
boolean includeRetired)
Return a list of concepts sorted on sortBy in dir direction (asc/desc)
|
List<ConceptSource> |
getAllConceptSources()
Return a list of concept sources currently in the database that are not voided
|
List<Drug> |
getAllDrugs()
Return a list of drugs currently in the database that are not retired
|
List<Drug> |
getAllDrugs(boolean includeRetired)
Get drugs by concept.
|
Concept |
getConcept(Integer conceptId)
Gets the concept with the given id
|
Concept |
getConcept(String conceptIdOrName)
Get Concept by id or name convenience method
|
ConceptAnswer |
getConceptAnswer(Integer conceptAnswerId)
Gets the ConceptAnswer with the given id
|
ConceptAnswer |
getConceptAnswerByUuid(String uuid)
Get ConceptAnswer by its UUID
|
List<ConceptWord> |
getConceptAnswers(String phrase,
Locale locale,
Concept concept)
Deprecated.
|
Concept |
getConceptByIdOrName(String idOrName)
Deprecated.
|
Concept |
getConceptByMapping(String code,
String sourceName)
Looks up a concept via
ConceptMap This will return the Concept which contains
a ConceptMap entry whose sourceCode is equal to the passed
conceptCode and whose ConceptSource has either a name or
hl7Code that is equal to the passed mappingCode. |
Concept |
getConceptByMapping(String code,
String sourceName,
Boolean includeRetired)
Looks up a concept via
ConceptMap This will return the Concept which contains
a ConceptMap entry whose sourceCode is equal to the passed
conceptCode and whose ConceptSource has either a name or
hl7Code that is equal to the passed mappingCode . |
Concept |
getConceptByName(String name)
Return a Concept that matches the name exactly
|
Concept |
getConceptByUuid(String uuid)
Get Concept by its UUID
|
ConceptClass |
getConceptClass(Integer conceptClassId)
Return a Concept class matching the given identifier
|
ConceptClass |
getConceptClassByName(String name)
Return a Concept class matching the given name
|
ConceptClass |
getConceptClassByUuid(String uuid)
Get ConceptClass by its UUID
|
List<ConceptClass> |
getConceptClasses()
Deprecated.
|
ConceptComplex |
getConceptComplex(Integer conceptId)
Get a ComplexConcept with the given conceptId
|
ConceptDatatype |
getConceptDatatype(Integer i)
Return a ConceptDatatype matching the given identifier
|
ConceptDatatype |
getConceptDatatypeByName(String name)
Return a Concept datatype matching the given name
|
ConceptDatatype |
getConceptDatatypeByUuid(String uuid)
Get ConceptDatatype by its UUID
|
List<ConceptDatatype> |
getConceptDatatypes(String name)
Deprecated.
you *probably* want to use
getConceptDatatypeByName(String) |
ConceptDescription |
getConceptDescriptionByUuid(String uuid)
Get ConceptDescription by its UUID
|
ConceptName |
getConceptName(Integer conceptNameId)
Gets the concept-name with the given id
|
ConceptName |
getConceptNameByUuid(String uuid)
Get ConceptName by its UUID
|
ConceptNameTag |
getConceptNameTag(Integer id)
Gets the
ConceptNameTag with the given database primary key |
ConceptNameTag |
getConceptNameTagByName(String tag)
Search for a ConceptNameTag by name
|
ConceptNameTag |
getConceptNameTagByUuid(String uuid)
Get ConceptNameTag by its UUID
|
ConceptNumeric |
getConceptNumeric(Integer conceptId)
Get the ConceptNumeric with the given id
|
ConceptNumeric |
getConceptNumericByUuid(String uuid)
Get ConceptNumeric by its UUID
|
ConceptProposal |
getConceptProposal(Integer conceptProposalId)
Get a ConceptProposal by conceptProposalId
|
ConceptProposal |
getConceptProposalByUuid(String uuid)
Get ConceptProposal by its UUID
|
List<ConceptProposal> |
getConceptProposals(boolean includeCompleted)
Deprecated.
|
List<ConceptProposal> |
getConceptProposals(String text)
Find matching concept proposals
|
List<ConceptSearchResult> |
getConcepts(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept,
Integer start,
Integer size)
Searches for concepts by the given parameters
|
List<ConceptSearchResult> |
getConcepts(String phrase,
Locale locale,
boolean includeRetired)
Searches for concepts with the given parameters
|
List<Concept> |
getConcepts(String sortBy,
String dir)
Deprecated.
|
List<Concept> |
getConceptsByAnswer(Concept concept)
Returns all possible Concepts to which this concept is a value-coded answer.
|
List<Concept> |
getConceptsByClass(ConceptClass cc) |
List<Concept> |
getConceptsByConceptSet(Concept concept)
Return a List of all concepts within a concept set
|
List<ConceptMap> |
getConceptsByConceptSource(ConceptSource conceptSource)
Looks up a list of ConceptMaps for a given ConceptSource
|
List<Concept> |
getConceptsByMapping(String code,
String sourceName)
Looks up a concept via
ConceptMap This will return the list of concepts
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 |
List<Concept> |
getConceptsByMapping(String code,
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. |
List<Concept> |
getConceptsByName(String name)
Returns a list of concepts matching any part of a concept name, this method is case
insensitive to the concept name string
|
List<Concept> |
getConceptsByName(String name,
Locale locale,
Boolean exactLocale)
Returns a list of concepts with the same name in the given locale.
|
ConceptSet |
getConceptSetByUuid(String uuid)
Get ConceptSet by its UUID
|
List<ConceptSet> |
getConceptSets(Concept concept)
Deprecated.
|
List<ConceptSet> |
getConceptSetsByConcept(Concept concept)
Return a list of the concept sets with concept_set matching concept
|
List<Concept> |
getConceptsInSet(Concept concept)
Deprecated.
|
ConceptSource |
getConceptSource(Integer i)
Return a Concept source matching the given concept source id
|
ConceptSource |
getConceptSourceByName(String conceptSourceName)
Lookup a ConceptSource by its name property
|
ConceptSource |
getConceptSourceByUuid(String uuid)
Get ConceptSource by its UUID
|
List<Concept> |
getConceptsWithDrugsInFormulary()
Convenience method for finding concepts associated with drugs in formulary.
|
List<ConceptWord> |
getConceptWords(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept,
Integer start,
Integer size)
|
List<ConceptWord> |
getConceptWords(String phrase,
Locale locale)
Deprecated.
use
#getConcepts(String, Locale) that returns a list of
ConceptSearchResults |
Integer |
getCountOfConcepts(String phrase,
List<Locale> locales,
boolean includeRetired,
List<ConceptClass> requireClasses,
List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept)
Return the number of concepts matching a search phrase and the specified arguments
|
Integer |
getCountOfDrugs(String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired)
Return the number of drugs with matching names or concept drug names
|
Drug |
getDrug(Integer drugId)
Get the Drug with the given id
|
Drug |
getDrug(String drugNameOrId)
Return the drug object corresponding to the given name or drugId
|
Drug |
getDrugByNameOrId(String drugId)
Return the drug object corresponding to the given name or drugId
|
Drug |
getDrugByUuid(String uuid)
Get Drug by its UUID
|
List<Drug> |
getDrugs()
Deprecated.
use
getAllDrugs() |
List<Drug> |
getDrugs(Concept concept)
Deprecated.
|
List<Drug> |
getDrugs(String phrase)
<<<<<<< HEAD
Find drugs in the system.
|
List<Drug> |
getDrugs(String drugName,
Concept concept,
boolean searchOnPhrase,
boolean searchDrugConceptNames,
boolean includeRetired,
Integer start,
Integer length)
Returns a list of drugs with matching names or concept drug names and returns a specific
number of them from the specified starting position.
|
List<Drug> |
getDrugsByConcept(Concept concept)
Return a list of drugs associated with the given concept
|
Concept |
getFalseConcept()
Returns the FALSE concept
|
Set<Locale> |
getLocalesOfConceptNames()
Gets the set of unique Locales used by existing concept names.
|
Integer |
getMaxConceptId()
Gets the highest concept-id used by a concept.
|
Concept |
getNextConcept(Concept concept)
Finds the next concept in the dictionary that has the next largest concept id
|
Concept |
getPrevConcept(Concept concept)
Finds the previous concept in the dictionary that has the next lowest concept id
|
List<Concept> |
getProposedConcepts(String text)
Find matching proposed concepts
|
List<Concept> |
getQuestionsForAnswer(Concept concept)
Deprecated.
use #getConceptsByAnswer(Concept)
|
List<ConceptSet> |
getSetsContainingConcept(Concept concept)
Find all sets that the given concept is a member of
|
Concept |
getTrueConcept()
Returns the TRUE concept
|
boolean |
hasAnyObservation(Concept concept)
Checks if there are any observations (including voided observations) for a concept.
|
boolean |
hasAnyObservation(ConceptName conceptName)
Checks if there are any observations (including voided observations) using a conceptName.
|
Concept |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept)
Maps a concept proposal to a concept
|
Concept |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept,
Locale locale)
Maps a concept proposal to a concept
|
void |
proposeConcept(ConceptProposal conceptProposal)
Deprecated.
|
void |
purgeConcept(Concept conceptOrConceptNumeric)
Completely purge a
Concept or ConceptNumeric from the database. |
void |
purgeConceptClass(ConceptClass cc)
Purge a ConceptClass
|
void |
purgeConceptDatatype(ConceptDatatype cd)
Purge a ConceptDatatype.
|
void |
purgeConceptProposal(ConceptProposal cp)
Removes a concept proposal from the database entirely.
|
ConceptSource |
purgeConceptSource(ConceptSource cs)
Delete ConceptSource
|
void |
purgeDrug(Drug drug)
Completely purge a Drug from the database.
|
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated.
|
Concept |
retireConcept(Concept conceptOrConceptNumeric,
String reason)
Retiring a concept essentially removes it from circulation
|
ConceptSource |
retireConceptSource(ConceptSource cs,
String reason)
This effectively removes a concept source from the database.
|
Drug |
retireDrug(Drug drug,
String reason)
Retiring a Drug essentially removes it from circulation
|
Concept |
saveConcept(Concept concept)
Save or update the given
Concept or ConceptNumeric in the database |
ConceptClass |
saveConceptClass(ConceptClass cc)
Creates or updates a concept class
|
ConceptDatatype |
saveConceptDatatype(ConceptDatatype cd)
Create or update a ConceptDatatype
|
ConceptNameTag |
saveConceptNameTag(ConceptNameTag nameTag)
Creates a new Concept name tag if none exists.
|
ConceptProposal |
saveConceptProposal(ConceptProposal conceptProposal)
Saves/updates/proposes a concept proposal
|
ConceptSource |
saveConceptSource(ConceptSource conceptSource)
Create a new ConceptSource
|
Drug |
saveDrug(Drug drug)
Save or update the given
Drug in the database. |
void |
setConceptDAO(ConceptDAO dao)
Sets the data access object for Concepts.
|
Drug |
unretireDrug(Drug drug)
Marks a drug that is currently retired as not retired.
|
void |
updateConcept(Concept concept)
Deprecated.
use #saveConcept(Concept)
|
void |
updateConcept(ConceptNumeric concept)
Deprecated.
use #saveConcept(Concept)
|
void |
updateConceptIndex(Concept concept)
Iterates over the words in names and synonyms (for each locale) and updates the concept
index, note that this only updates the index of the specified concept.
|
void |
updateConceptIndexes()
Iterates over all concepts and calls upddateConceptIndexes(Concept concept)
|
void |
updateConceptIndexes(Integer conceptIdStart,
Integer conceptIdEnd)
Iterates over all concepts with conceptIds between
conceptIdStart and
conceptIdEnd (inclusive) and calls updateConceptIndexes(concept) |
void |
updateConceptSetDerived()
Iterates over all concepts calling updateConceptSetDerived(concept)
|
void |
updateConceptSetDerived(Concept concept)
Updates the concept set derived business table for this concept (bursting the concept sets)
|
void |
updateConceptWord(Concept concept)
Deprecated.
|
void |
updateConceptWords()
Deprecated.
|
void |
updateConceptWords(Integer conceptIdStart,
Integer conceptIdEnd)
Deprecated.
|
void |
updateDrug(Drug drug)
Deprecated.
use #saveDrug(Drug)
|
void |
voidConcept(Concept concept,
String reason)
Deprecated.
|
onShutdown, onStartupvoid setConceptDAO(ConceptDAO dao)
dao - The data access object to use@Deprecated @Authorized(value="Manage Concepts") void createConcept(Concept concept) throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void createConcept(ConceptNumeric concept) throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void updateConcept(Concept concept) throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByUuid(String uuid)
uuid - @Deprecated @Authorized(value="Manage Concepts") void updateConcept(ConceptNumeric concept) throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void createDrug(Drug drug) throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void updateDrug(Drug drug) throws APIException
APIException@Deprecated @Authorized(value="Purge Concepts") void deleteConcept(Concept concept) throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void voidConcept(Concept concept, String reason) throws APIException
retireConcept(Concept, String)APIException@Authorized(value="Manage Concepts") Concept saveConcept(Concept concept) throws APIException
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
concept - The Concept or ConceptNumeric to save or updateConcept or ConceptNumeric that was saved or updatedAPIExceptionConceptsLockedExceptionConceptInUseException@Authorized(value="Manage Concepts") Drug saveDrug(Drug drug) throws APIException
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 databasedrug - The Drug to save or updateAPIException@Authorized(value="Purge Concepts") void purgeConcept(Concept conceptOrConceptNumeric) throws APIException
Concept or ConceptNumeric from the database.
This should not typically be used unless desperately needed. Most should just be retired. See
retireConcept(Concept, String)conceptOrConceptNumeric - The Concept or ConceptNumeric to
remove from the systemAPIException@Authorized(value="Manage Concepts") Concept retireConcept(Concept conceptOrConceptNumeric, String reason) throws APIException
conceptOrConceptNumeric - The Concept or ConceptNumeric to
retirereason - The retire reasonConcept or ConceptNumericAPIException@Authorized(value="Manage Concepts") Drug retireDrug(Drug drug, String reason) throws APIException
drug - The Drug to retirereason - The retire reasonAPIException@Authorized(value="Manage Concepts") Drug unretireDrug(Drug drug) throws APIException
drug - that is current set as retiredAPIException@Authorized(value="Purge Concepts") void purgeDrug(Drug drug) throws APIException
drug - The Drug to remove from the systemAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConcept(Integer conceptId) throws APIException
conceptId - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptName getConceptName(Integer conceptNameId) throws APIException
conceptNameId - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptAnswer getConceptAnswer(Integer conceptAnswerId) throws APIException
conceptAnswerId - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrug(Integer drugId) throws APIException
drugId - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNumeric getConceptNumeric(Integer conceptId) throws APIException
conceptId - The ConceptNumeric idAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptClass getConceptClass(Integer conceptClassId) throws APIException
conceptClassId - the concept class identifierAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getAllConcepts() throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getAllConcepts(String sortBy, boolean asc, boolean includeRetired) throws APIException
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@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConcepts(String sortBy, String dir) throws APIException
getAllConcepts(String, boolean, boolean)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByName(String name) throws APIException
name - The search stringAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByName(String name) throws APIException
name - The search stringAPIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByIdOrName(String idOrName) throws APIException
getConcept(String)Note: this just calls other impl methods; no DAO of its own
idOrName - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConcept(String conceptIdOrName) throws APIException
conceptIdOrName - APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size) throws APIException
getConcepts(String, List, boolean, List, List, List, List, Concept, Integer, Integer)APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> getConceptWords(String phrase, Locale locale) throws APIException
#getConcepts(String, Locale) that returns a list of
ConceptSearchResultsAPIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired) throws APIException
getConcepts(String, List, boolean, List, List, List, List, Concept, Integer, Integer)APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes) throws APIException
getConcepts(String, List, boolean, List, List, List, List, Concept, Integer, Integer)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrugByUuid(String uuid)
uuid - @Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, int start, int size) throws APIException
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrug(String drugNameOrId) throws APIException
drugNameOrId - String name or drugId to match exactly onAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrugByNameOrId(String drugId) throws APIException
drugId - StringAPIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getDrugs() throws APIException
getAllDrugs()APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getAllDrugs() throws APIException
APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getDrugs(Concept concept) throws APIException
getDrugsByConcept(Concept)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getDrugsByConcept(Concept concept) throws APIException
concept - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getAllDrugs(boolean includeRetired)
includeRetired - If true then the search will include voided Drugs@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> findDrugs(String phrase, boolean includeVoided) throws APIException
getDrugs(String)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getDrugs(String phrase) throws APIException
phrase - Search phraseAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByClass(ConceptClass cc) throws APIException
cc - ConceptClassAPIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Classes") List<ConceptClass> getConceptClasses() throws APIException
getAllConceptClasses(boolean)APIException@Transactional(readOnly=true) @Authorized(value="View Concept Classes") ConceptClass getConceptClassByName(String name) throws APIException
name - APIException@Transactional(readOnly=true) @Authorized(value="View Concept Classes") List<ConceptClass> getAllConceptClasses() throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concept Classes") List<ConceptClass> getAllConceptClasses(boolean includeRetired) throws APIException
includeRetired - include retired concept classes in the search results?APIException@Transactional(readOnly=true) @Authorized(value="View Concept Classes") ConceptClass getConceptClassByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptAnswer getConceptAnswerByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptName getConceptNameByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptSet getConceptSetByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concept Sources") ConceptSource getConceptSourceByUuid(String uuid)
uuid - @Authorized(value="Manage Concept Classes") ConceptClass saveConceptClass(ConceptClass cc) throws APIException
cc - ConceptClass to create or updateAPIException@Authorized(value="Purge Concept Classes") void purgeConceptClass(ConceptClass cc) throws APIException
cc - ConceptClass to deleteAPIException@Authorized(value="Manage Concept Datatypes") ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws APIException
cd - ConceptDatatype to create or updateAPIException@Authorized(value="Purge Concept Datatypes") void purgeConceptDatatype(ConceptDatatype cd) throws APIException
cd - ConceptDatatype to purgeAPIException@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") List<ConceptDatatype> getAllConceptDatatypes() throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws APIException
includeRetired - boolean - include the retired datatypes?APIException@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") @Deprecated List<ConceptDatatype> getConceptDatatypes(String name) throws APIException
getConceptDatatypeByName(String)name - APIException@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatype(Integer i) throws APIException
i - Integer for the requested ConceptDatatypeAPIException@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatypeByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatypeByName(String name) throws APIException
name - APIException@Authorized(value="Manage Concepts") void updateConceptSetDerived(Concept concept) throws APIException
concept - APIException@Authorized(value="Manage Concepts") void updateConceptSetDerived() throws APIException
APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSet> getConceptSets(Concept concept) throws APIException
getConceptSetsByConcept(Concept)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSet> getConceptSetsByConcept(Concept concept) throws APIException
For example to find all concepts for ARVs, you would do getConceptSets(getConcept("ANTIRETROVIRAL MEDICATIONS")) and then take the conceptIds from the resulting list.
concept - The concept representing the concept setAPIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsInSet(Concept concept) throws APIException
getConceptsByConceptSet(Concept)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByConceptSet(Concept concept) throws APIException
concept - The concept representing the concept setAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSet> getSetsContainingConcept(Concept concept) throws APIException
concept - APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Proposals") List<ConceptProposal> getConceptProposals(boolean includeCompleted) throws APIException
getAllConceptProposals(boolean)APIException@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") List<ConceptProposal> getAllConceptProposals(boolean includeCompleted) throws APIException
includeCompleted - boolean - include completed proposals as well?APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNumeric getConceptNumericByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concept Proposals") ConceptProposal getConceptProposal(Integer conceptProposalId) throws APIException
conceptProposalId - the Integer concept proposal IdAPIException@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") List<ConceptProposal> getConceptProposals(String text) throws APIException
text - APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Proposals") List<Concept> findProposedConcepts(String text) throws APIException
getProposedConcepts(String)APIException@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") List<Concept> getProposedConcepts(String text) throws APIException
text - APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> findConcepts(String phrase, List<Locale> searchLocales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes)
@Deprecated @Authorized(value="Add Concept Proposals") void proposeConcept(ConceptProposal conceptProposal) throws APIException
saveConceptProposal(ConceptProposal)APIException@Authorized(value={"Add Concept Proposals","Edit Concept Proposals"}) ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException
conceptProposal - The ConceptProposal to saveAPIException@Authorized(value="Purge Concept Proposals") void purgeConceptProposal(ConceptProposal cp) throws APIException
cp - APIException@Authorized(value="Manage Concepts") Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
cp - mappedConcept - APIException@Authorized(value="Manage Concepts") Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept, Locale locale) throws APIException
cp - mappedConcept - locale - of concept proposalAPIException@Deprecated @Authorized(value="Edit Concept Proposals") void rejectConceptProposal(ConceptProposal cp) throws APIException
ConceptProposal.rejectConceptProposal()APIException@Deprecated @Authorized(value="Add Concept Proposals") List<ConceptProposal> findMatchingConceptProposals(String text)
getConceptProposals(String)@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concept concept, boolean includeRetired) throws APIException
findConceptAnswers(String, Locale, Concept)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") @Deprecated List<ConceptWord> getConceptAnswers(String phrase, Locale locale, Concept concept) throws APIException
findConceptAnswers(String, Locale, Concept)APIException@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getQuestionsForAnswer(Concept concept) throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByAnswer(Concept concept) throws APIException
concept - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getPrevConcept(Concept concept) throws APIException
concept - the offset ConceptAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getNextConcept(Concept concept) throws APIException
concept - the offset ConceptAPIException@Transactional(readOnly=true)
void checkIfLocked()
throws ConceptsLockedException
ConceptsLockedException@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") ConceptProposal getConceptProposalByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsWithDrugsInFormulary() throws APIException
APIException@Deprecated @Authorized(value="Manage Concepts") void updateConceptWord(Concept concept) throws APIException
updateConceptWord(Concept)APIException@Deprecated @Authorized(value="Manage Concepts") void updateConceptWords() throws APIException
updateConceptWords()APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTagByUuid(String uuid)
uuid - Concept.setPreferredName(ConceptName),
Concept.setFullySpecifiedName(ConceptName),
Concept.setShortName(ConceptName)@Deprecated @Authorized(value="Manage Concepts") void updateConceptWords(Integer conceptIdStart, Integer conceptIdEnd) throws APIException
updateConceptIndexes(Integer, Integer)APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptComplex getConceptComplex(Integer conceptId)
conceptId - of the ComplexConcept@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTagByName(String tag)
tag - String name of ConceptNameTagConcept.getPreferredName(Locale),
Concept.getFullySpecifiedName(Locale),
Concept.getShortNameInLocale(Locale),
Concept.getShortestName(Locale, Boolean)@Transactional(readOnly=true) Set<Locale> getLocalesOfConceptNames()
@Transactional(readOnly=true) @Authorized(value="View Concept Sources") List<ConceptSource> getAllConceptSources() throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Concept Sources") ConceptSource getConceptSource(Integer i) throws APIException
i - Integer conceptSourceIdAPIException@Authorized(value="Manage Concept Sources") ConceptSource saveConceptSource(ConceptSource conceptSource) throws APIException
conceptSource - ConceptSource to createAPIException@Authorized(value="Purge Concept Sources") ConceptSource purgeConceptSource(ConceptSource cs) throws APIException
cs - ConceptSource object deleteAPIException@Authorized(value="Purge Concept Sources") ConceptSource retireConceptSource(ConceptSource cs, String reason) throws APIException
cs - the concept source to retirereason - why the concept source is to be retired, must not be empty of nullAPIException@Authorized(value="Manage Concept Name tags") ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
nameTag - the concept name tag to be saved@Transactional(readOnly=true) Integer getMaxConceptId()
@Transactional(readOnly=true) @Authorized(value="View Concepts") Iterator<Concept> conceptIterator()
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByMapping(String code, String sourceName) throws APIException
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=truecode - 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 foundAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByMapping(String code, String sourceName, Boolean includeRetired) throws APIException
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 appliescode - 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 foundAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByMapping(String code, String sourceName) throws APIException
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
mappingCodecode - 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 concept@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByMapping(String code, String sourceName, boolean includeRetired) throws APIException
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. Delegates to
getConceptsByMapping(code,sourceName,includeRetired) with includeRetired=truecode - 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 concept@Transactional(readOnly=true) List<ConceptNameTag> getAllConceptNameTags()
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTag(Integer id)
ConceptNameTag with the given database primary keyid - the concept name tag id to findConceptNameTag or null if none found@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptDescription getConceptDescriptionByUuid(String uuid)
uuid - @Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptSource getConceptSourceByName(String conceptSourceName) throws APIException
conceptSourceName - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
conceptSource - APIException@Transactional(readOnly=true) @Authorized(value="View Concepts") boolean hasAnyObservation(Concept concept)
concept - which used or not used by an observationAPIException@Transactional(readOnly=true) Concept getTrueConcept()
@Transactional(readOnly=true) Concept getFalseConcept()
@Authorized(value="Manage Concepts") void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException
conceptToChange - the concept which to changeAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") boolean hasAnyObservation(ConceptName conceptName) throws APIException
conceptName - which is used or not used by an observationAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size) throws APIException
phrase - matched to the start of any word in any of the names of a conceptlocales - ListincludeRetired - boolean if false, will exclude retired conceptsrequireClasses - ListexcludeClasses - ListrequireDatatypes - ListexcludeDatatypes - ListanswersToConcept - all results will be a possible answer to this conceptstart - all results less than this number will be removedsize - if non zero, all results after start + size will be
removedAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSearchResult> findConceptAnswers(String phrase, Locale locale, Concept concept) throws APIException
phrase - locale - concept - the answers to match onAPIException@Authorized(value="Manage Concepts") void updateConceptIndex(Concept concept) throws APIException
updateConceptIndexes() if you wish to update the entire concept index.concept - the concept whose index is to be updatedAPIException@Authorized(value="Manage Concepts") void updateConceptIndexes() throws APIException
APIException@Authorized(value="Manage Concepts") void updateConceptIndexes(Integer conceptIdStart, Integer conceptIdEnd) throws APIException
conceptIdStart and
conceptIdEnd (inclusive) and calls updateConceptIndexes(concept)conceptIdStart - starts update with this concept_idconceptIdEnd - ends update with this concept_idAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") List<ConceptSearchResult> getConcepts(String phrase, Locale locale, boolean includeRetired) throws APIException
phrase - the string to search againstlocale - the locale in which to search for the conceptsincludeRetired - Specifies whether to include retired conceptsAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Integer getCountOfConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept)
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 conceptAPIException@Transactional(readOnly=true) @Authorized(value="View Concepts") Integer getCountOfDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired) throws APIException
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@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Drug> getDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired, Integer start, Integer length) throws APIException
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@Transactional(readOnly=true) @Authorized(value="View Concepts") List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale) throws APIException
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.
name - locale - null = all localesexactLocale - false if search for both global and country specific, true if nullAPIExceptionCopyright © 2018 OpenMRS LLC.. All Rights Reserved.