mergePatients method
Implementation
Future<EncryptedPatient> mergePatients(String sdkId, Patient from, EncryptedPatient mergedInto) async {
final res = await _methodChannel.invokeMethod<String>(
'PatientApi.encrypted.mergePatients',
{
"sdkId": sdkId,
"from": jsonEncode(Patient.encode(from)),
"mergedInto": jsonEncode(EncryptedPatient.encode(mergedInto)),
}
);
if (res == null) throw AssertionError("received null result from platform method mergePatients");
final parsedResJson = jsonDecode(res);
return EncryptedPatient.fromJSON(parsedResJson);
}