rawRegisterPatientWithHttpInfo method
Future<Response>
rawRegisterPatientWithHttpInfo(
- String hcPartyId,
- String groupId,
- PatientDto patientDto, {
- String? token,
- bool? useShortToken,
Register a patient
Register a new patient into the system
Note: This method returns the HTTP Response
.
Parameters:
-
String hcPartyId (required):
-
String groupId (required):
-
PatientDto patientDto (required):
-
String token:
-
bool useShortToken:
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,
);
}