Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: get the term or description #6

Open
tvinke opened this issue Feb 27, 2020 · 1 comment
Open

Feature request: get the term or description #6

tvinke opened this issue Feb 27, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tvinke
Copy link

tvinke commented Feb 27, 2020

Hi! Thank you for a great library, which helps me parse some complex queries.

For my use case I also would like to retrieve any available terms from the expression.

E.g. a random example from the unit tests shows how to get the codes from the concept and the attributes (like 83152002, 405815000, 122456005) but how can I access the terms/descriptions such as "oophorectomy", "procedure device" and "laser device"? I don't see any getter for this on any of the resulting structure.

Example:

    @Test
    public void testExpressionWithAttribute() {
	String scg = "83152002 |oophorectomy|: 405815000|procedure device| = 122456005 |laser device|";
	Expression expression = builder.createQuery(scg);
	...
	assertTrue(expression.getFocusConcepts().contains("83152002"));
	...
	Attribute attribute = expression.getAttributes().get(0);
	assertEquals("405815000", attribute.getAttributeId());
	assertEquals("122456005", attribute.getAttributeValueId());
    }

If this is not yet implemented, I think it would be very valuable to have access to any of these descriptions i.e. for every focus concept and any refinement.

Would it be possible to add this as a new feature?

@kaicode kaicode added enhancement New feature or request good first issue Good for newcomers labels Jul 27, 2020
@kaicode
Copy link
Member

kaicode commented Jul 27, 2020

Hi @tvinke thanks for getting in touch and sorry to not have responded until now.

The term between the pipe characters is just to make these expressions more human readable and is not intended to be parsed, validated to or used in any way by machines. This is why getters for the terms have not been implemented.

Regrettably I've not aware of anyone else who would find this useful so we are not able to invest time developing this enhancement. I've labeled the issue as "good first issue" to encourage anyone in the community to contribute this feature. I hope you can understand my position and good luck in your project.

Kind regards,
Kai Kewley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants