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

Negative quantities not returned in query parameters with #696

Closed
kwboone opened this Issue Jul 25, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@kwboone
Copy link

kwboone commented Jul 25, 2017

Found in HAPI-FHIR 2.1 in ca.uhn.fhir.rest.param.BaseParamWithPrefix:

String extractPrefixAndReturnRest(String theString) {
	int offset = 0;
	while (true) {
		if (theString.length() == offset || Character.isDigit(theString.charAt(offset))) {
			break;
		}
		offset++;
	}

	String prefix = theString.substring(0, offset);
	myPrefix = ParamPrefixEnum.forValue(prefix);
	if (myPrefix == null) {
		myPrefix = ParamPrefixEnum.forDstu1Value(prefix);
	}

	return theString.substring(offset);
}

This code fails to accept a quantity parameter with a negative value.
test should include || (theString.charAt(offset) == '-')

@jamesagnew

This comment has been minimized.

Copy link
Owner

jamesagnew commented Jul 26, 2017

Hi Keith,

Thanks for the report! I've confirmed this, and will check in the fix you suggest momentarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment