diff --git a/app/models/provider.rb b/app/models/provider.rb index 54f850b19..d639570a4 100644 --- a/app/models/provider.rb +++ b/app/models/provider.rb @@ -552,6 +552,10 @@ def uid symbol.downcase end + def consortium_uid + consortium_id.downcase + end + def from_salesforce=(value) @from_salesforce = (value.to_s == "true") end diff --git a/app/serializers/provider_serializer.rb b/app/serializers/provider_serializer.rb index 3ca79adca..98b957e7b 100644 --- a/app/serializers/provider_serializer.rb +++ b/app/serializers/provider_serializer.rb @@ -47,6 +47,7 @@ class ProviderSerializer has_many :contacts, record_type: :contacts belongs_to :consortium, record_type: :providers, + id_method_name: :consortium_uid, serializer: ProviderSerializer, if: Proc.new { |provider| provider.consortium_id } has_many :consortium_organizations,