Replace legacy transaction and document functions.

Replace legacy transaction and document functions by fhir.js ones.