FHIR Chat · TokenParam for boolean? · hapi

Stream: hapi

Topic: TokenParam for boolean?


view this post on Zulip Emre Avsar (Nov 10 2017 at 14:31):

hi there, according to docs search params of type boolean should be wrapped in TokenParam objects. https://www.hl7.org/fhir/search.html#token

But hapi does not guarantee anything (for example setting the system implicit to http://hl7.org/fhir/special-values) or does not validate the value. I could do this:

// in my resource provider
@Search
public Patient search(@OptionalParam(name='isActive') final TokenParam isActive) {
  boolean isActiveValue = Boolean.parseBoolean(isActive.getValue());
}

And post something like: myurl/fhir/Patient?isActive=helloworld

view this post on Zulip Emre Avsar (Nov 10 2017 at 14:32):

Am I misusing the TokenParam class?


Last updated: Apr 12 2022 at 19:14 UTC