createOrModifyMedicalDevice method
Create or update a MedicalDevice
When modifying a device, you must ensure that the rev obtained when getting or creating the device is present as the rev is used to guarantee that the device has not been modified by a third party.
Parameters:
MedicalDevice
medicalDevice (required):
Implementation
@override
Future<MedicalDevice?> createOrModifyMedicalDevice(MedicalDevice medicalDevice) async {
return (await createOrModifyMedicalDevices([medicalDevice].toList()))?.single
?? (throw new StateError("Could not create medical device"));
}