|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Transactional public interface ConceptService
Contains methods pertaining to creating/updating/deleting/retiring Concepts, Drugs, Concept Proposals, and all other things 'Concept'.
To get a list of concepts:
List<Concept> concepts = Context.getConceptService().getAllConcepts();To get a single concept:
// if there is a concept row in the database with concept_id = 3845 Concept concept = Context.getConceptService().getConcept(3845); String name = concept.getPreferredName(Context.getLocale()).getName();To save a concept to the database
Concept concept = new Concept(); concept.setConceptClass(Context.getConceptService().getConceptClass(3)); concept.setDatatype(Context.getConceptService().getConceptDatatype(17)); concept.setName... ... // and other required values on the concept Context.getConceptService().saveConcept(concept);
Context
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> searchLocales,
boolean includeRetired,
java.util.List<ConceptClass> requireClasses,
java.util.List<ConceptClass> excludeClasses,
java.util.List<ConceptDatatype> requireDatatypes,
java.util.List<ConceptDatatype> excludeDatatypes)
Searches on given phrase via the concept word table within a sorted list of Locales |
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 includeVoided)
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. Use getProposedConcepts(String) |
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 conceptClassId)
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. use getAllConceptClasses(boolean) |
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(java.lang.String name)
Deprecated. you *probably* want to use getConceptDatatypeByName(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 tag)
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 text)
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 concept)
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 concept)
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 concept)
Deprecated. use getConceptsByConceptSet(Concept) |
ConceptSource |
getConceptSource(java.lang.Integer i)
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 answersToConcept,
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 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 drugId)
Return the drug object corresponding to the given name or drugId |
Drug |
getDrugByUuid(java.lang.String uuid)
Get Drug by its UUID |
java.util.List<Drug> |
getDrugs()
Deprecated. use getAllDrugs() |
java.util.List<Drug> |
getDrugs(Concept concept)
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 concept)
Finds the next concept in the dictionary that has the next largest concept id |
Concept |
getPrevConcept(Concept concept)
Finds the previous concept in the dictionary that has the next lowest concept id |
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. use saveConceptProposal(ConceptProposal) |
void |
purgeConcept(Concept conceptOrConceptNumeric)
Completely purge a Concept or ConceptNumeric from the database. |
void |
purgeConceptClass(ConceptClass cc)
Purge a ConceptClass |
void |
purgeConceptDatatype(ConceptDatatype cd)
Purge a ConceptDatatype. |
void |
purgeConceptProposal(ConceptProposal cp)
Removes a concept proposal from the database entirely. |
ConceptSource |
purgeConceptSource(ConceptSource cs)
Delete ConceptSource |
void |
purgeDrug(Drug drug)
Completely purge a Drug from the database. |
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated. use ConceptProposal.rejectConceptProposal() |
Concept |
retireConcept(Concept conceptOrConceptNumeric,
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) |
Methods inherited from interface org.openmrs.api.OpenmrsService |
---|
onShutdown, onStartup |
Method Detail |
---|
void setConceptDAO(ConceptDAO dao)
dao
- The data access object to use@Deprecated @Authorized(value="Manage Concepts") void createConcept(Concept concept) throws APIException
APIException
@Deprecated @Authorized(value="Manage Concepts") void createConcept(ConceptNumeric concept) throws APIException
APIException
@Deprecated @Authorized(value="Manage Concepts") void updateConcept(Concept concept) throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByUuid(java.lang.String uuid)
uuid
-
@Deprecated @Authorized(value="Manage Concepts") void updateConcept(ConceptNumeric concept) throws APIException
APIException
@Deprecated @Authorized(value="Manage Concepts") void createDrug(Drug drug) throws APIException
APIException
@Deprecated @Authorized(value="Manage Concepts") void updateDrug(Drug drug) throws APIException
APIException
@Deprecated @Authorized(value="Purge Concepts") void deleteConcept(Concept concept) throws APIException
APIException
@Deprecated @Authorized(value="Manage Concepts") void voidConcept(Concept concept, java.lang.String reason) throws APIException
retireConcept(Concept, String)
APIException
@Authorized(value="Manage Concepts") Concept saveConcept(Concept concept) throws APIException
Concept
or ConceptNumeric
in the database
If this is a new concept, the returned concept will have a new Concept.getConceptId()
inserted into it that was generated by the database
concept
- The Concept
or ConceptNumeric
to save or update
Concept
or ConceptNumeric
that was saved or updated
APIException
ConceptsLockedException
ConceptInUseException
@Authorized(value="Manage Concepts") Drug saveDrug(Drug drug) throws APIException
Drug
in the database. If this is a new drug, the
returned drug object will have a new Drug.getDrugId()
inserted into it that was
generated by the database
drug
- The Drug to save or update
APIException
@Authorized(value="Purge Concepts") void purgeConcept(Concept conceptOrConceptNumeric) throws APIException
Concept
or ConceptNumeric
from the database.
This should not typically be used unless desperately needed. Most should just be retired. See
retireConcept(Concept, String)
conceptOrConceptNumeric
- The Concept
or ConceptNumeric
to
remove from the system
APIException
@Authorized(value="Manage Concepts") Concept retireConcept(Concept conceptOrConceptNumeric, java.lang.String reason) throws APIException
conceptOrConceptNumeric
- The Concept
or ConceptNumeric
to
retirereason
- The retire reason
Concept
or ConceptNumeric
APIException
@Authorized(value="Manage Concepts") Drug retireDrug(Drug drug, java.lang.String reason) throws APIException
drug
- The Drug to retirereason
- The retire reason
APIException
@Authorized(value="Manage Concepts") Drug unretireDrug(Drug drug) throws APIException
drug
- that is current set as retired
APIException
@Authorized(value="Purge Concepts") void purgeDrug(Drug drug) throws APIException
drug
- The Drug to remove from the system
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConcept(java.lang.Integer conceptId) throws APIException
conceptId
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptName getConceptName(java.lang.Integer conceptNameId) throws APIException
conceptNameId
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptAnswer getConceptAnswer(java.lang.Integer conceptAnswerId) throws APIException
conceptAnswerId
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrug(java.lang.Integer drugId) throws APIException
drugId
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNumeric getConceptNumeric(java.lang.Integer conceptId) throws APIException
conceptId
- The ConceptNumeric id
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptClass getConceptClass(java.lang.Integer conceptClassId) throws APIException
conceptClassId
- the concept class identifier
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getAllConcepts() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getAllConcepts(java.lang.String sortBy, boolean asc, boolean includeRetired) throws APIException
sortBy
- The property name to sort by; if null or invalid, concept_id is used.asc
- true = sort ascending; false = sort descendingincludeRetired
- If true
, retired concepts will also be returned
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConcepts(java.lang.String sortBy, java.lang.String dir) throws APIException
getAllConcepts(String, boolean, boolean)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsByName(java.lang.String name) throws APIException
name
- The search string
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByName(java.lang.String name) throws APIException
name
- The search string
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByIdOrName(java.lang.String idOrName) throws APIException
getConcept(String)
Note: this just calls other impl methods; no DAO of its own
idOrName
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConcept(java.lang.String conceptIdOrName) throws APIException
conceptIdOrName
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") 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 APIException
phrase
- matched to the start of any word in any of the names of a conceptlocales
- ListincludeRetired
- boolean if false, will exclude retired conceptsrequireClasses
- ListexcludeClasses
- ListrequireDatatypes
- ListexcludeDatatypes
- ListanswersToConcept
- all results will be a possible answer to this conceptstart
- all results less than this number will be removedsize
- if non zero, all results after start
+ size
will be
removed
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> getConceptWords(java.lang.String phrase, java.util.Locale locale) throws APIException
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
phrase
- search stringlocale
-
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired) throws APIException
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") 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) throws APIException
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrugByUuid(java.lang.String uuid)
uuid
-
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.Locale locale, boolean includeRetired, int start, int size) throws APIException
getConceptWords(String, List, boolean, List, List, List, List, Concept, Integer, Integer)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrug(java.lang.String drugNameOrId) throws APIException
drugNameOrId
- String name or drugId to match exactly on
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Drug getDrugByNameOrId(java.lang.String drugId) throws APIException
drugId
- String
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getDrugs() throws APIException
getAllDrugs()
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getAllDrugs() throws APIException
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getDrugs(Concept concept) throws APIException
getDrugsByConcept(Concept)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getDrugsByConcept(Concept concept) throws APIException
concept
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getAllDrugs(boolean includeRetired)
includeRetired
- If true
then the search will include voided Drugs
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> findDrugs(java.lang.String phrase, boolean includeVoided) throws APIException
getDrugs(String)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Drug> getDrugs(java.lang.String phrase) throws APIException
phrase
- Search phrase
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsByClass(ConceptClass cc) throws APIException
cc
- ConceptClass
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Classes") java.util.List<ConceptClass> getConceptClasses() throws APIException
getAllConceptClasses(boolean)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Classes") ConceptClass getConceptClassByName(java.lang.String name) throws APIException
name
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Classes") java.util.List<ConceptClass> getAllConceptClasses() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Classes") java.util.List<ConceptClass> getAllConceptClasses(boolean includeRetired) throws APIException
includeRetired
- include retired concept classes in the search results?
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Classes") ConceptClass getConceptClassByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptAnswer getConceptAnswerByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptName getConceptNameByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptSet getConceptSetByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concept Sources") ConceptSource getConceptSourceByUuid(java.lang.String uuid)
uuid
-
@Authorized(value="Manage Concept Classes") ConceptClass saveConceptClass(ConceptClass cc) throws APIException
cc
- ConceptClass to create or update
APIException
@Authorized(value="Purge Concept Classes") void purgeConceptClass(ConceptClass cc) throws APIException
cc
- ConceptClass to delete
APIException
@Authorized(value="Manage Concept Datatypes") ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws APIException
cd
- ConceptDatatype to create or update
APIException
@Authorized(value="Purge Concept Datatypes") void purgeConceptDatatype(ConceptDatatype cd) throws APIException
cd
- ConceptDatatype to purge
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") java.util.List<ConceptDatatype> getAllConceptDatatypes() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") java.util.List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws APIException
includeRetired
- boolean - include the retired datatypes?
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") @Deprecated java.util.List<ConceptDatatype> getConceptDatatypes(java.lang.String name) throws APIException
getConceptDatatypeByName(String)
name
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatype(java.lang.Integer i) throws APIException
i
- Integer for the requested ConceptDatatype
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatypeByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concept Datatypes") ConceptDatatype getConceptDatatypeByName(java.lang.String name) throws APIException
name
-
APIException
@Authorized(value="Manage Concepts") void updateConceptSetDerived(Concept concept) throws APIException
concept
-
APIException
@Authorized(value="Manage Concepts") void updateConceptSetDerived() throws APIException
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptSet> getConceptSets(Concept concept) throws APIException
getConceptSetsByConcept(Concept)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptSet> getConceptSetsByConcept(Concept concept) throws APIException
For example to find all concepts for ARVs, you would do getConceptSets(getConcept("ANTIRETROVIRAL MEDICATIONS")) and then take the conceptIds from the resulting list.
concept
- The concept representing the concept set
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsInSet(Concept concept) throws APIException
getConceptsByConceptSet(Concept)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsByConceptSet(Concept concept) throws APIException
concept
- The concept representing the concept set
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptSet> getSetsContainingConcept(Concept concept) throws APIException
concept
-
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Proposals") java.util.List<ConceptProposal> getConceptProposals(boolean includeCompleted) throws APIException
getAllConceptProposals(boolean)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") java.util.List<ConceptProposal> getAllConceptProposals(boolean includeCompleted) throws APIException
includeCompleted
- boolean - include completed proposals as well?
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNumeric getConceptNumericByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") ConceptProposal getConceptProposal(java.lang.Integer conceptProposalId) throws APIException
conceptProposalId
- the Integer concept proposal Id
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") java.util.List<ConceptProposal> getConceptProposals(java.lang.String text) throws APIException
text
-
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concept Proposals") java.util.List<Concept> findProposedConcepts(java.lang.String text) throws APIException
getProposedConcepts(String)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") java.util.List<Concept> getProposedConcepts(java.lang.String text) throws APIException
text
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> findConcepts(java.lang.String phrase, java.util.List<java.util.Locale> searchLocales, boolean includeRetired, java.util.List<ConceptClass> requireClasses, java.util.List<ConceptClass> excludeClasses, java.util.List<ConceptDatatype> requireDatatypes, java.util.List<ConceptDatatype> excludeDatatypes)
phrase
- String search phrasesearchLocales
- 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
findConcepts(String,Locale,boolean)
@Deprecated @Authorized(value="Add Concept Proposals") void proposeConcept(ConceptProposal conceptProposal) throws APIException
saveConceptProposal(ConceptProposal)
APIException
@Authorized(value={"Add Concept Proposals","Edit Concept Proposals"}) ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException
conceptProposal
- The ConceptProposal to save
APIException
@Authorized(value="Purge Concept Proposals") void purgeConceptProposal(ConceptProposal cp) throws APIException
cp
-
APIException
@Authorized(value="Manage Concepts") Concept mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
cp
- mappedConcept
-
APIException
@Deprecated @Authorized(value="Edit Concept Proposals") void rejectConceptProposal(ConceptProposal cp) throws APIException
ConceptProposal.rejectConceptProposal()
APIException
@Deprecated @Authorized(value="Add Concept Proposals") java.util.List<ConceptProposal> findMatchingConceptProposals(java.lang.String text)
getConceptProposals(String)
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> findConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept, boolean includeRetired) throws APIException
getConceptAnswers(String, Locale, Concept)
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptWord> getConceptAnswers(java.lang.String phrase, java.util.Locale locale, Concept concept) throws APIException
phrase
- locale
- concept
- the answers to match on
APIException
@Deprecated @Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getQuestionsForAnswer(Concept concept) throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsByAnswer(Concept concept) throws APIException
concept
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getPrevConcept(Concept concept) throws APIException
concept
- the offset Concept
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getNextConcept(Concept concept) throws APIException
concept
- the offset Concept
APIException
@Transactional(readOnly=true) void checkIfLocked() throws ConceptsLockedException
ConceptsLockedException
@Transactional(readOnly=true) @Authorized(value="View Concept Proposals") ConceptProposal getConceptProposalByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<Concept> getConceptsWithDrugsInFormulary() throws APIException
APIException
@Authorized(value="Manage Concepts") void updateConceptWord(Concept concept) throws APIException
concept
-
APIException
@Authorized(value="Manage Concepts") void updateConceptWords() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTagByUuid(java.lang.String uuid)
uuid
-
Concept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
@Authorized(value="Manage Concepts") void updateConceptWords(java.lang.Integer conceptIdStart, java.lang.Integer conceptIdEnd) throws APIException
conceptIdStart
and
conceptIdEnd
(inclusive) and calls updateConceptWord(concept)
conceptIdStart
- starts update with this concept_idconceptIdEnd
- ends update with this concept_id
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptComplex getConceptComplex(java.lang.Integer conceptId)
conceptId
- of the ComplexConcept
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTagByName(java.lang.String tag)
tag
- String name of ConceptNameTag
Concept.getPreferredName(Locale)
,
Concept.getFullySpecifiedName(Locale)
,
Concept.getShortNameInLocale(Locale)
,
Concept.getShortestName(Locale, Boolean)
@Transactional(readOnly=true) java.util.Set<java.util.Locale> getLocalesOfConceptNames()
@Transactional(readOnly=true) @Authorized(value="View Concept Sources") java.util.List<ConceptSource> getAllConceptSources() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Concept Sources") ConceptSource getConceptSource(java.lang.Integer i) throws APIException
i
- Integer conceptSourceId
APIException
@Authorized(value="Manage Concept Sources") ConceptSource saveConceptSource(ConceptSource conceptSource) throws APIException
conceptSource
- ConceptSource to create
APIException
@Authorized(value="Purge Concept Sources") ConceptSource purgeConceptSource(ConceptSource cs) throws APIException
cs
- ConceptSource object delete
APIException
@Authorized(value="Purge Concept Sources") ConceptSource retireConceptSource(ConceptSource cs, java.lang.String reason) throws APIException
cs
- the concept source to retirereason
- why the concept source is to be retired, must not be empty of null
APIException
@Authorized(value="Manage Concept Name tags") ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
nameTag
- the concept name tag to be saved
@Transactional(readOnly=true) java.lang.Integer getMaxConceptId()
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.Iterator<Concept> conceptIterator()
@Transactional(readOnly=true) @Authorized(value="View Concepts") Concept getConceptByMapping(java.lang.String conceptCode, java.lang.String mappingCode) throws APIException
ConceptMap
This will return the Concept
which contains
a ConceptMap
entry whose sourceCode
is equal to the passed
conceptCode
and whose ConceptSource
has either a name
or
hl7Code
that is equal to the passed mappingCode
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
@Transactional(readOnly=true) java.util.List<ConceptNameTag> getAllConceptNameTags()
@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptNameTag getConceptNameTag(java.lang.Integer id)
ConceptNameTag
with the given database primary key
id
- the concept name tag id to find
ConceptNameTag
or null if none found@Transactional(readOnly=true) @Authorized(value="View Concepts") ConceptDescription getConceptDescriptionByUuid(java.lang.String uuid)
uuid
-
@Transactional(readOnly=true) @Authorized(value="View Concept Sources") ConceptSource getConceptSourceByName(java.lang.String conceptSourceName) throws APIException
conceptSourceName
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") java.util.List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws APIException
conceptSource
-
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") boolean hasAnyObservation(Concept concept)
concept
- which used or not used by an observation
APIException
@Transactional(readOnly=true) Concept getTrueConcept()
@Transactional(readOnly=true) Concept getFalseConcept()
@Authorized(value="Manage Concepts") void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException
conceptToChange
- the concept which to change
APIException
@Transactional(readOnly=true) @Authorized(value="View Concepts") boolean hasAnyObservation(ConceptName conceptName) throws APIException
conceptName
- which is used or not used by an observation
APIException
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |