Class SearchService
- java.lang.Object
-
- in.cdac.medinfo.csnotk.csnolib.service.SearchService
-
- All Implemented Interfaces:
java.io.Serializable
public class SearchService extends java.lang.Object implements java.io.SerializableProvides the basic methods to query the SNOMED CT repository for finding suggestions and searchingConcepts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.List<java.lang.String>>getLangRefset()This method used for retrieving language refset values from LangRefsetEnumjava.util.Set<java.lang.String>getSuggestions(java.lang.String matchTerm, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns limited best matching suggestions for given term/text in SNOMED CT repository.java.util.Set<java.lang.String>getSuggestions(java.lang.String matchTerm, EnumState enumState, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for term/text in the SNOMED CT repository based on provided component state (active, inactive, both).java.util.Set<java.lang.String>getSuggestions(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag.java.util.Set<java.lang.String>getSuggestions(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag, acceptability.java.util.Set<java.lang.String>getSuggestions(java.lang.String matchTerm, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text in SNOMED CT repository.Conceptsearch(java.lang.String conceptId)Searches given conceptId in the SNOMED CT repositoryjava.util.Set<CompositeDescription>search(java.lang.String matchTerm, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Searches given term/text or concept id in SNOMED CT repository.java.util.Set<CompositeDescription>search(java.lang.String matchTerm, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Searches limited best matching terms for given term/text or concept iD in SNOMED CT repository.java.util.Set<CompositeDescription>search(java.lang.String matchTerm, EnumState enumState, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Searches given term/text or concept id in the SNOMED CT repository based on provided component state (active, inactive, both).java.util.Set<CompositeDescription>search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Searches given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag.java.util.Set<CompositeDescription>search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean fullConcept, boolean excludeConcept)java.util.Set<CompositeDescription>search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Searches given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag, acceptability.java.util.Set<CompositeDescription>search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean fullConcept, boolean excludeConcept)java.util.List<Identifier>searchAlternateIdentifiers(java.lang.String id, java.lang.String moduleId)Searches for alternate identifiers of a SNOMED concept.IdentifiersearchLOINC(java.lang.String id)Searches the LOINC / SNOMEDCT code of code provided .SimpleMapRefsetResultsearchSimpleMap(java.lang.String refsetComponentId)Searches the simpleMapTarget of refsetComponentId provided .
-
-
-
Method Detail
-
search
public Concept search(java.lang.String conceptId)
Searches given conceptId in the SNOMED CT repository- Parameters:
conceptId- String it will search on the basis of given conceptId and also use for checking the entered conceptId is valid or not- Returns:
- Object of
Conceptrespected to given conceptId
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)
Searches given term/text or concept id in SNOMED CT repository. Result includes active as well as inactive terms.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched.groupByConcept- boolean value, if true, then method will return set ofCompositeDescriptionwhich will contain one description from one concept.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
CompositeDescriptionmatching the given term/text or Concept ID.
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)
Searches limited best matching terms for given term/text or concept iD in SNOMED CT repository.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.returnLimit- Maximum number of matching terms to be fetched. *groupByConcept- boolean value, if true, then method will return set ofCompositeDescriptionwhich will contain one description from one concept.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
CompositeDescriptionmatching the given term/text or Concept ID.
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, EnumState enumState, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)
Searches given term/text or concept id in the SNOMED CT repository based on provided component state (active, inactive, both). by the user.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.returnLimit- Maximum number of matching terms to be fetched.groupByConcept- boolean value, if true, then method will return set ofCompositeDescriptionwhich will contain one description from one concept.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
CompositeDescriptionmatching the given term/text or Concept ID.
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)
Searches given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.enumSemanticTagList-EnumSemanticTagRefers to the List of Semantic Tags in which SNOMED CT term/text or concept id will be searched.
If enumSemanticTag is,
all - It will search SNOMED CT term in all the Semantic Tags.
For other possible values please referEnumSemanticTag.
A list ofEnumSemanticTagcan also be provide in which search/suggest is to be perform.returnLimit- Maximum number of matching terms to be fetched.groupByConcept- boolean value, if true, then method will return set ofCompositeDescriptionwhich will contain one description from one concept.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
CompositeDescriptionmatching the given term/text or Concept ID.
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean fullConcept, boolean excludeConcept)
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)
Searches given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag, acceptability.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.enumSemanticTagList-EnumSemanticTagRefers to the Semantic Tag in which SNOMED CT term/text or concept id will be searched.
If enumSemanticTag is,
all - It will search SNOMED CT term in all the Semantic Tags.
For other possible values please referEnumSemanticTag.
A list ofEnumSemanticTagcan also be provide in which search/suggest is to be perform.enumAcceptability-EnumAcceptabilityRepresents the type of description i.e. whether the search results contains preferred terms or preferred terms other than FSN, only acceptable terms or synonyms.
If enumAcceptability is,
preferred - refers to all preferred description for a concept (including FSN).
preferredexcludingfsn - refers to SNOMEDCT description for preferred terms excluding FSN.
synonyms - refers to all description for a concept (excluding FSN).
acceptable- refers to all description for a concept excluding preferred.
all - refers to all description for a concept (both preferred and acceptable).returnLimit- Maximum number of matching terms to be fetched.groupByConcept- boolean value, if true, then method will return set ofCompositeDescriptionwhich will contain one description from one concept.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
CompositeDescriptionmatching the given term/text or Concept ID.
-
search
public java.util.Set<CompositeDescription> search(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, boolean groupByConcept, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean fullConcept, boolean excludeConcept)
-
getSuggestions
public java.util.Set<java.lang.String> getSuggestions(java.lang.String matchTerm, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text in SNOMED CT repository.- Parameters:
matchTerm-Stringterm/text to be searched.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
Stringsuggestions matching the given term/text.
-
getSuggestions
public java.util.Set<java.lang.String> getSuggestions(java.lang.String matchTerm, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns limited best matching suggestions for given term/text in SNOMED CT repository.- Parameters:
matchTerm-Stringterm/text to be searched in SNOMED CT repository.returnLimit- Maximum number of matching terms to be fetched.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
Stringmatching the given term/text.
-
getSuggestions
public java.util.Set<java.lang.String> getSuggestions(java.lang.String matchTerm, EnumState enumState, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for term/text in the SNOMED CT repository based on provided component state (active, inactive, both). by the user.- Parameters:
matchTerm-Stringterm/text to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.returnLimit- Maximum number of matching terms to be fetched.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
Stringmatching the given term/text.
-
getSuggestions
public java.util.Set<java.lang.String> getSuggestions(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.enumSemanticTagList-EnumSemanticTagRefers to the Semantic Tag in which SNOMED CT term/text or concept id will be searched.
If enumSemanticTag is,
all - It will search SNOMED CT term in all the Semantic Tags.
For other possible values please referEnumSemanticTag.
A list ofEnumSemanticTagcan also be provide in which search/suggest is to be perform.returnLimit- Maximum number of matching terms to be fetched.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
Stringmatching the given term/text or Concept ID.
-
getSuggestions
public java.util.Set<java.lang.String> getSuggestions(java.lang.String matchTerm, EnumState enumState, java.util.List<java.lang.String> semanticTagList, EnumAcceptability enumAcceptability, int returnLimit, java.lang.String refsetId, java.util.List<java.lang.String> parentIdList, boolean excludeConcept)Returns most matching suggestions for given term/text or concept id in the SNOMED CT repository based on provided component state, semantic tag, acceptability.- Parameters:
matchTerm-Stringterm/text or Concept ID to be searched in SNOMED CT repository.enumState-EnumStateState of a component.
If enumState is,
active - It will return only active Components.
inactive - It will return only inactive Components.
both - It will return both active and inactive Components.enumSemanticTagList-EnumSemanticTagRefers to the Semantic Tag in which SNOMED CT term/text or concept id will be searched.
If enumSemanticTag is,
all - It will search SNOMED CT term in all the Semantic Tags.
For other possible values please referEnumSemanticTag.
A list ofEnumSemanticTagcan also be provide in which search/suggest is to be perform.enumAcceptability-EnumAcceptabilityRepresents the type of description i.e. whether the search results contains preferred terms or preferred terms other than FSN or only acceptable terms and so on.
If enumAcceptability is,
preferred - refers to all preferred description for a concept (including FSN).
preferredexcludingfsn - refers to SNOMEDCT description for preferred terms excluding FSN.
synonyms - refers to all description for a concept (excluding FSN).
acceptable- refers to all description for a concept excluding preferred.
all - refers to all description for a concept (both preferred and acceptable).returnLimit- Maximum number of matching terms to be fetched.refsetId- Identifier of Refset if search is to be done from a specific Refset and null if search is to be done from whole SNOMED CT Terminology.parentIdList- List of Identifier of Concepts if search is to be done from it's descendants only and null if search is to be done from whole SNOMED CT Terminology.- Returns:
- Set of
Stringmatching the given term/text or Concept ID.
-
getLangRefset
public java.util.List<java.util.List<java.lang.String>> getLangRefset()
This method used for retrieving language refset values from LangRefsetEnum- Returns:
- List of List
Stringcontaining language refset values in it
-
searchSimpleMap
public SimpleMapRefsetResult searchSimpleMap(java.lang.String refsetComponentId)
Searches the simpleMapTarget of refsetComponentId provided .- Parameters:
queryParams-- Returns:
- SimpleMapRefsetResult mapped to the given Refset Component ID.
- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.apache.lucene.queryparser.classic.ParseException
-
searchLOINC
public Identifier searchLOINC(java.lang.String id)
Searches the LOINC / SNOMEDCT code of code provided .- Parameters:
queryParams-- Returns:
- Identifier mapped to the given Refset Component ID.
- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.apache.lucene.queryparser.classic.ParseException
-
searchAlternateIdentifiers
public java.util.List<Identifier> searchAlternateIdentifiers(java.lang.String id, java.lang.String moduleId)
Searches for alternate identifiers of a SNOMED concept.- Parameters:
queryParams-- Returns:
- Identifier mapped to the given Refset Component ID.
- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.apache.lucene.queryparser.classic.ParseException
-
-