createPatient method

Future<DecryptedPatient> createPatient(
  1. String sdkId,
  2. DecryptedPatient patient
)

Implementation

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