public class DWRConceptService extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
DWRConceptService() |
Modifier and Type | Method and Description |
---|---|
String |
convertBooleanConceptToCoded(Integer conceptId)
Converts the datatype of a concept that already has Obs referencing it from boolean to coded
to support addition of more coded answers
|
List<Object> |
findBatchOfConcepts(String phrase,
boolean includeRetired,
List<String> includeClassNames,
List<String> excludeClassNames,
List<String> includeDatatypeNames,
List<String> excludeDatatypeNames,
Integer start,
Integer length)
Gets a list of conceptListItems matching the given arguments
|
List<Object> |
findConceptAnswers(String text,
Integer conceptId,
boolean includeVoided,
boolean includeDrugConcepts)
Find a list of
ConceptListItem or ConceptDrugListItem s that are answers to
the given question. |
List<Object> |
findConcepts(String phrase,
boolean includeRetired,
List<String> includeClassNames,
List<String> excludeClassNames,
List<String> includeDatatypeNames,
List<String> excludeDatatypeNames,
boolean includeDrugConcepts)
Gets a list of conceptListItems matching the given arguments
|
Map<String,Object> |
findCountAndConcepts(String phrase,
boolean includeRetired,
List<String> includeClassNames,
List<String> excludeClassNames,
List<String> includeDatatypeNames,
List<String> excludeDatatypeNames,
Integer start,
Integer length,
boolean getMatchCount)
Returns a map of results with the values as count of matches and a partial list of the
matching concepts (depending on values of start and length parameters) while the keys are are
'count' and 'objectList' respectively, if the length parameter is not specified, then all
matches will be returned from the start index if specified.
|
List<Object> |
findDrugs(String phrase,
boolean includeRetired) |
List<ConceptListItem> |
findProposedConcepts(String text) |
List<ConceptListItem> |
getAnswersForQuestion(Integer conceptId) |
ConceptListItem |
getConcept(Integer conceptId)
Get a
ConceptListItem by its internal database id. |
String |
getConceptNumericUnits(Integer conceptId) |
List<Object> |
getConceptSet(Integer conceptId) |
ConceptDrugListItem |
getDrug(Integer drugId) |
List<Object> |
getDrugs(Integer conceptId,
boolean showConcept) |
List<ConceptListItem> |
getQuestionsForAnswer(Integer conceptId) |
boolean |
isValidNumericValue(Float value,
Integer conceptId) |
public List<Object> findConcepts(String phrase, boolean includeRetired, List<String> includeClassNames, List<String> excludeClassNames, List<String> includeDatatypeNames, List<String> excludeDatatypeNames, boolean includeDrugConcepts)
phrase
- the concept name string to match againstincludeRetired
- boolean if false, will exclude retired conceptsincludeClassNames
- List of ConceptClasses to restrict toexcludeClassNames
- List of ConceptClasses to leave out of resultsincludeDatatypeNames
- List of ConceptDatatypes to restrict toexcludeDatatypeNames
- List of ConceptDatatypes to leave out of resultsincludeDrugConcepts
- Specifies if drugs with matching conceptNames should be includedpublic List<Object> findBatchOfConcepts(String phrase, boolean includeRetired, List<String> includeClassNames, List<String> excludeClassNames, List<String> includeDatatypeNames, List<String> excludeDatatypeNames, Integer start, Integer length)
phrase
- the concept name string to match againstincludeRetired
- boolean if false, will exclude retired conceptsincludeClassNames
- List of ConceptClasses to restrict toexcludeClassNames
- List of ConceptClasses to leave out of resultsincludeDatatypeNames
- List of ConceptDatatypes to restrict toexcludeDatatypeNames
- List of ConceptDatatypes to leave out of resultsstart
- the beginning indexlength
- the number of matching concepts to returnpublic ConceptListItem getConcept(Integer conceptId)
ConceptListItem
by its internal database id.conceptId
- the id to look forConceptListItem
or null if conceptId is not foundpublic List<ConceptListItem> findProposedConcepts(String text)
public List<Object> findConceptAnswers(String text, Integer conceptId, boolean includeVoided, boolean includeDrugConcepts) throws Exception
ConceptListItem
or ConceptDrugListItem
s that are answers to
the given question. The given question is determined by the given conceptId
text
- the text to search for within the answersconceptId
- the conceptId of the question conceptincludeVoided
- (this argument is ignored now. searching for voided answers is not
logical)includeDrugConcepts
- if true, drug concepts are searched tooConceptListItem
or ConceptDrugListItem
answers that match the
queryException
- if given conceptId is not foundpublic List<ConceptListItem> getQuestionsForAnswer(Integer conceptId)
public ConceptDrugListItem getDrug(Integer drugId)
public List<Object> findDrugs(String phrase, boolean includeRetired) throws APIException
APIException
public List<ConceptListItem> getAnswersForQuestion(Integer conceptId)
public String convertBooleanConceptToCoded(Integer conceptId)
conceptId
- the conceptId of the concept to be convertedpublic Map<String,Object> findCountAndConcepts(String phrase, boolean includeRetired, List<String> includeClassNames, List<String> excludeClassNames, List<String> includeDatatypeNames, List<String> excludeDatatypeNames, Integer start, Integer length, boolean getMatchCount) throws APIException
phrase
- concept name or conceptIdincludeRetired
- boolean if false, will exclude retired conceptsincludeClassNames
- List of ConceptClasses to restrict toexcludeClassNames
- List of ConceptClasses to leave out of resultsincludeDatatypeNames
- List of ConceptDatatypes to restrict toexcludeDatatypeNames
- List of ConceptDatatypes to leave out of resultsstart
- the beginning indexlength
- the number of matching concepts to returngetMatchCount
- Specifies if the count of matches should be included in the returned mapAPIException
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.