NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

Please be advised that NCI Wiki will be undergoing maintenance Monday, July 22nd between 1700 ET and 1800 ET and will be unavailable during this period.
Please ensure all work is saved before said time.

If you have any questions or concerns, please contact the CBIIT Atlassian Management Team.

			//Instantiate the search extension
         	LexBIGService lbsvc = LexBIGServiceImpl.defaultInstance();
         	SourceAssertedValueSetSearchExtensionImpl assertedVSsvc = null;
       		try {
        	assertedVSsvc = (SourceAssertedValueSetSearchExtensionImpl) lbsvc
                   .getGenericExtension("AssertedValueSetSearchExtension");
    		} catch (LBException e) {
        	e.printStackTrace();
    		}
			//Search for results based on an exact match of the unique identifier of the value set member
	        ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("C48323", null, null, MatchAlgorithm.CODE_EXACT,
                false, false);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}
			//Search for results based on an exact match of the preferred text designation of the value set member
	        ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("Black", null, null,
                MatchAlgorithm.PRESENTATION_EXACT, false, false);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}

            //Search for results based on an containing match of the preferred text designation of the value set member
            ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("Blinding", null, null,
                MatchAlgorithm.PRESENTATION_CONTAINS, false, false);
            while(itr.hasNext()){
                ResolvedConceptReference ref = itr.next();
                System.out.println("description: " + ref.getEntityDescription().getContent()):
            }

			//Search for results based on an lucene query parser match of the preferred text designation of the value set member
            ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("BlindingWhite", null, null,
                MatchAlgorithm.LUCENE, false, false);
            while(itr.hasNext()){
                ResolvedConceptReference ref = itr.next();
                System.out.println("description: " + ref.getEntityDescription().getContent()):
            }

		    //Search for results based on an exact match of some property of the value set member
			//Also, restrict the search to a given value set designation
			CodingSchemeReference csRef = new CodingSchemeReference();
        	csRef.setCodingScheme("http://evs.nci.nih.gov/valueset/FDA/C54453");
        	csRef.setVersionOrTag(Constructors.createCodingSchemeVersionOrTagFromVersion("0.1.5.1"));
        	ResolvedConceptReferencesIterator itr = assertedVSsvc.search("Black", csRef,  MatchAlgorithm.PROPERTY_EXACT);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}
  • No labels