Clear record when doc_type was changed

@czue http://manage.dimagi.com/default.asp?140716#785508
see https://github.com/dimagi/pillowtop/ for more information about the confusing pillowtop methods