rawFindPatientsByHealthcarePartyWithHttpInfo method

Future<Response> rawFindPatientsByHealthcarePartyWithHttpInfo({
  1. String? hcPartyId,
  2. String? sortField,
  3. String? startKey,
  4. String? startDocumentId,
  5. int? limit,
  6. String? sortDirection,
})

List patients for a specific HcParty

Returns a list of patients 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 hcPartyId: Healthcare party id

  • String sortField: Optional value for sorting results by a given field ('name', 'ssin', 'dateOfBirth'). Specifying this deactivates filtering

  • String startKey: The start key for pagination: a JSON representation of an array containing all the necessary components to form the Complex Key's startKey

  • String startDocumentId: A patient document ID

  • int limit: Number of rows

  • String sortDirection: Optional value for providing a sorting direction ('asc', 'desc'). Set to 'asc' by default.

Implementation

Future<Response> rawFindPatientsByHealthcarePartyWithHttpInfo({ String? hcPartyId, String? sortField, String? startKey, String? startDocumentId, int? limit, String? sortDirection, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/patient';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (hcPartyId != null) {
    queryParams.addAll(_queryParams('', 'hcPartyId', hcPartyId));
  }
  if (sortField != null) {
    queryParams.addAll(_queryParams('', 'sortField', sortField));
  }
  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 (sortDirection != null) {
    queryParams.addAll(_queryParams('', 'sortDirection', sortDirection));
  }

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


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