def perform_create(self, serializer):
    'Sets the patient profile to the logged in user'
    serializer.save(user_profile=self.request.user)
Sets the patient profile to the logged in user
def perform_create(self, serializer):
    
    serializer.save(user_profile=self.request.user)