toJsonLd method

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

Serialize SchemaMedicalStudy to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'MedicalStudy',
      'healthCondition':
          convertToJsonLd(healthCondition, [SchemaMedicalCondition]),
      'sponsor': convertToJsonLd(sponsor, [SchemaOrganization, SchemaPerson]),
      'status': convertToJsonLd(
          status, [SchemaEventStatusType, SchemaMedicalStudyStatus, String]),
      'studyLocation':
          convertToJsonLd(studyLocation, [SchemaAdministrativeArea]),
      'studySubject': convertToJsonLd(studySubject, [SchemaMedicalEntity]),
    });