anchor.diff:  			'Destination-Realm' = <<"asia-east1-b.c.sigscale-ocs.internal">>,
   			'Auth-Application-Id' = ?RO_APPLICATION_ID,
   			'Service-Context-Id' = SCI,
  -			'CC-Request-Type' = RequestType,
  +			'CC-Request-Type' = event_type(RequestType),
   			'CC-Request-Number' = RequestNum,
   			'User-Name' = [list_to_binary(get_subscriber(SubscriptionIds))],
   			'Event-Timestamp' = calendar:universal_time(),
   			'Subscription-Id' = format_sub_ids(SubscriptionIds)}.
   
  --spec diameter_reply(RatingDataRef, RequestType, Reply) -> DiameterReply
  +-spec diameter_reply(RatingDataRef, RequestType, NrfReply) -> DiameterReply
   	when
   		RatingDataRef :: string(),
  -		RequestType :: 1..4,
  -		Reply :: map(),
  +		RequestType :: initial | interim | final | event,
  +		NrfReply :: map(),
   		DiameterReply :: #'3gpp_ro_CCA'{}.
   %% @doc Convert a Nrf Resply map() to a #'3gpp_ro_CCA'{}.
   diameter_reply(RatingDataRef, RequestType, #{"invocationSequenceNumber" := RequestNum,
  
positive.code: 					ServiceRating when is_list(ServiceRating) ->
  						UpdatedMap = maps:update("serviceRating", ServiceRating, NrfMap),
  						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};
  					{error, service_not_found} ->
  						InvalidParams = [#{param => "/subscriptionId",
  								reason => "Unknown subscriber identifier"}],
  						Problem = error_response(service_not_found, InvalidParams),
  						{error, 404, Problem};
  					{error, invalid_service_type} ->
  						InvalidParams = [#{param => "/serviceContextId",
  								reason => "Invalid Service Type"}],
  						Problem = error_response(invalid_service_type, InvalidParams),
  						{error, 400, Problem};
  					{error, Reason} ->
  						{error, Reason}
  				end;
  			_ ->
  				Problem = error_response(charging_failed, undefined),
  				{error, 400, Problem}
  		end
  	of
  
negative.code: 			'Origin-Host' = list_to_binary(ohost(DiamterConfig)),
  			'Origin-Realm' = list_to_binary(orealm(DiamterConfig)),
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = event_type(RequestType),
  			'CC-Request-Number' = RequestNum,
  			'Multiple-Services-Credit-Control' = mscc(ServiceRating),
  			'Result-Code' = result_code(ServiceRating)}.
  
  -spec diameter_error(RatingDataRef, RequestType, ResultCode,
  		NrfReply) -> DiameterReply
  	when
  		RatingDataRef :: string(),
  		RequestType :: initial | interim | final | event,
  		ResultCode :: pos_integer(),
  		NrfReply :: map(),
  		DiameterReply :: #'3gpp_ro_CCA'{}.
  %% @doc Build a CCA DIAMETER CCA indicating an operation failure.
  %% @hidden
  diameter_error(RatingDataRef, RequestType, ResultCode,
  		#{"invocationSequenceNumber" := RequestNum}) ->
  	{ok, DiamterConfig} = application:get_env(ocs, diameter),
  	#'3gpp_ro_CCA'{'Session-Id' = RatingDataRef, 'Result-Code' = ResultCode,
  			'Origin-Host' = list_to_binary(ohost(DiamterConfig)),
  			'Origin-Realm' = list_to_binary(orealm(DiamterConfig)),
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = event_type(RequestType),
  			'CC-Request-Number' = RequestNum}.
  
  %% @hidden
  result_code("SUCCESS") ->
  