projecttacoma/bonnie — pull request #314 by jtferns (2014-06-16 19:58:15+00:00)
Title: Use reasonable default date for medication fulfillments

### Story ###
- https://www.pivotaltracker.com/story/show/72793588

### Notes ###
- fixed issue with non-UTC moment usage in serialize() view method
- added default date method for populating fulfillment dispense_date and dispense_time based on the following logic
- if the patient data criteria has a start_date
- if the patient data criteria has at least one fulfillment
- if the patient data criteria has both dose_value and frequency_value
- then compute the number of days given the dose_value, frequency_value, quantity_dispensed_value, and fulfillment dispense_datetime and use that as the offset
- else set the offset to 15 minutes after the latest fulfillment dispense_date
- else set the offset to 15 minutes after the start_date