filterCodesByWithHttpInfo method

Future<Response> filterCodesByWithHttpInfo({
  1. String? startKey,
  2. String? startDocumentId,
  3. int? limit,
  4. int? skip,
  5. String? sort,
  6. bool? desc,
  7. FilterChain<CodeDto>? filterChainCode,
})

Filter codes

Returns a list of codes along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.

Note: This method returns the HTTP Response.

Parameters:

  • String startKey: The start key for pagination, depends on the filters used

  • String startDocumentId: A patient document ID

  • int limit: Number of rows

  • int skip: Skip rows

  • String sort: Sort key

  • bool desc: Descending

  • FilterChain<CodeDto> filterChainCode:

Implementation

Future<Response> filterCodesByWithHttpInfo({ String? startKey, String? startDocumentId, int? limit, int? skip, String? sort, bool? desc, FilterChain<CodeDto>? filterChainCode, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/code/filter';

  // ignore: prefer_final_locals
  Object? postBody = filterChainCode;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (startKey != null) {
    queryParams.addAll(_queryParams('', 'startKey', startKey));
  }
  if (startDocumentId != null) {
    queryParams.addAll(_queryParams('', 'startDocumentId', startDocumentId));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (skip != null) {
    queryParams.addAll(_queryParams('', 'skip', skip));
  }
  if (sort != null) {
    queryParams.addAll(_queryParams('', 'sort', sort));
  }
  if (desc != null) {
    queryParams.addAll(_queryParams('', 'desc', desc));
  }

  const authNames = <String>[r'basicSchema'];
  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
    authNames,
  );
}