rawRegisterPatientWithHttpInfo method

Future<Response> rawRegisterPatientWithHttpInfo(
  1. String hcPartyId,
  2. String groupId,
  3. PatientDto patientDto, {
  4. String? token,
  5. bool? useShortToken,
})

Register a patient

Register a new patient into the system

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> rawRegisterPatientWithHttpInfo(String hcPartyId, String groupId, PatientDto patientDto, { String? token, bool? useShortToken, }) async {
  // ignore: prefer_const_declarations
  final path =
      r'/rest/v1/patient/register/forHcp/{hcPartyId}/inGroup/{groupId}'.replaceAll('{hcPartyId}', hcPartyId).replaceAll('{groupId}', groupId);

  // ignore: prefer_final_locals
  Object? postBody = patientDto;

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

  if (token != null) {
    queryParams.addAll(_queryParams('', 'token', token));
  }
  if (useShortToken != null) {
    queryParams.addAll(_queryParams('', 'useShortToken', useShortToken));
  }

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