public class DWRConceptService
extends java.lang.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 |
---|---|
java.lang.String |
convertBooleanConceptToCoded(java.lang.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
|
java.util.List<java.lang.String> |
createConceptReferenceTerm(java.lang.String code,
java.lang.Integer conceptSourceId,
java.lang.String name)
Process calls to create new reference terms
|
java.util.List<java.lang.Object> |
findBatchOfConceptReferenceTerms(java.lang.String phrase,
java.lang.Integer sourceId,
java.lang.Integer start,
java.lang.Integer length,
boolean includeRetired)
Gets a list of conceptListItems matching the given arguments
|
java.util.List<java.lang.Object> |
findBatchOfConcepts(java.lang.String phrase,
boolean includeRetired,
java.util.List<java.lang.String> includeClassNames,
java.util.List<java.lang.String> excludeClassNames,
java.util.List<java.lang.String> includeDatatypeNames,
java.util.List<java.lang.String> excludeDatatypeNames,
java.lang.Integer start,
java.lang.Integer length)
Gets a list of conceptListItems matching the given arguments
|
java.util.List<java.lang.Object> |
findConceptAnswers(java.lang.String text,
java.lang.Integer conceptId,
boolean includeVoided,
boolean includeDrugConcepts)
Find a list of
ConceptListItem or ConceptDrugListItem s that are answers to
the given question. |
java.util.List<java.lang.Object> |
findConcepts(java.lang.String phrase,
boolean includeRetired,
java.util.List<java.lang.String> includeClassNames,
java.util.List<java.lang.String> excludeClassNames,
java.util.List<java.lang.String> includeDatatypeNames,
java.util.List<java.lang.String> excludeDatatypeNames,
boolean includeDrugConcepts)
Gets a list of conceptListItems matching the given arguments
|
java.util.Map<java.lang.String,java.lang.Object> |
findCountAndConceptReferenceTerms(java.lang.String phrase,
java.lang.Integer sourceId,
java.lang.Integer start,
java.lang.Integer length,
boolean includeRetired,
boolean getMatchCount) |
java.util.Map<java.lang.String,java.lang.Object> |
findCountAndConcepts(java.lang.String phrase,
boolean includeRetired,
java.util.List<java.lang.String> includeClassNames,
java.util.List<java.lang.String> excludeClassNames,
java.util.List<java.lang.String> includeDatatypeNames,
java.util.List<java.lang.String> excludeDatatypeNames,
java.lang.Integer start,
java.lang.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.
|
java.util.List<java.lang.Object> |
findDrugs(java.lang.String phrase,
boolean includeRetired) |
java.util.List<ConceptListItem> |
findProposedConcepts(java.lang.String text) |
java.util.List<ConceptListItem> |
getAnswersForQuestion(java.lang.Integer conceptId) |
ConceptListItem |
getConcept(java.lang.Integer conceptId)
Get a
ConceptListItem by its internal database id. |
java.lang.String |
getConceptNumericUnits(java.lang.Integer conceptId) |
ConceptReferenceTermListItem |
getConceptReferenceTerm(java.lang.Integer conceptReferenceTermId)
Get a
ConceptReferenceTerm by its internal database id. |
java.util.List<java.lang.Object> |
getConceptSet(java.lang.Integer conceptId) |
ConceptDrugListItem |
getDrug(java.lang.Integer drugId) |
java.util.List<java.lang.Object> |
getDrugs(java.lang.Integer conceptId,
boolean showConcept) |
java.util.List<ConceptListItem> |
getQuestionsForAnswer(java.lang.Integer conceptId) |
boolean |
isValidNumericValue(java.lang.Float value,
java.lang.Integer conceptId) |
public java.util.List<java.lang.Object> findConcepts(java.lang.String phrase, boolean includeRetired, java.util.List<java.lang.String> includeClassNames, java.util.List<java.lang.String> excludeClassNames, java.util.List<java.lang.String> includeDatatypeNames, java.util.List<java.lang.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 java.util.List<java.lang.Object> findBatchOfConcepts(java.lang.String phrase, boolean includeRetired, java.util.List<java.lang.String> includeClassNames, java.util.List<java.lang.String> excludeClassNames, java.util.List<java.lang.String> includeDatatypeNames, java.util.List<java.lang.String> excludeDatatypeNames, java.lang.Integer start, java.lang.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(java.lang.Integer conceptId)
ConceptListItem
by its internal database id.conceptId
- the id to look forConceptListItem
or null if conceptId is not foundpublic java.util.List<ConceptListItem> findProposedConcepts(java.lang.String text)
public java.util.List<java.lang.Object> findConceptAnswers(java.lang.String text, java.lang.Integer conceptId, boolean includeVoided, boolean includeDrugConcepts) throws java.lang.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
queryjava.lang.Exception
- if given conceptId is not foundpublic java.util.List<java.lang.Object> getConceptSet(java.lang.Integer conceptId)
public java.util.List<ConceptListItem> getQuestionsForAnswer(java.lang.Integer conceptId)
public ConceptDrugListItem getDrug(java.lang.Integer drugId)
public java.util.List<java.lang.Object> getDrugs(java.lang.Integer conceptId, boolean showConcept)
public java.util.List<java.lang.Object> findDrugs(java.lang.String phrase, boolean includeRetired) throws APIException
APIException
public boolean isValidNumericValue(java.lang.Float value, java.lang.Integer conceptId)
public java.lang.String getConceptNumericUnits(java.lang.Integer conceptId)
public java.util.List<ConceptListItem> getAnswersForQuestion(java.lang.Integer conceptId)
public java.lang.String convertBooleanConceptToCoded(java.lang.Integer conceptId)
conceptId
- the conceptId of the concept to be convertedpublic java.util.Map<java.lang.String,java.lang.Object> findCountAndConcepts(java.lang.String phrase, boolean includeRetired, java.util.List<java.lang.String> includeClassNames, java.util.List<java.lang.String> excludeClassNames, java.util.List<java.lang.String> includeDatatypeNames, java.util.List<java.lang.String> excludeDatatypeNames, java.lang.Integer start, java.lang.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
public ConceptReferenceTermListItem getConceptReferenceTerm(java.lang.Integer conceptReferenceTermId)
ConceptReferenceTerm
by its internal database id.conceptReferenceTermId
- the id to look forConceptReferenceTermListItem
or null if conceptReferenceTermId is not foundpublic java.util.List<java.lang.Object> findBatchOfConceptReferenceTerms(java.lang.String phrase, java.lang.Integer sourceId, java.lang.Integer start, java.lang.Integer length, boolean includeRetired)
phrase
- the string to search againstsourceId
- the id of concept source where to look up reference termsstart
- the beginning indexlength
- the number of matching concept reference terms to returnincludeRetired
- Specifies if retired concept reference terms should be included or notList
of ConceptReferenceTermListItem
public java.util.Map<java.lang.String,java.lang.Object> findCountAndConceptReferenceTerms(java.lang.String phrase, java.lang.Integer sourceId, java.lang.Integer start, java.lang.Integer length, boolean includeRetired, boolean getMatchCount) throws APIException
phrase
- query the string to match against the reference term namessourceId
- the id for the concept source from which the terms should be looked upincludeRetired
- specifies if the retired terms should be includedstart
- beginning index for the batchlength
- number of terms to return in the batchgetMatchCount
- Specifies if the count of matches should be included in the returned mapAPIException
public java.util.List<java.lang.String> createConceptReferenceTerm(java.lang.String code, java.lang.Integer conceptSourceId, java.lang.String name)
code
- the unique code for the reference termconceptSourceId
- the concept source for the termname
- the unique name for the reference termCopyright © 2018 OpenMRS Inc.. All Rights Reserved.