importSumehrByItemIdWithHttpInfo method

Future<Response> importSumehrByItemIdWithHttpInfo(
  1. String documentId,
  2. String itemId, {
  3. String? documentKey,
  4. bool? dryRun,
  5. String? patientId,
  6. String? language,
  7. Map<String, List<ImportMapping>>? requestBody,
})

Import sumehr into patient(s) using existing document

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> importSumehrByItemIdWithHttpInfo(String documentId, String itemId, { String? documentKey, bool? dryRun, String? patientId, String? language, Map<String, List<ImportMapping>>? requestBody, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/be_kmehr/sumehr/{documentId}/importbyitemid'.replaceAll('{documentId}', documentId);

  // ignore: prefer_final_locals
  Object? postBody = requestBody;

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

    queryParams.addAll(_queryParams('', 'itemId', itemId));
  if (documentKey != null) {
    queryParams.addAll(_queryParams('', 'documentKey', documentKey));
  }
  if (dryRun != null) {
    queryParams.addAll(_queryParams('', 'dryRun', dryRun));
  }
  if (patientId != null) {
    queryParams.addAll(_queryParams('', 'patientId', patientId));
  }
  if (language != null) {
    queryParams.addAll(_queryParams('', 'language', language));
  }

  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,
  );
}