[966896] Refactor getDocument