toCodeDto method
CodeDto
toCodeDto()
Implementation
CodeDto toCodeDto() => CodeDto(
id: this.id?.also((it) {
if (RegExp(r"/^[a-zA-Z0-9]*\|[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-\b[0-9a-fA-F]{12}\|[0-9]*/g").hasMatch(it)) {
throw FormatException("Invalid id, id must be a valid TYPE|CODE|VERSION");
}
}) ??
uuid.v4(options: {'rng': UuidUtil.cryptoRNG}),
qualifiedLinks: this.qualifiedLinks,
searchTerms: this.searchTerms,
rev: this.rev,
type: this.type,
code: this.code,
version: this.version,
label: this.description,
);