toJson method
Implementation
Map<String, dynamic> toJson() => {
if (testId != null) 'testId': testId,
if (elementId != null) 'elementId': elementId,
if (observationId != null) 'observationId': observationId,
if (occurrence != null) 'occurrence': occurrence,
if (locator != null) 'locator': locator!.toJson(),
};