The way I do it is to prioritize the things that need to be done and work on the most important first. Then if you have time, you can work on less important things. E.g., if you need to create a form that takes input for a patient, make sure you do the essentials first, e.g.:
- database table/tables for all critical data
- business logic code for validation/work flow
- user interface with fields for all critical data
Make those things work first, from start to end, before adding anything "shiny". Don't worry about making the patient lookup use AJAX. Don't worry about making fancy validation graphics for the UI. Don't worry about making sure your javascript has as small a footprint as possible. Just make sure your code does what it is supposed to.
Once it is all working, then you can prioritize the rest. e.g.:
- Make sure the UI has graphics/css/colors of the rest of the app
- make sure database table(s) will perform properly with a large dataset (create stored procedures/indexes)
- add the user-friendly AJAX lookup for existing patients
It takes discipline to force yourself to not get off track, but you will get better with practice.
People think focus means saying yes to the thing you’ve got to focus on. But that’s not what it means at all. It means saying no to the hundred other good ideas there are. You have to pick carefully. ~ Steve Jobs