patch document fields