toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaMedicalTest to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'MedicalTest',
      'affectedBy': convertToJsonLd(affectedBy, [SchemaDrug]),
      'normalRange':
          convertToJsonLd(normalRange, [SchemaMedicalEnumeration, String]),
      'signDetected': convertToJsonLd(signDetected, [SchemaMedicalSign]),
      'usedToDiagnose':
          convertToJsonLd(usedToDiagnose, [SchemaMedicalCondition]),
      'usesDevice': convertToJsonLd(usesDevice, [SchemaMedicalDevice]),
    });