toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = id;
  if (rev != null) {
    json[r'rev'] = rev;
  }
  if (created != null) {
    json[r'created'] = created;
  }
  if (modified != null) {
    json[r'modified'] = modified;
  }
  if (author != null) {
    json[r'author'] = author;
  }
  if (responsible != null) {
    json[r'responsible'] = responsible;
  }
  if (medicalLocationId != null) {
    json[r'medicalLocationId'] = medicalLocationId;
  }
  json[r'tags'] = tags.toList();
  json[r'codes'] = codes.toList();
  if (endOfLife != null) {
    json[r'endOfLife'] = endOfLife;
  }
  if (deletionDate != null) {
    json[r'deletionDate'] = deletionDate;
  }
  json[r'title'] = title;
  if (calendarItemTypeId != null) {
    json[r'calendarItemTypeId'] = calendarItemTypeId;
  }
  if (masterCalendarItemId != null) {
    json[r'masterCalendarItemId'] = masterCalendarItemId;
  }
  if (patientId != null) {
    json[r'patientId'] = patientId;
  }
  if (important != null) {
    json[r'important'] = important;
  }
  if (homeVisit != null) {
    json[r'homeVisit'] = homeVisit;
  }
  if (phoneNumber != null) {
    json[r'phoneNumber'] = phoneNumber;
  }
  if (placeId != null) {
    json[r'placeId'] = placeId;
  }
  if (address != null) {
    json[r'address'] = address;
  }
  if (addressText != null) {
    json[r'addressText'] = addressText;
  }
  if (startTime != null) {
    json[r'startTime'] = startTime;
  }
  if (endTime != null) {
    json[r'endTime'] = endTime;
  }
  if (confirmationTime != null) {
    json[r'confirmationTime'] = confirmationTime;
  }
  if (confirmationId != null) {
    json[r'confirmationId'] = confirmationId;
  }
  if (duration != null) {
    json[r'duration'] = duration;
  }
  if (allDay != null) {
    json[r'allDay'] = allDay;
  }
  if (details != null) {
    json[r'details'] = details;
  }
  if (wasMigrated != null) {
    json[r'wasMigrated'] = wasMigrated;
  }
  if (agendaId != null) {
    json[r'agendaId'] = agendaId;
  }
  if (recurrenceId != null) {
    json[r'recurrenceId'] = recurrenceId;
  }
  json[r'meetingTags'] = meetingTags.toList();
  if (flowItem != null) {
    json[r'flowItem'] = flowItem;
  }
  json[r'secretForeignKeys'] = secretForeignKeys.toList();
  json[r'cryptedForeignKeys'] = cryptedForeignKeys.map((k, v) => MapEntry(k, v.toList()));
  json[r'delegations'] = delegations.map((k, v) => MapEntry(k, v.toList()));
  json[r'encryptionKeys'] = encryptionKeys.map((k, v) => MapEntry(k, v.toList()));
  if (encryptedSelf != null) {
    json[r'encryptedSelf'] = encryptedSelf;
  }
  return json;
}