@@ -18,16 +18,28 @@ public function getEventType(): string
1818 }
1919
2020 public function getPublishableMessage (): array
21- {
22- return [
23- 'expert_panel ' => [
24- 'id ' => $ this ->group ->uuid ,
25- 'name ' => $ this ->group ->displayName ,
26- 'type ' => $ this ->group ->fullType ->name ,
27- 'affiliation_id ' => $ this ->group ->expertPanel ->affiliation_id
28- ],
29- ];
30- }
21+ {
22+ return [
23+ 'expert_panel ' => array_merge ([
24+ 'id ' => $ this ->group ->uuid ,
25+ 'long_name ' => $ this ->group ->name ,
26+ 'short_name ' => $ this ->group ->expertPanel ->short_base_name ,
27+ 'status ' => optional ($ this ->group ->groupStatus )->name , // Retrieve the status name
28+ 'group updated date ' => $ this ->group ->updated_at ,
29+ 'parent_group ' => optional ($ this ->group ->parentGroup )->name ,
30+ 'type ' => $ this ->group ->fullType ->name ,
31+ 'affiliation_id ' => $ this ->group ->expertPanel ->affiliation_id ,
32+ 'scope description ' => $ this ->group ->expertPanel ->scope_description ,
33+ ],
34+ // Conditionally add vcep fields below if type is 'vcep'
35+ $ this ->group ->fullType ->name === 'vcep ' ? ['clinvar_id ' => null ] : [],
36+ $ this ->group ->fullType ->name === 'vcep ' ? ['clinvar_url ' => null ] : [],
37+ $ this ->group ->fullType ->name === 'vcep ' ? ['cspec_url ' => $ this ->group ->expertPanel ->affiliation_id ] : [],
38+ $ this ->group ->fullType ->name === 'vcep ' ? ['vspec_web_address ' => null ] : [],
39+ )
40+ ];
41+ }
42+
3143
3244 public function mapGeneForMessage ($ gene ): array
3345 {
0 commit comments