toServiceDto method

DecryptedServiceDto toServiceDto(
  1. String? batchId
)

Implementation

DecryptedServiceDto toServiceDto(String? batchId) => DecryptedServiceDto(
  id: this.id?.also((it) {
        if (!Uuid.isValidUUID(fromString: it)) {
          throw FormatException("Invalid id, id must be a valid UUID");
        }
      }) ??
      uuid.v4(options: {'rng': UuidUtil.cryptoRNG}),
  identifier: this.identifiers.map((it) => it.toIdentifierDto()).toList(),
  content: this.content.map((k, v) => MapEntry(k, v.toContentDto())),
  qualifiedLinks: this.qualifiedLinks,
  codes: this.codes.map((it) => it.toCodeStubDto()).toSet(),
  tags: this.labels.map((it) => it.toCodeStubDto()).toSet(),
  transactionId: this.transactionId,
  contactId: this.batchId,
  healthElementsIds: this.healthcareElementsIds,
  formIds: this.canvasesIds,
  index: this.index,
  valueDate: this.valueDate,
  openingDate: this.openingDate,
  closingDate: this.closingDate,
  created: this.created,
  modified: this.modified,
  endOfLife: this.endOfLife,
  author: this.author,
  responsible: this.responsible,
  comment: this.comment);