Class FHIRParameters


  • public class FHIRParameters
    extends Object
    This class is used as a container for request parameters associated with a FHIR Client API request.
    • Constructor Detail

      • FHIRParameters

        public FHIRParameters()
    • Method Detail

      • format

        public FHIRParameters format​(String mimeType)
        Convenience method which sets the "_format" query parameter.
        Parameters:
        mimeType - the mimeType to use for the request
        Returns:
        a handle to the FHIRParameters object
      • count

        public FHIRParameters count​(int count)
        Convenience method which sets the "_count" query parameter.
        Parameters:
        count - the count value to use for the request
        Returns:
        a handle to the FHIRParameters object
      • page

        public FHIRParameters page​(int page)
        Convenience method which sets the "_page" query parameter.
        Parameters:
        page - the page number to use for the request
        Returns:
        a handle to the FHIRParameters object
      • since

        public FHIRParameters since​(String since)
        Convenience method which sets the "_since" query parameter.
        Parameters:
        since - a string representing the "since" date value to use for the request
        Returns:
        a handle to the FHIRParameters object
      • clear

        public FHIRParameters clear()
        Clears the set of parameters currently contained in the FHIRParameters object.
        Returns:
        a handle to the FHIRParameters object
      • queryParam

        public FHIRParameters queryParam​(String name,
                                         String value)
        Adds the specified query parameter name and value to 'this'.
        Parameters:
        name - the parameter name
        value - the parameter value
        Returns:
        a handle to the FHIRParameters object
      • searchParam

        public FHIRParameters searchParam​(String name,
                                          FHIRParameters.Modifier modifier,
                                          String... values)
        Adds the specified search parameter (name, modifier, values) to 'this'.
        Parameters:
        name - the parameter name
        modifier - a modifier (e.g. CONTAINS)
        values - one or more values associated with the search parameter
        Returns:
        a handle to the FHIRParameters object
      • searchParam

        public FHIRParameters searchParam​(String name,
                                          ResourceType resourceType,
                                          String... values)
        Adds the specified search parameter (name, resourceType, values) to 'this'.
        Parameters:
        name - the parameter name
        resourceType - a resource type (e.g. Patient) as a modifier
        values - one or more values associated with the search parameter
        Returns:
        a handle to the FHIRParameters object
      • searchParam

        public FHIRParameters searchParam​(String name,
                                          FHIRParameters.ValuePrefix prefix,
                                          String... values)
        Adds the specified search parameter (name, value-prefix, values) to 'this'.
        Parameters:
        name - the parameter name
        prefix - a value prefix (e.g. LE) to be applied to the values
        values - one or more values associated with the search parameter
        Returns:
        a handle to the FHIRParameters object
      • searchParam

        public FHIRParameters searchParam​(String name,
                                          String... values)
        Adds the specified search parameter name and values to 'this'.
        Parameters:
        name - the name of the search parameter
        values - one or more values to be associated with the search parameter
      • getParameterMap

        public final javax.ws.rs.core.MultivaluedMap<String,​String> getParameterMap()
        Returns the collection of parameters that have been added to 'this'.
        Returns:
        a MultivalueMap where the key (query parameter name) maps to a list of string values
      • addMultivaluedParameter

        public void addMultivaluedParameter​(String name,
                                            String value)
        Adds a multi-valued parameter to 'this'.
      • addSinglevaluedParameter

        public void addSinglevaluedParameter​(String name,
                                             String value)
        Adds a single-valued parameter to 'this'.
        Parameters:
        name -
        value -
      • queryString

        public String queryString​(boolean includeSeparator)
        This method returns the parameters contained in 'this' in the form of a query string.
      • queryString

        public String queryString()
      • toString

        public String toString()
        This method returns a string representation of the FHIRParameters object.
        Overrides:
        toString in class Object