toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = id;
  json[r'identifiers'] = identifiers;
  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;
  }
  if (healthElementId != null) {
    json[r'healthElementId'] = healthElementId;
  }
  if (valueDate != null) {
    json[r'valueDate'] = valueDate;
  }
  if (openingDate != null) {
    json[r'openingDate'] = openingDate;
  }
  if (closingDate != null) {
    json[r'closingDate'] = closingDate;
  }
  if (descr != null) {
    json[r'descr'] = descr;
  }
  if (note != null) {
    json[r'note'] = note;
  }
  json[r'relevant'] = relevant;
  if (idOpeningContact != null) {
    json[r'idOpeningContact'] = idOpeningContact;
  }
  if (idClosingContact != null) {
    json[r'idClosingContact'] = idClosingContact;
  }
  if (idService != null) {
    json[r'idService'] = idService;
  }
  json[r'status'] = status;
  if (laterality != null) {
    json[r'laterality'] = laterality;
  }
  json[r'plansOfAction'] = plansOfAction;
  json[r'episodes'] = episodes;
  json[r'careTeam'] = careTeam;
  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;
}