| 
 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 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)etireConcept
voidConcept in interface ConceptService
public 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 update
Concept or ConceptNumeric that was saved or updated
APIException
ConceptsLockedException
ConceptInUseExceptionConceptService.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 database
saveDrug in interface ConceptServicedrug - The Drug to save or update
APIExceptionConceptService.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 system
APIExceptionConceptService.purgeConcept(Concept)
public Concept retireConcept(Concept concept,
                             java.lang.String reason)
                      throws APIException
ConceptService
retireConcept in interface ConceptServiceconcept - The Concept or ConceptNumeric to
            retirereason - The retire reason
Concept or ConceptNumeric
APIExceptionConceptService.retireConcept(org.openmrs.Concept, java.lang.String)
public Drug retireDrug(Drug drug,
                       java.lang.String reason)
                throws APIException
ConceptService
retireDrug in interface ConceptServicedrug - The Drug to retirereason - The retire reason
APIExceptionConceptService.retireDrug(org.openmrs.Drug, java.lang.String)
public Drug unretireDrug(Drug drug)
                  throws APIException
ConceptService
unretireDrug in interface ConceptServicedrug - that is current set as retired
APIExceptionConceptService.unretireDrug(org.openmrs.Drug)
public void purgeDrug(Drug drug)
               throws APIException
ConceptService
purgeDrug in interface ConceptServicedrug - The Drug to remove from the system
APIExceptionConceptService.purgeDrug(org.openmrs.Drug)
public Concept getConcept(java.lang.Integer conceptId)
                   throws APIException
ConceptService
getConcept in interface ConceptServiceAPIExceptionConceptService.getConcept(java.lang.Integer)
public ConceptName getConceptName(java.lang.Integer conceptNameId)
                           throws APIException
ConceptService
getConceptName in interface ConceptServiceAPIExceptionConceptService.getConceptName(java.lang.Integer)
public ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId)
                               throws APIException
ConceptService
getConceptAnswer in interface ConceptServiceAPIExceptionConceptService.getConceptAnswer(java.lang.Integer)
public Drug getDrug(java.lang.Integer drugId)
             throws APIException
ConceptService
getDrug in interface ConceptServiceAPIExceptionConceptService.getDrug(java.lang.Integer)
public ConceptNumeric getConceptNumeric(java.lang.Integer conceptId)
                                 throws APIException
ConceptService
getConceptNumeric in interface ConceptServiceconceptId - The ConceptNumeric id
APIExceptionConceptService.getConceptNumeric(java.lang.Integer)public ConceptComplex getConceptComplex(java.lang.Integer conceptId)
ConceptService
getConceptComplex in interface ConceptServiceconceptId - of the ComplexConcept
ConceptService.getConceptComplex(java.lang.Integer)
public java.util.List<Concept> getAllConcepts()
                                       throws APIException
ConceptService
getAllConcepts in interface ConceptServiceAPIExceptionConceptService.getAllConcepts()
public java.util.List<Concept> getAllConcepts(java.lang.String sortBy,
                                              boolean asc,
                                              boolean includeRetired)
                                       throws APIException
ConceptService
getAllConcepts 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 returned
APIExceptionConceptService.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 ConceptServiceAPIException
public java.util.List<Concept> getConceptsByName(java.lang.String name)
                                          throws APIException
ConceptService
getConceptsByName in interface ConceptServicename - The search string
APIExceptionConceptService.getConceptsByName(java.lang.String)public Concept getConceptByName(java.lang.String name)
ConceptService
getConceptByName in interface ConceptServicename - The search string
ConceptService.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)
ConceptService
getConcept in interface ConceptServiceConceptService.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 ConceptServicephrase - 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
ConceptServiceConceptService.getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
getConceptWords in interface ConceptServicephrase - search string
APIExceptionConceptService.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 ConceptServicephrase - String search phraselocales - ordered List of Locales within which to searchincludeRetired - booleanrequireClasses - ListConceptClasses that must be includedexcludeClasses - ListConceptClasses that must not be
            includedrequireDatatypes - ListConceptDatatypes that must be
            includedexcludeDatatypes - ListConceptDatatypes that must not
            be included
ConceptService.findConcepts(String,Locale,boolean)public Drug getDrug(java.lang.String drugNameOrId)
ConceptService
getDrug in interface ConceptServicedrugNameOrId - 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 ConceptServicedrugNameOrId - String
ConceptService.getDrugByNameOrId(java.lang.String)@Deprecated public java.util.List<Drug> getDrugs()
getAllDrugs()
getDrugs in interface ConceptServicepublic java.util.List<Drug> getAllDrugs()
ConceptService
getAllDrugs in interface ConceptServiceConceptService.getAllDrugs()public java.util.List<Drug> getAllDrugs(boolean includeRetired)
ConceptService
getAllDrugs in interface ConceptServiceincludeRetired - 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 ConceptServiceConceptService.getDrugs(org.openmrs.Concept)public java.util.List<Drug> getDrugsByConcept(Concept concept)
ConceptService
getDrugsByConcept 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)
ConceptService
getDrugs in interface ConceptServicephrase - Search phrase
ConceptService.getDrugs(java.lang.String)public java.util.List<Concept> getConceptsByClass(ConceptClass cc)
getConceptsByClass in interface ConceptServicecc - ConceptClass
ConceptService.getConceptsByClass(org.openmrs.ConceptClass)@Deprecated public java.util.List<ConceptClass> getConceptClasses()
ConceptService
getConceptClasses in interface ConceptServiceConceptService.getConceptClasses()public java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired)
ConceptService
getAllConceptClasses in interface ConceptServiceincludeRetired - include retired concept classes in the search results?
ConceptService.getAllConceptClasses(boolean)public ConceptClass getConceptClass(java.lang.Integer i)
ConceptService
getConceptClass in interface ConceptServicei - the concept class identifier
ConceptService.getConceptClass(java.lang.Integer)public ConceptClass getConceptClassByName(java.lang.String name)
ConceptService
getConceptClassByName in interface ConceptServiceConceptService.getConceptClassByName(java.lang.String)
public java.util.List<ConceptClass> getAllConceptClasses()
                                                  throws APIException
ConceptService
getAllConceptClasses in interface ConceptServiceAPIExceptionConceptService.getAllConceptClasses(boolean)
public ConceptClass saveConceptClass(ConceptClass cc)
                              throws APIException
ConceptService
saveConceptClass in interface ConceptServicecc - ConceptClass to create or update
APIExceptionConceptService.saveConceptClass(org.openmrs.ConceptClass)public void purgeConceptClass(ConceptClass cc)
ConceptService
purgeConceptClass in interface ConceptServicecc - ConceptClass to deleteConceptService.purgeConceptClass(org.openmrs.ConceptClass)
public void purgeConceptDatatype(ConceptDatatype cd)
                          throws APIException
ConceptService
purgeConceptDatatype in interface ConceptServicecd - ConceptDatatype to purge
APIExceptionConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)
public ConceptDatatype saveConceptDatatype(ConceptDatatype cd)
                                    throws APIException
ConceptService
saveConceptDatatype in interface ConceptServicecd - ConceptDatatype to create or update
APIExceptionConceptService.saveConceptDatatype(org.openmrs.ConceptDatatype)@Deprecated public java.util.List<ConceptDatatype> getConceptDatatypes()
getAllConceptDatatypes()
ConceptService.getAllConceptDatatypes()public java.util.List<ConceptDatatype> getAllConceptDatatypes()
ConceptService
getAllConceptDatatypes in interface ConceptServiceConceptService.getAllConceptDatatypes()
public java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired)
                                                       throws APIException
ConceptService
getAllConceptDatatypes in interface ConceptServiceincludeRetired - boolean - include the retired datatypes?
APIExceptionConceptService.getAllConceptDatatypes(boolean)public ConceptDatatype getConceptDatatype(java.lang.Integer i)
ConceptService
getConceptDatatype in interface ConceptServicei - Integer for the requested ConceptDatatype
ConceptService.getConceptDatatype(java.lang.Integer)public java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
ConceptService
getConceptDatatypes in interface ConceptServiceConceptService.getConceptDatatypes(java.lang.String)public ConceptDatatype getConceptDatatypeByName(java.lang.String name)
ConceptService
getConceptDatatypeByName in interface ConceptServiceConceptService.getConceptDatatypeByName(java.lang.String)
public void updateConceptSetDerived(Concept concept)
                             throws APIException
ConceptService
updateConceptSetDerived in interface ConceptServiceAPIExceptionConceptService.updateConceptSetDerived(org.openmrs.Concept)
public void updateConceptSetDerived()
                             throws APIException
ConceptService
updateConceptSetDerived 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 set
APIExceptionConceptService.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)
ConceptService
getConceptsByConceptSet in interface ConceptServicec - The concept representing the concept set
ConceptService.getConceptsInSet(org.openmrs.Concept)public java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
ConceptService
getSetsContainingConcept in interface ConceptServiceConceptService.getSetsContainingConcept(org.openmrs.Concept)public ConceptProposal getConceptProposal(java.lang.Integer conceptProposalId)
ConceptService
getConceptProposal in interface ConceptServiceconceptProposalId - the Integer concept proposal Id
ConceptService.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)
ConceptService
getAllConceptProposals in interface ConceptServiceincludeCompleted - boolean - include completed proposals as well?
ConceptService.getAllConceptProposals(boolean)public java.util.List<ConceptProposal> getConceptProposals(java.lang.String cp)
ConceptService
getConceptProposals 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)
ConceptService
getProposedConcepts 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
ConceptService
saveConceptProposal in interface ConceptServiceconceptProposal - The ConceptProposal to save
APIExceptionConceptService.saveConceptProposal(org.openmrs.ConceptProposal)
public void purgeConceptProposal(ConceptProposal cp)
                          throws APIException
ConceptService
purgeConceptProposal in interface ConceptServiceAPIExceptionConceptService.purgeConceptProposal(org.openmrs.ConceptProposal)
public Concept mapConceptProposalToConcept(ConceptProposal cp,
                                           Concept mappedConcept)
                                    throws APIException
ConceptService
mapConceptProposalToConcept 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)
getConceptAnswers(String, Locale, Concept)
findConceptAnswers in interface ConceptServiceConceptService.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 ConceptServiceconcept - the answers to match on
APIExceptionConceptService.getConceptAnswers(java.lang.String, java.util.Locale,
      org.openmrs.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
ConceptService
getConceptsByAnswer in interface ConceptServiceAPIExceptionConceptService.getConceptsByAnswer(org.openmrs.Concept)public Concept getPrevConcept(Concept c)
ConceptService
getPrevConcept in interface ConceptServicec - the offset Concept
ConceptService.getPrevConcept(org.openmrs.Concept)public Concept getNextConcept(Concept c)
ConceptService
getNextConcept in interface ConceptServicec - the offset Concept
ConceptService.getNextConcept(org.openmrs.Concept)
public void checkIfLocked()
                   throws ConceptsLockedException
ConceptService
checkIfLocked in interface ConceptServiceConceptsLockedExceptionConceptService.checkIfLocked()public java.util.List<Concept> getConceptsWithDrugsInFormulary()
ConceptService
getConceptsWithDrugsInFormulary in interface ConceptServiceConceptService.getConceptsWithDrugsInFormulary()
public void updateConceptWords()
                        throws APIException
ConceptService
updateConceptWords in interface ConceptServiceAPIExceptionConceptService.updateConceptWords()
public void updateConceptWord(Concept concept)
                       throws APIException
ConceptService
updateConceptWord in interface ConceptServiceAPIExceptionConceptService.updateConceptWord(org.openmrs.Concept)
public void updateConceptWords(java.lang.Integer conceptIdStart,
                               java.lang.Integer conceptIdEnd)
                        throws APIException
ConceptServiceconceptIdStart and
 conceptIdEnd (inclusive) and calls updateConceptWord(concept)
updateConceptWords in interface ConceptServiceconceptIdStart - starts update with this concept_idconceptIdEnd - ends update with this concept_id
APIExceptionConceptService.updateConceptWords(java.lang.Integer, java.lang.Integer)public java.lang.Integer getMaxConceptId()
ConceptService
getMaxConceptId 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 user
ConceptWordspublic ConceptNameTag getConceptNameTagByName(java.lang.String tagName)
ConceptService
getConceptNameTagByName in interface ConceptServicetagName - String name of ConceptNameTag
ConceptService.getConceptNameTagByName(java.lang.String)public java.util.Set<java.util.Locale> getLocalesOfConceptNames()
ConceptService
getLocalesOfConceptNames in interface ConceptServiceConceptService.getLocalesOfConceptNames()public ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
ConceptService
getConceptSource in interface ConceptServiceconceptSourceId - Integer conceptSourceId
ConceptService.getConceptSource(java.lang.Integer)public java.util.List<ConceptSource> getAllConceptSources()
ConceptService
getAllConceptSources in interface ConceptServiceConceptService.getAllConceptSources()
public ConceptSource purgeConceptSource(ConceptSource cs)
                                 throws APIException
ConceptService
purgeConceptSource in interface ConceptServicecs - ConceptSource object delete
APIExceptionConceptService.purgeConceptSource(org.openmrs.ConceptSource)
public ConceptSource retireConceptSource(ConceptSource cs,
                                         java.lang.String reason)
                                  throws APIException
ConceptService
retireConceptSource in interface ConceptServicecs - the concept source to retirereason - why the concept source is to be retired, must not be empty of null
APIExceptionConceptService.retireConceptSource(org.openmrs.ConceptSource,String)
public ConceptSource saveConceptSource(ConceptSource conceptSource)
                                throws APIException
ConceptService
saveConceptSource in interface ConceptServiceconceptSource - ConceptSource to create
APIExceptionConceptService.saveConceptSource(org.openmrs.ConceptSource)public ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
ConceptService
saveConceptNameTag in interface ConceptServicenameTag - the concept name tag to be saved
ConceptService.saveConceptNameTag(org.openmrs.ConceptNameTag)public java.util.Iterator<Concept> conceptIterator()
ConceptService
conceptIterator in interface ConceptServiceConceptService.conceptIterator()public Concept getConceptByUuid(java.lang.String uuid)
ConceptService
getConceptByUuid in interface ConceptServiceConceptService.getConceptByUuid(java.lang.String)public ConceptClass getConceptClassByUuid(java.lang.String uuid)
ConceptService
getConceptClassByUuid in interface ConceptServiceConceptService.getConceptClassByUuid(java.lang.String)public ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
ConceptService
getConceptAnswerByUuid in interface ConceptServicepublic ConceptName getConceptNameByUuid(java.lang.String uuid)
ConceptService
getConceptNameByUuid in interface ConceptServicepublic ConceptSet getConceptSetByUuid(java.lang.String uuid)
ConceptService
getConceptSetByUuid in interface ConceptServicepublic ConceptSource getConceptSourceByUuid(java.lang.String uuid)
ConceptService
getConceptSourceByUuid in interface ConceptServicepublic ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
ConceptService
getConceptDatatypeByUuid in interface ConceptServiceConceptService.getConceptDatatypeByUuid(java.lang.String)public ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
ConceptService
getConceptNumericByUuid in interface ConceptServiceConceptService.getConceptNumericByUuid(java.lang.String)public ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
ConceptService
getConceptProposalByUuid in interface ConceptServiceConceptService.getConceptProposalByUuid(java.lang.String)public Drug getDrugByUuid(java.lang.String uuid)
ConceptService
getDrugByUuid in interface ConceptServiceConceptService.getDrugByUuid(java.lang.String)public ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
ConceptService
getConceptDescriptionByUuid in interface ConceptServiceConceptService.getConceptDescriptionByUuid(java.lang.String)public ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
ConceptService
getConceptNameTagByUuid in interface ConceptServiceConceptService.getConceptNameTagByUuid(java.lang.String)public java.util.List<ConceptNameTag> getAllConceptNameTags()
ConceptService
getAllConceptNameTags in interface ConceptServiceConceptService.getAllConceptNameTags()public ConceptNameTag getConceptNameTag(java.lang.Integer id)
ConceptServiceConceptNameTag with the given database primary key
getConceptNameTag in interface ConceptServiceid - 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
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
getConceptByMapping in interface ConceptServiceconceptCode - the code associated with a concept within a given ConceptSourcemappingCode - the name or hl7Code of the ConceptSource to check
Concept that has the given mapping, or null if no Concept found
APIExceptionConceptService.getConceptByMapping(java.lang.String, java.lang.String)public Concept getFalseConcept()
ConceptService
getFalseConcept in interface ConceptServiceConceptService.getFalseConcept()public Concept getTrueConcept()
ConceptService
getTrueConcept in interface ConceptServiceConceptService.getTrueConcept()
public java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource)
                                                      throws APIException
ConceptService
getConceptsByConceptSource in interface ConceptServiceAPIExceptionConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)
public ConceptSource getConceptSourceByName(java.lang.String conceptSourceName)
                                     throws APIException
ConceptService
getConceptSourceByName in interface ConceptServiceAPIExceptionConceptService.getConceptSourceByName(java.lang.String)public boolean hasAnyObservation(Concept concept)
ConceptService
hasAnyObservation in interface ConceptServiceconcept - which used or not used by an observation
ConceptService.hasAnyObservation(org.openmrs.Concept)
public void convertBooleanConceptToCoded(Concept conceptToChange)
                                  throws APIException
ConceptService
convertBooleanConceptToCoded in interface ConceptServiceconceptToChange - the concept which to change
APIExceptionConceptService.convertBooleanConceptToCoded(org.openmrs.Concept)
public boolean hasAnyObservation(ConceptName conceptName)
                          throws APIException
ConceptService
hasAnyObservation in interface ConceptServiceconceptName - which is used or not used by an observation
APIExceptionConceptService.hasAnyObservation(org.openmrs.ConceptName)
  | 
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||