anchor.diff:  %% @hidden
   post_request1({MSISDN, IMSI}, SvcContextId, TimeStamp, ServiceType,
   		SessionId, MSCC, Location, Path) ->
  -erlang:display({?MODULE, ?LINE, Path}),
  -erlang:display({?MODULE, ?LINE, MSCC}),
   	{ok, Profile} = application:get_env(ocs, nrf_profile),
   	TS = erlang:system_time(?MILLISECOND),
   	InvocationTimeStamp = ocs_log:iso8601(TS),
  
positive.code: 	Acc1 = Acc#'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Rating-Group' = [RG]},
  	mscc1(T, ResultCode, Acc1);
  mscc1([{"grantedUnit", {_, [{UT, GSUTotal}]}} | T], ResultCode, Acc)
  		when GSUTotal > 0 ->
  	GSU = case UT of
  		"time" ->
  			#'3gpp_ro_Granted-Service-Unit'{'CC-Time' = [GSUTotal]};
  		"totalVolume" ->
  			#'3gpp_ro_Granted-Service-Unit'{'CC-Total-Octets' = [GSUTotal]};
  		"uplinkVolume" ->
  			#'3gpp_ro_Granted-Service-Unit'{'CC-Input-Octets' = [GSUTotal]};
  		"downlinkVolume" ->
  			#'3gpp_ro_Granted-Service-Unit'{'CC-Output-Octets' = [GSUTotal]};
  		"serviceSpecificUnit" ->
  			#'3gpp_ro_Granted-Service-Unit'{'CC-Service-Specific-Units' = [GSUTotal]}
  	end,
  	Acc1 = Acc#'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Granted-Service-Unit' = [GSU]},
  	mscc1(T, ResultCode, Acc1);
  mscc1([{"consumedUnit", {_, [{UT, USUTotal}]}} | T], ResultCode, Acc)
  		when USUTotal> 0 ->
  	USU = case UT of
  		"time" ->
  			#'3gpp_ro_Used-Service-Unit'{'CC-Time' = [USUTotal]};
  		"totalVolume" ->
  			#'3gpp_ro_Used-Service-Unit'{'CC-Total-Octets' = [USUTotal]};
  		"uplinkVolume" ->
  			#'3gpp_ro_Used-Service-Unit'{'CC-Input-Octets' = [USUTotal]};
  		"downlinkVolume" ->
  			#'3gpp_ro_Used-Service-Unit'{'CC-Output-Octets' = [USUTotal]};
  		"serviceSpecificUnit" ->
  			#'3gpp_ro_Used-Service-Unit'{'CC-Service-Specific-Units' = [USUTotal]}
  	end,
  	Acc1 = Acc#'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Used-Service-Unit' = [USU]},
  	mscc1(T, ResultCode, Acc1);
  
negative.code: 	service_rating1(MSCC, SCID, ServiceInformation, []).
  %% @hidden
  service_rating1([#'3gpp_ro_Multiple-Services-Credit-Control'{
  		'Requested-Service-Unit' = RSU, 'Used-Service-Unit' = USU,
  		'Service-Identifier' = SI, 'Rating-Group' = RG} = _MSCC | T], SCID, SInfo, Acc) ->
  	SI1 = case SI of 
  		[] ->
  			[];
  		[N1] ->
  			{"serviceId", N1}
  		end,
  	RG1 = case RG of
  		[] ->
  			[];
  		[N2] ->
  			{"ratingGroup", N2}
  	end,
  	ReservedUnit1 = case RSU of 
  		[#'3gpp_ro_Requested-Service-Unit'{'CC-Time' = [CCTime1]}]
  				when CCTime1 > 0->
  			[{"time", CCTime1}];
  		_ ->
  			[]
  	end,
  	ReservedUnit2 = case RSU of 
  		[#'3gpp_ro_Requested-Service-Unit'{'CC-Output-Octets' = [CCOutputOctets1]}]
  				when CCOutputOctets1 > 0 ->
  			[{"downlinkVolume", CCOutputOctets1} | ReservedUnit1];
  		_ ->
  			ReservedUnit1
  	end,
  	ReservedUnit3 = case RSU of 
  		[#'3gpp_ro_Requested-Service-Unit'{'CC-Input-Octets' = [CCInputOctets1]}]
  				when CCInputOctets1 > 0 ->
  			[{"uplinkVolume", CCInputOctets1} | ReservedUnit2];
  		_ ->
  			ReservedUnit2
  	end,
  	ReservedUnit4 = case RSU of 
  		[#'3gpp_ro_Requested-Service-Unit'{'CC-Total-Octets' = [CCTotalOctets1]}]
  				when CCTotalOctets1 > 0 ->
  			[{"totalVolume", CCTotalOctets1} | ReservedUnit3];
  		_ ->
  			ReservedUnit3
  	end,
  	ReservedUnit5 = case RSU of 
  		[#'3gpp_ro_Requested-Service-Unit'{'CC-Service-Specific-Units' = [CCSpecUnits1]}]
  				when CCSpecUnits1 > 0 ->
  			[{"serviceSpecificUnit", CCSpecUnits1} | ReservedUnit4];
  		_ ->
  			ReservedUnit4
  	end,
  	Reserved = case ReservedUnit5 of
  		[] ->
  			[];
  		_ ->
  			Units1 = {"requestedUnit", {struct, ReservedUnit4}},
  			{struct, [SCID, SInfo, SI1, RG1, Units1, {"requestSubType", "RESERVE"}]}
  	end,
  	ConsumedUnit1 = case USU of 
  		[#'3gpp_ro_Used-Service-Unit'{'CC-Time' = [CCTime2]}]
  				when CCTime2 > 0->
  			[{"time", CCTime2}];
  		_ ->
  			[]
  	end,
  	ConsumedUnit2 = case USU of 
  		[#'3gpp_ro_Used-Service-Unit'{'CC-Output-Octets' = [CCOutputOctets2]}]
  				when CCOutputOctets2 > 0 ->
  			[{"downlinkVolume", CCOutputOctets2} | ConsumedUnit1];
  		_ ->
  			ConsumedUnit1
  	end,
  	ConsumedUnit3 = case USU of 
  		[#'3gpp_ro_Used-Service-Unit'{'CC-Input-Octets' = [CCInputOctets2]}]
  				when CCInputOctets2 > 0 ->
  			[{"uplinkVolume", CCInputOctets2} | ConsumedUnit2];
  		_ ->
  			ConsumedUnit2
  	end,
  	ConsumedUnit4 = case USU of 
  		[#'3gpp_ro_Used-Service-Unit'{'CC-Total-Octets' = [CCTotalOctets2]}]
  				when CCTotalOctets2 > 0 ->
  			[{"totalVolume", CCTotalOctets2} | ConsumedUnit3];
  		_ ->
  			ConsumedUnit3
  	end,
  	ConsumedUnit5 = case USU of 
  		[#'3gpp_ro_Used-Service-Unit'{'CC-Service-Specific-Units' = [CCSpecUnits2]}]
  				when CCSpecUnits2 > 0 ->
  			[{"serviceSpecificUnit", CCSpecUnits2} | ConsumedUnit4];
  		_ ->
  			ConsumedUnit4
  	end,
  	Consumed = case ConsumedUnit5 of
  		[] ->
  			[];
  		_ ->
  			Units2 = {"consumedUnit", {struct, ConsumedUnit5}},
  			{struct, [SCID, SInfo, SI1, RG1, Units2, {"requestSubType", "DEBIT"}]}
  	end,
  	service_rating1(T, SCID, SInfo, lists:flatten([Reserved, Consumed | Acc]));
  service_rating1([], _SCID, _SI, Acc) ->
  	Acc.
  
  