DROP PROCEDURE IF EXISTS public.sp_UpdatePatientAddressFromGAR;

CREATE PROCEDURE public.sp_UpdatePatientAddressFromGAR
(
	"AOGUID" UUID,
	"HouseGUID" UUID,
	"AddressId" UUID
)
    language plpgsql
as
$$
Begin

	update akuz.t_patient_address  
	set 
		AOGUID = Coalesce("AOGUID",AOGUID), 
		HouseGUID = Coalesce("HouseGUID",HouseGUID), 
		FIASUpdateDate = current_date
	where AddressId = "AddressId";

End;
$$;