anchor.diff:  %%  internal functions
   %%----------------------------------------------------------------------
   
  --spec log_request(RatingDataRef, RequestType, NrfRequest) -> DiameterRequest
  +-spec diameter_request(RatingDataRef, RequestType, NrfRequest) -> DiameterRequest
   	when
   		RatingDataRef :: string(),
   		RequestType :: 1..4,
   		NrfRequest :: map(),
   		DiameterRequest :: #'3gpp_ro_CCR'{}.
   %% @doc Convert a NrfRequest map() to a #'3gpp_ro_CCR'{}.
  -log_request(RatingDataRef, RequestType, #{"invocationSequenceNumber" := RequestNum,
  +diameter_request(RatingDataRef, RequestType, #{"invocationSequenceNumber" := RequestNum,
   		"serviceRating" := [#{"serviceContextId" := SCI} | _],
   		"subscriptionId" := SubscriptionIds}) ->
   	{ok, DiamterConfig} = application:get_env(ocs, diameter),
  
positive.code: 			{ok, Headers, ReponseBody};
  		{error, StatusCode, Problem1} ->
  			{error, StatusCode, Problem1};
  		{error, _Reason} ->
  			{error, 500}
  	catch
  		_:_Reason ->
  			{error, 500}
  	end.
  	
  
negative.code: 						UpdatedMap = maps:update("serviceRating", ServiceRating, NrfMap),
  						ok = add_rating_ref(RatingDataRef, UpdatedMap),
  						NrfResponse = nrf(UpdatedMap),
  						{NrfResponse, diameter_request(RatingDataRef, 1, NrfMap),
  								diameter_reply(RatingDataRef, 1, UpdatedMap)};
  					{error, out_of_credit} ->
  						Problem = error_response(out_of_credit, undefined),
  						{error, 403, Problem};
  