org.openmrs.api.db
Interface ConceptDAO

All Known Implementing Classes:
HibernateConceptDAO

public interface ConceptDAO

Concept-related database functions

See Also:
ConceptService

Method Summary
 java.util.Iterator<Concept> conceptIterator()
           
 ConceptSource deleteConceptSource(ConceptSource cs)
           
 java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired)
           
 java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired)
           
 java.util.List<ConceptNameTag> getAllConceptNameTags()
           
 java.util.List<ConceptProposal> getAllConceptProposals(boolean includeComplete)
           
 java.util.List<Concept> getAllConcepts(java.lang.String sortBy, boolean asc, boolean includeRetired)
           
 java.util.List<ConceptSource> getAllConceptSources()
           
 Concept getConcept(java.lang.Integer conceptId)
           
 ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId)
           
 ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
           
 Concept getConceptByMapping(java.lang.String conceptCode, java.lang.String mappingCode)
           
 Concept getConceptByUuid(java.lang.String uuid)
          Auto generated method comment
 ConceptClass getConceptClass(java.lang.Integer i)
           
 ConceptClass getConceptClassByUuid(java.lang.String uuid)
          Auto generated method comment
 java.util.List<ConceptClass> getConceptClasses(java.lang.String name)
           
 ConceptComplex getConceptComplex(java.lang.Integer conceptId)
          Get a ConceptComplex.
 ConceptDatatype getConceptDatatype(java.lang.Integer i)
           
 ConceptDatatype getConceptDatatypeByName(java.lang.String name)
           
 ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
          Auto generated method comment
 java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
          Deprecated.  
 ConceptDerived getConceptDerivedByUuid(java.lang.String uuid)
           
 ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
           
 ConceptName getConceptName(java.lang.Integer conceptNameId)
           
 ConceptName getConceptNameByUuid(java.lang.String uuid)
           
 ConceptNameTag getConceptNameTag(java.lang.Integer i)
           
 ConceptNameTag getConceptNameTagByName(java.lang.String name)
           
 ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
           
 ConceptNumeric getConceptNumeric(java.lang.Integer conceptId)
           
 ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
          Auto generated method comment
 ConceptProposal getConceptProposal(java.lang.Integer i)
           
 ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
          Auto generated method comment
 java.util.List<ConceptProposal> getConceptProposals(java.lang.String text)
           
 java.util.List<Concept> getConcepts(java.lang.String name, java.util.Locale loc, boolean searchOnPhrase, java.util.List<ConceptClass> classes, java.util.List<ConceptDatatype> datatypes)
          Returns a list of concepts based on the search criteria
 java.util.List<Concept> getConceptsByAnswer(Concept concept)
           
 java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSourceName)
           
 ConceptSet getConceptSetByUuid(java.lang.String uuid)
           
 ConceptSetDerived getConceptSetDerivedByUuid(java.lang.String uuid)
           
 java.util.List<ConceptSet> getConceptSetsByConcept(Concept c)
           
 ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
           
 ConceptSource getConceptSourceByName(java.lang.String conceptSourceName)
           
 ConceptSource getConceptSourceByUuid(java.lang.String uuid)
           
 java.util.List<Concept> getConceptsWithDrugsInFormulary()
           
 java.util.Map<java.lang.Integer,java.lang.String> getConceptUuids()
           
 ConceptWord getConceptWordByUuid(java.lang.String uuid)
           
 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 answersToConcept, java.lang.Integer start, java.lang.Integer size)
           
 Drug getDrug(java.lang.Integer drugId)
           
 Drug getDrugByUuid(java.lang.String uuid)
          Auto generated method comment
 DrugIngredient getDrugIngredientByUuid(java.lang.String uuid)
           
 java.util.List<Drug> getDrugs(java.lang.String phrase)
           
 java.util.List<Drug> getDrugs(java.lang.String drugName, Concept concept, boolean includeRetired)
          DAO for retrieving a list of drugs based on the following criteria
 java.util.Set<java.util.Locale> getLocalesOfConceptNames()
           
 java.lang.Integer getMaxConceptId()
           
 Concept getNextConcept(Concept c)
           
 Concept getPrevConcept(Concept c)
           
 java.util.List<Concept> getProposedConcepts(java.lang.String text)
           
 ConceptDatatype getSavedConceptDatatype(Concept concept)
          Gets the value of conceptDatatype currently saved in the database for the given concept, bypassing any caches.
 ConceptName getSavedConceptName(ConceptName conceptName)
          Gets the persisted copy of the conceptName currently saved in the database for the given conceptName, bypassing any caches.
 java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
           
 void purgeConcept(Concept concept)
           
 void purgeConceptClass(ConceptClass cc)
           
 void purgeConceptDatatype(ConceptDatatype cd)
           
 void purgeConceptProposal(ConceptProposal cp)
           
 void purgeDrug(Drug drug)
           
 Concept saveConcept(Concept concept)
           
 ConceptClass saveConceptClass(ConceptClass cc)
           
 ConceptDatatype saveConceptDatatype(ConceptDatatype cd)
           
 ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
           
 ConceptProposal saveConceptProposal(ConceptProposal cp)
           
 ConceptSource saveConceptSource(ConceptSource conceptSource)
           
 Drug saveDrug(Drug drug)
           
 void updateConceptSetDerived()
           
 void updateConceptSetDerived(Concept concept)
           
 void updateConceptWord(Concept concept)
           
 

Method Detail

saveConcept

Concept saveConcept(Concept concept)
                    throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveConcept(org.openmrs.Concept)

purgeConcept

void purgeConcept(Concept concept)
                  throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeConcept(org.openmrs.Concept)
Expected behavior:
delete concept and related conceptWords from datastore

getConceptComplex

ConceptComplex getConceptComplex(java.lang.Integer conceptId)
Get a ConceptComplex. The Concept.getDatatype() is "Complex" and the Concept.getHandler() is the class name for the ComplexObsHandler key associated with this ConceptComplex.

Parameters:
conceptId -
Returns:
the ConceptComplex

purgeDrug

void purgeDrug(Drug drug)
               throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeDrug(org.openmrs.Drug)

saveDrug

Drug saveDrug(Drug drug)
              throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveDrug(org.openmrs.Drug)

getConcept

Concept getConcept(java.lang.Integer conceptId)
                   throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConcept(java.lang.Integer)

getConceptName

ConceptName getConceptName(java.lang.Integer conceptNameId)
                           throws DAOException
Parameters:
conceptNameId -
Returns:
The ConceptName matching the specified conceptNameId
Throws:
DAOException
See Also:
ConceptService.getConceptName(java.lang.Integer)

getAllConcepts

java.util.List<Concept> getAllConcepts(java.lang.String sortBy,
                                       boolean asc,
                                       boolean includeRetired)
                                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.getAllConcepts(java.lang.String, boolean, boolean)

getConcepts

java.util.List<Concept> getConcepts(java.lang.String name,
                                    java.util.Locale loc,
                                    boolean searchOnPhrase,
                                    java.util.List<ConceptClass> classes,
                                    java.util.List<ConceptDatatype> datatypes)
                                    throws DAOException
Returns a list of concepts based on the search criteria

Parameters:
name -
loc -
searchOnPhrase - This puts wildcard characters around the concept name search criteria
Returns:
List
Throws:
DAOException

getConceptWords

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 answersToConcept,
                                            java.lang.Integer start,
                                            java.lang.Integer size)
                                            throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)

getConceptAnswer

ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId)
                               throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptAnswer(java.lang.Integer)

getDrug

Drug getDrug(java.lang.Integer drugId)
             throws DAOException
Throws:
DAOException
See Also:
ConceptService.getDrug(java.lang.Integer)

getDrugs

java.util.List<Drug> getDrugs(java.lang.String drugName,
                              Concept concept,
                              boolean includeRetired)
                              throws DAOException
DAO for retrieving a list of drugs based on the following criteria

Parameters:
drugName -
concept -
includeRetired -
Returns:
List
Throws:
DAOException

getDrugs

java.util.List<Drug> getDrugs(java.lang.String phrase)
                              throws DAOException
Throws:
DAOException
See Also:
ConceptService.getDrugs(java.lang.String)

getConceptClass

ConceptClass getConceptClass(java.lang.Integer i)
                             throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptClass(java.lang.Integer)

getConceptClasses

java.util.List<ConceptClass> getConceptClasses(java.lang.String name)
                                               throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptClassByName(java.lang.String)

getAllConceptClasses

java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired)
                                                  throws DAOException
Throws:
DAOException
See Also:
ConceptService.getAllConceptClasses(boolean)

saveConceptClass

ConceptClass saveConceptClass(ConceptClass cc)
                              throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveConceptClass(org.openmrs.ConceptClass)

purgeConceptClass

void purgeConceptClass(ConceptClass cc)
                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeConceptClass(org.openmrs.ConceptClass)

getAllConceptDatatypes

java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired)
                                                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.getAllConceptDatatypes(boolean)

getConceptDatatypes

@Deprecated
java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name)
                                                    throws DAOException
Deprecated. 

Throws:
DAOException
See Also:
ConceptService.getConceptDatatypes(java.lang.String)

getConceptDatatypeByName

ConceptDatatype getConceptDatatypeByName(java.lang.String name)
                                         throws DAOException
Parameters:
name -
Returns:
the ConceptDatatype that matches name exactly or null if one does not exist.
Throws:
DAOException

getConceptDatatype

ConceptDatatype getConceptDatatype(java.lang.Integer i)
                                   throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptDatatype(java.lang.Integer)

saveConceptDatatype

ConceptDatatype saveConceptDatatype(ConceptDatatype cd)
                                    throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveConceptDatatype(org.openmrs.ConceptDatatype)

purgeConceptDatatype

void purgeConceptDatatype(ConceptDatatype cd)
                          throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeConceptDatatype(org.openmrs.ConceptDatatype)

updateConceptSetDerived

void updateConceptSetDerived(Concept concept)
                             throws DAOException
Throws:
DAOException
See Also:
ConceptService.updateConceptSetDerived(org.openmrs.Concept)

updateConceptSetDerived

void updateConceptSetDerived()
                             throws DAOException
Throws:
DAOException
See Also:
ConceptService.updateConceptSetDerived()

getConceptSetsByConcept

java.util.List<ConceptSet> getConceptSetsByConcept(Concept c)
                                                   throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptSetsByConcept(org.openmrs.Concept)

getSetsContainingConcept

java.util.List<ConceptSet> getSetsContainingConcept(Concept concept)
                                                    throws DAOException
Throws:
DAOException
See Also:
ConceptService.getSetsContainingConcept(org.openmrs.Concept)

getConceptNumeric

ConceptNumeric getConceptNumeric(java.lang.Integer conceptId)
                                 throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptNumeric(java.lang.Integer)

getConceptsByAnswer

java.util.List<Concept> getConceptsByAnswer(Concept concept)
                                            throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptsByAnswer(org.openmrs.Concept)

getPrevConcept

Concept getPrevConcept(Concept c)
                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.getPrevConcept(org.openmrs.Concept)

getNextConcept

Concept getNextConcept(Concept c)
                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.getNextConcept(org.openmrs.Concept)

getAllConceptProposals

java.util.List<ConceptProposal> getAllConceptProposals(boolean includeComplete)
                                                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.getAllConceptProposals(boolean)

getConceptProposal

ConceptProposal getConceptProposal(java.lang.Integer i)
                                   throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptProposal(java.lang.Integer)

getConceptProposals

java.util.List<ConceptProposal> getConceptProposals(java.lang.String text)
                                                    throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptProposals(java.lang.String)

getProposedConcepts

java.util.List<Concept> getProposedConcepts(java.lang.String text)
                                            throws DAOException
Throws:
DAOException
See Also:
ConceptService.getProposedConcepts(java.lang.String)

saveConceptProposal

ConceptProposal saveConceptProposal(ConceptProposal cp)
                                    throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveConceptProposal(org.openmrs.ConceptProposal)

purgeConceptProposal

void purgeConceptProposal(ConceptProposal cp)
                          throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeConceptProposal(org.openmrs.ConceptProposal)

getConceptsWithDrugsInFormulary

java.util.List<Concept> getConceptsWithDrugsInFormulary()
                                                        throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptsWithDrugsInFormulary()

updateConceptWord

void updateConceptWord(Concept concept)
                       throws DAOException
Throws:
DAOException
See Also:
ConceptService.updateConceptWord(org.openmrs.Concept)
Expected behavior:
update conceptWords for this concept in datastore

saveConceptNameTag

ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)

getConceptNameTag

ConceptNameTag getConceptNameTag(java.lang.Integer i)

getConceptNameTagByName

ConceptNameTag getConceptNameTagByName(java.lang.String name)

getAllConceptNameTags

java.util.List<ConceptNameTag> getAllConceptNameTags()
See Also:
ConceptService.getAllConceptNameTags()

getConceptSource

ConceptSource getConceptSource(java.lang.Integer conceptSourceId)
                               throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptSource(java.lang.Integer)

getAllConceptSources

java.util.List<ConceptSource> getAllConceptSources()
                                                   throws DAOException
Throws:
DAOException
See Also:
ConceptService.getAllConceptSources()

saveConceptSource

ConceptSource saveConceptSource(ConceptSource conceptSource)
                                throws DAOException
Throws:
DAOException
See Also:
ConceptService.saveConceptSource(org.openmrs.ConceptSource)

deleteConceptSource

ConceptSource deleteConceptSource(ConceptSource cs)
                                  throws DAOException
Throws:
DAOException
See Also:
ConceptService.purgeConceptSource(org.openmrs.ConceptSource)

getLocalesOfConceptNames

java.util.Set<java.util.Locale> getLocalesOfConceptNames()
See Also:
ConceptService.getLocalesOfConceptNames()

getMaxConceptId

java.lang.Integer getMaxConceptId()
See Also:
ConceptService.getMaxConceptId()

conceptIterator

java.util.Iterator<Concept> conceptIterator()
See Also:
ConceptService.conceptIterator()

getConceptByMapping

Concept getConceptByMapping(java.lang.String conceptCode,
                            java.lang.String mappingCode)
See Also:
ConceptService.getConceptByMapping(java.lang.String, java.lang.String)

getConceptByUuid

Concept getConceptByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getConceptClassByUuid

ConceptClass getConceptClassByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getConceptAnswerByUuid

ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)

getConceptDerivedByUuid

ConceptDerived getConceptDerivedByUuid(java.lang.String uuid)

getConceptNameByUuid

ConceptName getConceptNameByUuid(java.lang.String uuid)

getConceptSetByUuid

ConceptSet getConceptSetByUuid(java.lang.String uuid)

getConceptSetDerivedByUuid

ConceptSetDerived getConceptSetDerivedByUuid(java.lang.String uuid)

getConceptSourceByUuid

ConceptSource getConceptSourceByUuid(java.lang.String uuid)

getConceptWordByUuid

ConceptWord getConceptWordByUuid(java.lang.String uuid)

getConceptDatatypeByUuid

ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getConceptNumericByUuid

ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getConceptProposalByUuid

ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getDrugByUuid

Drug getDrugByUuid(java.lang.String uuid)
Auto generated method comment

Parameters:
uuid -
Returns:

getDrugIngredientByUuid

DrugIngredient getDrugIngredientByUuid(java.lang.String uuid)

getConceptUuids

java.util.Map<java.lang.Integer,java.lang.String> getConceptUuids()
See Also:
org.openmrs.api.ConceptService#getConceptUuids()

getConceptDescriptionByUuid

ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)

getConceptNameTagByUuid

ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)

getConceptsByConceptSource

java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSourceName)
                                                      throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptsByConceptSource(org.openmrs.ConceptSource)

getConceptSourceByName

ConceptSource getConceptSourceByName(java.lang.String conceptSourceName)
                                     throws DAOException
Throws:
DAOException
See Also:
ConceptService.getConceptSourceByName(java.lang.String)

getSavedConceptDatatype

ConceptDatatype getSavedConceptDatatype(Concept concept)
Gets the value of conceptDatatype currently saved in the database for the given concept, bypassing any caches. This is used prior to saving an concept so that we can change the obs if need be

Parameters:
concept - for which the conceptDatatype should be fetched
Returns:
the conceptDatatype currently in the database for this concept
Expected behavior:
get saved conceptDatatype from database

getSavedConceptName

ConceptName getSavedConceptName(ConceptName conceptName)
Gets the persisted copy of the conceptName currently saved in the database for the given conceptName, bypassing any caches. This is used prior to saving an concept so that we can change the obs if need be or avoid breaking any obs referencing it.

Parameters:
conceptName - ConceptName to fetch from the database
Returns:
the persisted copy of the conceptName currently saved in the database for this conceptName

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change