|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.impl.BaseOpenmrsService org.openmrs.api.impl.ConceptServiceImpl
public class ConceptServiceImpl
Default Implementation of ConceptService service layer classes
to access these methods
Field Summary | |
---|---|
static java.lang.String |
CONCEPT_WORD_UPDATE_TASK_NAME
|
Constructor Summary | |
---|---|
ConceptServiceImpl()
|
Method Summary | |
---|---|
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. 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) |
java.util.List<ConceptWord> |
findConceptAnswers(java.lang.String phrase,
java.util.Locale locale,
Concept concept,
boolean includeRetired)
Deprecated. use getConceptAnswers(String, Locale, Concept) |
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. use getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer) |
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired)
Deprecated. use getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer) |
java.util.List<ConceptWord> |
findConcepts(java.lang.String phrase,
java.util.Locale locale,
boolean includeRetired,
int start,
int size)
Deprecated. use getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer) |
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. use getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer) |
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. use getConceptProposals(String) |
java.util.List<Concept> |
findProposedConcepts(java.lang.String text)
Deprecated. |
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<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<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)
Finds concepts that are possible value coded answers to concept parameter |
Concept |
getConceptByIdOrName(java.lang.String idOrName)
Deprecated. use getConcept(String) |
Concept |
getConceptByMapping(java.lang.String conceptCode,
java.lang.String mappingCode)
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. use getAllConceptDatatypes() |
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 |
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. use getAllConceptProposals(boolean) |
java.util.List<ConceptProposal> |
getConceptProposals(java.lang.String cp)
Find matching concept proposals |
java.util.List<Concept> |
getConcepts(java.lang.String sortBy,
java.lang.String dir)
Deprecated. use getAllConcepts(String, boolean, boolean) |
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> |
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 |
ConceptSet |
getConceptSetByUuid(java.lang.String uuid)
Get ConceptSet by its UUID |
java.util.List<ConceptSet> |
getConceptSets(Concept c)
Deprecated. use getConceptSetsByConcept(Concept) |
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. use getConceptsByConceptSet(Concept) |
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<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)
Searches for concepts by the given parameters via the ConceptWord table |
java.util.List<ConceptWord> |
getConceptWords(java.lang.String phrase,
java.util.Locale locale)
Convenience method for ConceptService.getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer) |
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 |
getDrugByNameOrId(java.lang.String drugNameOrId)
Deprecated. use getDrug(String) |
Drug |
getDrugByUuid(java.lang.String uuid)
Get Drug by its UUID |
java.util.List<Drug> |
getDrugs()
Deprecated. use getAllDrugs() |
java.util.List<Drug> |
getDrugs(boolean includeVoided)
Deprecated. Use getAllDrugs(boolean) |
java.util.List<Drug> |
getDrugs(Concept concept)
Deprecated. use getDrugsByConcept(Concept) |
java.util.List<Drug> |
getDrugs(Concept concept,
boolean includeRetired)
Deprecated. Use getDrugsByConcept(Concept) |
java.util.List<Drug> |
getDrugs(java.lang.String phrase)
Find drugs in the system. |
java.util.List<Drug> |
getDrugsByConcept(Concept concept)
Return a list of drugs associated with the given concept |
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 |
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. use getConceptsByAnswer(Concept) |
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 |
void |
proposeConcept(ConceptProposal conceptProposal)
Deprecated. |
void |
purgeConcept(Concept concept)
Completely purge a Concept or ConceptNumeric from the database. |
void |
purgeConceptClass(ConceptClass cc)
Purge a ConceptClass |
void |
purgeConceptDatatype(ConceptDatatype cd)
Purge a ConceptDatatype. |
void |
purgeConceptProposal(ConceptProposal cp)
Removes a concept proposal from the database entirely. |
ConceptSource |
purgeConceptSource(ConceptSource cs)
Delete ConceptSource |
void |
purgeDrug(Drug drug)
Completely purge a Drug from the database. |
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated. use ConceptProposal.rejectConceptProposal() |
Concept |
retireConcept(Concept concept,
java.lang.String reason)
Retiring a concept 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)
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 |
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)
Iterates over the words in names and synonyms (for each locale) and updates the concept_word table |
void |
updateConceptWords()
Iterates over all concepts and calls upddateConceptWords(Concept concept) |
void |
updateConceptWords(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
Iterates over all concepts with conceptIds between conceptIdStart and
conceptIdEnd (inclusive) and calls updateConceptWord(concept) |
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. |
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
---|
onShutdown, onStartup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openmrs.api.OpenmrsService |
---|
onShutdown, onStartup |
Field Detail |
---|
public static final java.lang.String CONCEPT_WORD_UPDATE_TASK_NAME
Constructor Detail |
---|
public ConceptServiceImpl()
Method Detail |
---|
public void setConceptDAO(ConceptDAO dao)
ConceptService
setConceptDAO
in interface ConceptService
dao
- The data access object to useConceptService.setConceptDAO(org.openmrs.api.db.ConceptDAO)
@Deprecated public void createConcept(Concept concept)
saveConcept(Concept)
createConcept
in interface ConceptService
@Deprecated public void createConcept(ConceptNumeric concept)
saveConcept(Concept)
createConcept
in interface ConceptService
@Deprecated public void updateConcept(Concept concept)
saveConcept(Concept)
updateConcept
in interface ConceptService
@Deprecated public void updateConcept(ConceptNumeric concept)
saveConcept(Concept)
updateConcept
in interface ConceptService
@Deprecated public void createDrug(Drug drug)
createDrug
in interface ConceptService
@Deprecated public void updateDrug(Drug drug)
updateDrug
in interface ConceptService
@Deprecated public void deleteConcept(Concept concept)
deleteConcept
in interface ConceptService
@Deprecated public void voidConcept(Concept concept, java.lang.String reason)
retireConcept(Concept, String)
etireConcept
voidConcept
in interface ConceptService
public Concept saveConcept(Concept concept) throws APIException
ConceptService
Concept
or ConceptNumeric
in the database
If this is a new concept, the returned concept will have a new Concept.getConceptId()
inserted into it that was generated by the database
saveConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to save or update
Concept
or ConceptNumeric
that was saved or updated
APIException
ConceptsLockedException
ConceptInUseException
ConceptService.saveConcept(org.openmrs.Concept)
public Drug saveDrug(Drug drug) throws APIException
ConceptService
Drug
in the database. If this is a new drug, the
returned drug object will have a new Drug.getDrugId()
inserted into it that was
generated by the database
saveDrug
in interface ConceptService
drug
- The Drug to save or update
APIException
ConceptService.saveDrug(org.openmrs.Drug)
public void purgeConcept(Concept concept) throws APIException
ConceptService
Concept
or ConceptNumeric
from the database.
This should not typically be used unless desperately needed. Most should just be retired. See
ConceptService.retireConcept(Concept, String)
purgeConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to
remove from the system
APIException
ConceptService.purgeConcept(Concept)
public Concept retireConcept(Concept concept, java.lang.String reason) throws APIException
ConceptService
retireConcept
in interface ConceptService
concept
- The Concept
or ConceptNumeric
to
retirereason
- The retire reason
Concept
or ConceptNumeric
APIException
ConceptService.retireConcept(org.openmrs.Concept, java.lang.String)
public Drug retireDrug(Drug drug, java.lang.String reason) throws APIException
ConceptService
retireDrug
in interface ConceptService
drug
- The Drug to retirereason
- The retire reason
APIException
ConceptService.retireDrug(org.openmrs.Drug, java.lang.String)
public Drug unretireDrug(Drug drug) throws APIException
ConceptService
unretireDrug
in interface ConceptService
drug
- that is current set as retired
APIException
ConceptService.unretireDrug(org.openmrs.Drug)
public void purgeDrug(Drug drug) throws APIException
ConceptService
purgeDrug
in interface ConceptService
drug
- The Drug to remove from the system
APIException
ConceptService.purgeDrug(org.openmrs.Drug)
public Concept getConcept(java.lang.Integer conceptId) throws APIException
ConceptService
getConcept
in interface ConceptService
APIException
ConceptService.getConcept(java.lang.Integer)
public ConceptName getConceptName(java.lang.Integer conceptNameId) throws APIException
ConceptService
getConceptName
in interface ConceptService
APIException
ConceptService.getConceptName(java.lang.Integer)
public ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId) throws APIException
ConceptService
getConceptAnswer
in interface ConceptService
APIException
ConceptService.getConceptAnswer(java.lang.Integer)
public Drug getDrug(java.lang.Integer drugId) throws APIException
ConceptService
getDrug
in interface ConceptService
APIException
ConceptService.getDrug(java.lang.Integer)
public ConceptNumeric getConceptNumeric(java.lang.Integer conceptId) throws APIException
ConceptService
getConceptNumeric
in interface ConceptService
conceptId
- The ConceptNumeric id
APIException
ConceptService.getConceptNumeric(java.lang.Integer)
public ConceptComplex getConceptComplex(java.lang.Integer conceptId)
ConceptService
getConceptComplex
in interface ConceptService
conceptId
- of the ComplexConcept
ConceptService.getConceptComplex(java.lang.Integer)
public java.util.List<Concept> getAllConcepts() throws APIException
ConceptService
getAllConcepts
in interface ConceptService
APIException
ConceptService.getAllConcepts()
public java.util.List<Concept> getAllConcepts(java.lang.String sortBy, boolean asc, boolean includeRetired) throws APIException
ConceptService
getAllConcepts
in interface ConceptService
sortBy
- The property name to sort by; if null or invalid, concept_id is used.asc
- true = sort ascending; false = sort descendingincludeRetired
- If true
, retired concepts will also be returned
APIException
ConceptService.getAllConcepts(java.lang.String, boolean, boolean)
@Deprecated public java.util.List<Concept> getConcepts(java.lang.String sortBy, java.lang.String dir) throws APIException
getAllConcepts(String, boolean, boolean)
getConcepts
in interface ConceptService
APIException
public java.util.List<Concept> getConceptsByName(java.lang.String name) throws APIException
ConceptService
getConceptsByName
in interface ConceptService
name
- The search string
APIException
ConceptService.getConceptsByName(java.lang.String)
public Concept getConceptByName(java.lang.String name)
ConceptService
getConceptByName
in interface ConceptService
name
- The search string
ConceptService.getConceptByName(java.lang.String)
@Deprecated public Concept getConceptByIdOrName(java.lang.String idOrName)
getConcept(String)
ConceptService
Note: this just calls other impl methods; no DAO of its own
getConceptByIdOrName
in interface ConceptService
ConceptService.getConceptByIdOrName(java.lang.String)
public Concept getConcept(java.lang.String conceptIdOrName)
ConceptService
getConcept
in interface ConceptService
ConceptService.getConcept(java.lang.String)
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)
ConceptService
getConceptWords
in interface ConceptService
phrase
- matched to the start of any word in any of the names of a conceptlocales
- ListincludeRetired
- boolean if false, will exclude retired conceptsrequireClasses
- ListexcludeClasses
- ListrequireDatatypes
- ListexcludeDatatypes
- ListanswerToConcept
- 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
removed
ConceptService.getConceptWords(String, List, boolean, List, List, List,
List, Concept, Integer, Integer)
public java.util.List<ConceptWord> getConceptWords(java.lang.String phrase, java.util.Locale locale) throws APIException
ConceptService
ConceptService.getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
getConceptWords
in interface ConceptService
phrase
- search string
APIException
ConceptService.getConceptWords(java.lang.String, java.util.Locale)
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired, int start, int size)
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
findConcepts
in interface ConceptService
@Deprecated public java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired)
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
findConcepts
in interface ConceptService
@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)
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
findConcepts
in interface ConceptService
@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)
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
ConceptService
findConcepts
in interface ConceptService
phrase
- String search phraselocales
- ordered List of Locales within which to searchincludeRetired
- booleanrequireClasses
- ListConceptClass
es that must be includedexcludeClasses
- ListConceptClass
es that must not be
includedrequireDatatypes
- ListConceptDatatype
s that must be
includedexcludeDatatypes
- ListConceptDatatype
s that must not
be included
ConceptService.findConcepts(String,Locale,boolean)
public Drug getDrug(java.lang.String drugNameOrId)
ConceptService
getDrug
in interface ConceptService
drugNameOrId
- String name or drugId to match exactly on
ConceptService.getDrug(java.lang.String)
@Deprecated public Drug getDrugByNameOrId(java.lang.String drugNameOrId)
getDrug(String)
ConceptService
getDrugByNameOrId
in interface ConceptService
drugNameOrId
- String
ConceptService.getDrugByNameOrId(java.lang.String)
@Deprecated public java.util.List<Drug> getDrugs()
getAllDrugs()
getDrugs
in interface ConceptService
public java.util.List<Drug> getAllDrugs()
ConceptService
getAllDrugs
in interface ConceptService
ConceptService.getAllDrugs()
public java.util.List<Drug> getAllDrugs(boolean includeRetired)
ConceptService
getAllDrugs
in interface ConceptService
includeRetired
- If true
then the search will include voided Drugs
ConceptService.getAllDrugs(boolean)
@Deprecated public java.util.List<Drug> getDrugs(Concept concept)
getDrugsByConcept(Concept)
getDrugs
in interface ConceptService
ConceptService.getDrugs(org.openmrs.Concept)
public java.util.List<Drug> getDrugsByConcept(Concept concept)
ConceptService
getDrugsByConcept
in interface ConceptService
ConceptService.getDrugsByConcept(org.openmrs.Concept)
@Deprecated public java.util.List<Drug> getDrugs(Concept concept, boolean includeRetired)
getDrugsByConcept(Concept)
ConceptService.getDrugs(Concept)
@Deprecated public java.util.List<Drug> getDrugs(boolean includeVoided)
getAllDrugs(boolean)
ConceptService.getAllDrugs(boolean)
@Deprecated public java.util.List<Drug> findDrugs(java.lang.String phrase, boolean includeRetired)
getDrugs(String)
findDrugs
in interface ConceptService
ConceptService.findDrugs(java.lang.String, boolean)
public java.util.List<Drug> getDrugs(java.lang.String phrase)
ConceptService
getDrugs
in interface ConceptService
phrase
- Search phrase
ConceptService.getDrugs(java.lang.String)
public java.util.List<Concept> getConceptsByClass(ConceptClass cc)
getConceptsByClass
in interface ConceptService
cc
- ConceptClass
ConceptService.getConceptsByClass(org.openmrs.ConceptClass)
@Deprecated public java.util.List<ConceptClass> getConceptClasses()
ConceptService
getConceptClasses
in interface ConceptService
ConceptService.getConceptClasses()
public java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired)
ConceptService
getAllConceptClasses
in interface ConceptService
includeRetired
- include retired concept classes in the search results?
ConceptService.getAllConceptClasses(boolean)
public ConceptClass getConceptClass(java.lang.Integer i)
ConceptService
getConceptClass
in interface ConceptService
i
- the concept class identifier
ConceptService.getConceptClass(java.lang.Integer)
public ConceptClass getConceptClassByName(java.lang.String name)
ConceptService
getConceptClassByName
in interface ConceptService
ConceptService.getConceptClassByName(java.lang.String)
public java.util.List<ConceptClass> getAllConceptClasses() throws APIException
ConceptService
getAllConceptClasses
in interface ConceptService
APIException
ConceptService.getAllConceptClasses(boolean)
public ConceptClass saveConceptClass(ConceptClass cc) throws APIException
ConceptService
saveConceptClass
in interface ConceptService
cc
- ConceptClass to create or update
APIException
ConceptService.saveConceptClass(org.openmrs.ConceptClass)
public void purgeConceptClass(ConceptClass cc)
ConceptService
purgeConceptClass
in interface ConceptService
cc
- ConceptClass to deleteConceptService.purgeConceptClass(org.openmrs.ConceptClass)
public void purgeConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService
purgeConceptDatatype
in interface ConceptService
cd
- ConceptDatatype to purge
APIException
ConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)
public ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService
saveConceptDatatype
in interface ConceptService
cd
- ConceptDatatype to create or update
APIException
ConceptService.saveConceptDatatype(org.openmrs.ConceptDatatype)
@Deprecated public java.util.List<ConceptDatatype> getConceptDatatypes()
getAllConceptDatatypes()
ConceptService.getAllConceptDatatypes()
public java.util.List<ConceptDatatype> getAllConceptDatatypes()
ConceptService
getAllConceptDatatypes
in interface ConceptService
ConceptService.getAllConceptDatatypes()
public java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws APIException
ConceptService
getAllConceptDatatypes
in interface ConceptService
includeRetired
- boolean - include the retired datatypes?
APIException
ConceptService.getAllConceptDatatypes(boolean)
public ConceptDatatype getConceptDatatype(java.lang.Integer i)
ConceptService
getConceptDatatype
in interface ConceptService
i
- Integer for the requested ConceptDatatype
ConceptService.getConceptDatatype(java.lang.Integer)
public java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
ConceptService
getConceptDatatypes
in interface ConceptService
ConceptService.getConceptDatatypes(java.lang.String)
public ConceptDatatype getConceptDatatypeByName(java.lang.String name)
ConceptService
getConceptDatatypeByName
in interface ConceptService
ConceptService.getConceptDatatypeByName(java.lang.String)
public void updateConceptSetDerived(Concept concept) throws APIException
ConceptService
updateConceptSetDerived
in interface ConceptService
APIException
ConceptService.updateConceptSetDerived(org.openmrs.Concept)
public void updateConceptSetDerived() throws APIException
ConceptService
updateConceptSetDerived
in interface ConceptService
APIException
ConceptService.updateConceptSetDerived()
@Deprecated public java.util.List<ConceptSet> getConceptSets(Concept c)
getConceptSetsByConcept(Concept)
getConceptSets
in interface ConceptService
ConceptService.getConceptSets(org.openmrs.Concept)
public java.util.List<ConceptSet> getConceptSetsByConcept(Concept concept) throws APIException
ConceptService
For example to find all concepts for ARVs, you would do getConceptSets(getConcept("ANTIRETROVIRAL MEDICATIONS")) and then take the conceptIds from the resulting list.
getConceptSetsByConcept
in interface ConceptService
concept
- The concept representing the concept set
APIException
ConceptService.getConceptSetsByConcept(org.openmrs.Concept)
@Deprecated public java.util.List<Concept> getConceptsInSet(Concept c)
getConceptsByConceptSet(Concept)
getConceptsInSet
in interface ConceptService
ConceptService.getConceptsInSet(org.openmrs.Concept)
public java.util.List<Concept> getConceptsByConceptSet(Concept c)
ConceptService
getConceptsByConceptSet
in interface ConceptService
c
- The concept representing the concept set
ConceptService.getConceptsInSet(org.openmrs.Concept)
public java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
ConceptService
getSetsContainingConcept
in interface ConceptService
ConceptService.getSetsContainingConcept(org.openmrs.Concept)
public ConceptProposal getConceptProposal(java.lang.Integer conceptProposalId)
ConceptService
getConceptProposal
in interface ConceptService
conceptProposalId
- the Integer concept proposal Id
ConceptService.getConceptProposal(java.lang.Integer)
@Deprecated public java.util.List<ConceptProposal> getConceptProposals(boolean includeCompleted)
getAllConceptProposals(boolean)
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(boolean)
public java.util.List<ConceptProposal> getAllConceptProposals(boolean includeCompleted)
ConceptService
getAllConceptProposals
in interface ConceptService
includeCompleted
- boolean - include completed proposals as well?
ConceptService.getAllConceptProposals(boolean)
public java.util.List<ConceptProposal> getConceptProposals(java.lang.String cp)
ConceptService
getConceptProposals
in interface ConceptService
ConceptService.getConceptProposals(java.lang.String)
@Deprecated public java.util.List<Concept> findProposedConcepts(java.lang.String text)
findProposedConcepts
in interface ConceptService
ConceptService.findProposedConcepts(java.lang.String)
public java.util.List<Concept> getProposedConcepts(java.lang.String text)
ConceptService
getProposedConcepts
in interface ConceptService
ConceptService.getProposedConcepts(java.lang.String)
@Deprecated public void proposeConcept(ConceptProposal conceptProposal)
proposeConcept
in interface ConceptService
ConceptService.proposeConcept(org.openmrs.ConceptProposal)
public ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException
ConceptService
saveConceptProposal
in interface ConceptService
conceptProposal
- The ConceptProposal to save
APIException
ConceptService.saveConceptProposal(org.openmrs.ConceptProposal)
public void purgeConceptProposal(ConceptProposal cp) throws APIException
ConceptService
purgeConceptProposal
in interface ConceptService
APIException
ConceptService.purgeConceptProposal(org.openmrs.ConceptProposal)
public Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
ConceptService
mapConceptProposalToConcept
in interface ConceptService
APIException
ConceptService.mapConceptProposalToConcept(org.openmrs.ConceptProposal,
org.openmrs.Concept)
@Deprecated public void rejectConceptProposal(ConceptProposal cp)
ConceptProposal.rejectConceptProposal()
rejectConceptProposal
in interface ConceptService
ConceptService.rejectConceptProposal(org.openmrs.ConceptProposal)
@Deprecated public java.util.List<ConceptProposal> findMatchingConceptProposals(java.lang.String text)
getConceptProposals(String)
findMatchingConceptProposals
in interface ConceptService
ConceptService.findMatchingConceptProposals(String text)
@Deprecated public java.util.List<ConceptWord> findConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept, boolean includeRetired)
getConceptAnswers(String, Locale, Concept)
findConceptAnswers
in interface ConceptService
ConceptService.findConceptAnswers(String phrase, Locale locale,Concept
concept, boolean includeRetired)
public java.util.List<ConceptWord> getConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept) throws APIException
ConceptService
getConceptAnswers
in interface ConceptService
concept
- the answers to match on
APIException
ConceptService.getConceptAnswers(java.lang.String, java.util.Locale,
org.openmrs.Concept)
@Deprecated public java.util.List<Concept> getQuestionsForAnswer(Concept concept)
getConceptsByAnswer(Concept)
getQuestionsForAnswer
in interface ConceptService
ConceptService.getQuestionsForAnswer(org.openmrs.Concept)
public java.util.List<Concept> getConceptsByAnswer(Concept concept) throws APIException
ConceptService
getConceptsByAnswer
in interface ConceptService
APIException
ConceptService.getConceptsByAnswer(org.openmrs.Concept)
public Concept getPrevConcept(Concept c)
ConceptService
getPrevConcept
in interface ConceptService
c
- the offset Concept
ConceptService.getPrevConcept(org.openmrs.Concept)
public Concept getNextConcept(Concept c)
ConceptService
getNextConcept
in interface ConceptService
c
- the offset Concept
ConceptService.getNextConcept(org.openmrs.Concept)
public void checkIfLocked() throws ConceptsLockedException
ConceptService
checkIfLocked
in interface ConceptService
ConceptsLockedException
ConceptService.checkIfLocked()
public java.util.List<Concept> getConceptsWithDrugsInFormulary()
ConceptService
getConceptsWithDrugsInFormulary
in interface ConceptService
ConceptService.getConceptsWithDrugsInFormulary()
public void updateConceptWords() throws APIException
ConceptService
updateConceptWords
in interface ConceptService
APIException
ConceptService.updateConceptWords()
public void updateConceptWord(Concept concept) throws APIException
ConceptService
updateConceptWord
in interface ConceptService
APIException
ConceptService.updateConceptWord(org.openmrs.Concept)
public void updateConceptWords(java.lang.Integer conceptIdStart, java.lang.Integer conceptIdEnd) throws APIException
ConceptService
conceptIdStart
and
conceptIdEnd
(inclusive) and calls updateConceptWord(concept)
updateConceptWords
in interface ConceptService
conceptIdStart
- starts update with this concept_idconceptIdEnd
- ends update with this concept_id
APIException
ConceptService.updateConceptWords(java.lang.Integer, java.lang.Integer)
public java.lang.Integer getMaxConceptId()
ConceptService
getMaxConceptId
in interface ConceptService
ConceptService.getMaxConceptId()
protected java.util.List<ConceptWord> weightWords(java.lang.String phrase, java.util.List<java.util.Locale> locales, java.util.List<ConceptWord> conceptWords)
phrase
- that was used to get this searchlocales
- ListconceptWords
- the words that were found via a db search and now must be weighted before
being shown to the user
ConceptWord
spublic ConceptNameTag getConceptNameTagByName(java.lang.String tagName)
ConceptService
getConceptNameTagByName
in interface ConceptService
tagName
- String name of ConceptNameTag
ConceptService.getConceptNameTagByName(java.lang.String)
public java.util.Set<java.util.Locale> getLocalesOfConceptNames()
ConceptService
getLocalesOfConceptNames
in interface ConceptService
ConceptService.getLocalesOfConceptNames()
public ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
ConceptService
getConceptSource
in interface ConceptService
conceptSourceId
- Integer conceptSourceId
ConceptService.getConceptSource(java.lang.Integer)
public java.util.List<ConceptSource> getAllConceptSources()
ConceptService
getAllConceptSources
in interface ConceptService
ConceptService.getAllConceptSources()
public ConceptSource purgeConceptSource(ConceptSource cs) throws APIException
ConceptService
purgeConceptSource
in interface ConceptService
cs
- ConceptSource object delete
APIException
ConceptService.purgeConceptSource(org.openmrs.ConceptSource)
public ConceptSource retireConceptSource(ConceptSource cs, java.lang.String reason) throws APIException
ConceptService
retireConceptSource
in interface ConceptService
cs
- the concept source to retirereason
- why the concept source is to be retired, must not be empty of null
APIException
ConceptService.retireConceptSource(org.openmrs.ConceptSource,String)
public ConceptSource saveConceptSource(ConceptSource conceptSource) throws APIException
ConceptService
saveConceptSource
in interface ConceptService
conceptSource
- ConceptSource to create
APIException
ConceptService.saveConceptSource(org.openmrs.ConceptSource)
public ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
ConceptService
saveConceptNameTag
in interface ConceptService
nameTag
- the concept name tag to be saved
ConceptService.saveConceptNameTag(org.openmrs.ConceptNameTag)
public java.util.Iterator<Concept> conceptIterator()
ConceptService
conceptIterator
in interface ConceptService
ConceptService.conceptIterator()
public Concept getConceptByUuid(java.lang.String uuid)
ConceptService
getConceptByUuid
in interface ConceptService
ConceptService.getConceptByUuid(java.lang.String)
public ConceptClass getConceptClassByUuid(java.lang.String uuid)
ConceptService
getConceptClassByUuid
in interface ConceptService
ConceptService.getConceptClassByUuid(java.lang.String)
public ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
ConceptService
getConceptAnswerByUuid
in interface ConceptService
public ConceptName getConceptNameByUuid(java.lang.String uuid)
ConceptService
getConceptNameByUuid
in interface ConceptService
public ConceptSet getConceptSetByUuid(java.lang.String uuid)
ConceptService
getConceptSetByUuid
in interface ConceptService
public ConceptSource getConceptSourceByUuid(java.lang.String uuid)
ConceptService
getConceptSourceByUuid
in interface ConceptService
public ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
ConceptService
getConceptDatatypeByUuid
in interface ConceptService
ConceptService.getConceptDatatypeByUuid(java.lang.String)
public ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
ConceptService
getConceptNumericByUuid
in interface ConceptService
ConceptService.getConceptNumericByUuid(java.lang.String)
public ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
ConceptService
getConceptProposalByUuid
in interface ConceptService
ConceptService.getConceptProposalByUuid(java.lang.String)
public Drug getDrugByUuid(java.lang.String uuid)
ConceptService
getDrugByUuid
in interface ConceptService
ConceptService.getDrugByUuid(java.lang.String)
public ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
ConceptService
getConceptDescriptionByUuid
in interface ConceptService
ConceptService.getConceptDescriptionByUuid(java.lang.String)
public ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
ConceptService
getConceptNameTagByUuid
in interface ConceptService
ConceptService.getConceptNameTagByUuid(java.lang.String)
public java.util.List<ConceptNameTag> getAllConceptNameTags()
ConceptService
getAllConceptNameTags
in interface ConceptService
ConceptService.getAllConceptNameTags()
public ConceptNameTag getConceptNameTag(java.lang.Integer id)
ConceptService
ConceptNameTag
with the given database primary key
getConceptNameTag
in interface ConceptService
id
- the concept name tag id to find
ConceptNameTag
or null if none foundConceptService.getConceptNameTag(java.lang.Integer)
public Concept getConceptByMapping(java.lang.String conceptCode, java.lang.String mappingCode) throws APIException
ConceptService
ConceptMap
This will return the Concept
which contains
a ConceptMap
entry whose sourceCode
is equal to the passed
conceptCode
and whose ConceptSource
has either a name
or
hl7Code
that is equal to the passed mappingCode
getConceptByMapping
in interface ConceptService
conceptCode
- the code associated with a concept within a given ConceptSource
mappingCode
- the name or hl7Code of the ConceptSource
to check
Concept
that has the given mapping, or null if no Concept
found
APIException
ConceptService.getConceptByMapping(java.lang.String, java.lang.String)
public Concept getFalseConcept()
ConceptService
getFalseConcept
in interface ConceptService
ConceptService.getFalseConcept()
public Concept getTrueConcept()
ConceptService
getTrueConcept
in interface ConceptService
ConceptService.getTrueConcept()
public java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
ConceptService
getConceptsByConceptSource
in interface ConceptService
APIException
ConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)
public ConceptSource getConceptSourceByName(java.lang.String conceptSourceName) throws APIException
ConceptService
getConceptSourceByName
in interface ConceptService
APIException
ConceptService.getConceptSourceByName(java.lang.String)
public boolean hasAnyObservation(Concept concept)
ConceptService
hasAnyObservation
in interface ConceptService
concept
- which used or not used by an observation
ConceptService.hasAnyObservation(org.openmrs.Concept)
public void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException
ConceptService
convertBooleanConceptToCoded
in interface ConceptService
conceptToChange
- the concept which to change
APIException
ConceptService.convertBooleanConceptToCoded(org.openmrs.Concept)
public boolean hasAnyObservation(ConceptName conceptName) throws APIException
ConceptService
hasAnyObservation
in interface ConceptService
conceptName
- which is used or not used by an observation
APIException
ConceptService.hasAnyObservation(org.openmrs.ConceptName)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |