mergePatients method

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

Implementation

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