Optimize tasks order related to smart-on-fhir server