Class EverythingOperation
- java.lang.Object
-
- com.ibm.fhir.server.operation.spi.AbstractOperation
-
- com.ibm.fhir.operation.everything.EverythingOperation
-
- All Implemented Interfaces:
FHIROperation
public class EverythingOperation extends AbstractOperation
This class implements the $everything operation which is used to return all the information related to one or more patients described in the resource or context on which this operation is invoked.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DATE_QUERY_PARAMETER
The "date" query parameter used in the underlying search operation.protected static String
END_QUERY_PARAMETER
The query parameter to indicate a stop date for the $everything operationprotected static String
LAST_UPDATED_QUERY_PARAMETER
The "_lastUpdated" query parameter used in the underlying search operation.protected static String
SINCE_QUERY_PARAMETER
The query parameter to only return resources last update since a date for the $everything operationprotected static String
START_QUERY_PARAMETER
The query parameter to indicate a start date for the $everything operationprotected static String
STARTING_FROM
The prefix used to indicate the start date for the $everything resourcesprotected static String
UP_UNTIL
The prefix used to indicate the end date for the $everything resources-
Fields inherited from class com.ibm.fhir.server.operation.spi.AbstractOperation
definition
-
-
Constructor Summary
Constructors Constructor Description EverythingOperation()
Initialize the operation and load the sub-resources that will be retrieved.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationDefinition
buildOperationDefinition()
protected Parameters
doInvoke(FHIROperationContext operationContext, Class<? extends Resource> resourceType, String logicalId, String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper)
This is the method that concrete subclasses must implement to perform the operation logic.protected List<String>
getOverridenIncludedResourceTypes(Parameters parameters)
protected javax.ws.rs.core.MultivaluedMap<String,String>
parseQueryParameters(Parameters parameters)
Parse the parameters and turn them into aMultivaluedMap
to pass to the search service-
Methods inherited from class com.ibm.fhir.server.operation.spi.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, countParameters, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters
-
-
-
-
Field Detail
-
STARTING_FROM
protected static final String STARTING_FROM
The prefix used to indicate the start date for the $everything resources
-
UP_UNTIL
protected static final String UP_UNTIL
The prefix used to indicate the end date for the $everything resources
-
DATE_QUERY_PARAMETER
protected static final String DATE_QUERY_PARAMETER
The "date" query parameter used in the underlying search operation.- See Also:
- Constant Field Values
-
LAST_UPDATED_QUERY_PARAMETER
protected static final String LAST_UPDATED_QUERY_PARAMETER
The "_lastUpdated" query parameter used in the underlying search operation.- See Also:
- Constant Field Values
-
START_QUERY_PARAMETER
protected static final String START_QUERY_PARAMETER
The query parameter to indicate a start date for the $everything operation- See Also:
- Constant Field Values
-
END_QUERY_PARAMETER
protected static final String END_QUERY_PARAMETER
The query parameter to indicate a stop date for the $everything operation- See Also:
- Constant Field Values
-
SINCE_QUERY_PARAMETER
protected static final String SINCE_QUERY_PARAMETER
The query parameter to only return resources last update since a date for the $everything operation- See Also:
- Constant Field Values
-
-
Method Detail
-
buildOperationDefinition
protected OperationDefinition buildOperationDefinition()
- Specified by:
buildOperationDefinition
in classAbstractOperation
-
doInvoke
protected Parameters doInvoke(FHIROperationContext operationContext, Class<? extends Resource> resourceType, String logicalId, String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper) throws FHIROperationException
Description copied from class:AbstractOperation
This is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
doInvoke
in classAbstractOperation
- Returns:
- The Parameters object to return or null if there is no response Parameters object to return
- Throws:
FHIROperationException
-
parseQueryParameters
protected javax.ws.rs.core.MultivaluedMap<String,String> parseQueryParameters(Parameters parameters)
Parse the parameters and turn them into aMultivaluedMap
to pass to the search service- Parameters:
parameters
- the operation parameters- Returns:
- the
MultivaluedMap
for the search service built from the parameters
-
getOverridenIncludedResourceTypes
protected List<String> getOverridenIncludedResourceTypes(Parameters parameters) throws FHIRSearchException
- Parameters:
parameters
- theParameters
object- Returns:
- the list of patient subresources that will be included in the $everything operation, as provided by the user
- Throws:
FHIRSearchException
-
-