createOrModifyCoding method
Create or update a Coding
When modifying a coding, you must ensure that the rev obtained when getting or creating the coding is present as the rev is used to guarantee that the coding has not been modified by a third party.
Parameters:
- Coding coding (required):
Implementation
@override
Future<Coding?> createOrModifyCoding(Coding coding) async =>
(await (coding.rev?.let((it) => api.baseCodeApi.modifyCode(coding.toCodeDto())) ?? api.baseCodeApi.createCode(coding.toCodeDto())))?.toCoding();