mergePatients method

Future<EncryptedPatient> mergePatients(
  1. String sdkId,
  2. Patient from,
  3. EncryptedPatient mergedInto
)

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