projecttacoma/bonnie — pull request #254 by jtferns (2014-04-23 19:03:25+00:00)
Title: Support multiple episodes of care (EoC) for continuous variable (CV) measures

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

#### Notes ####
- OBSERV values are now stored as an array of values (minutes or percentages), and result values are properly read when comparing expectations against results
- the values for OBSERV and result are sorted before comparison
- the number of OBSERV values one can enter in the expected values section is dependent on the value entered for MSRPOPL, which updates the inputs via a blur event
- rake bonnie:db:reset and rake bonnie:test:clean_up were updated for expedited testing
- proposed testing strategy
- rake bonnie:db:reset DB=bonnie-production-eh
- rake bonnie:test:clean_up
- login with bonnie@example.com:bonnie
- create a test patient for CMS55v2 that produces >= 1 MSRPOPL and >= 1 OBSERV results
- last name, first name, dob = 03/06/1937, 10:30 AM
- Encounter: Emergency Department Visit
- start = 04/01/2012, 11:00 AM
- end = 04/01/2012, 12:30 PM
- field values
- Facility Arrival Time = 04/01/2012, 11:00 AM
- Facility Departure Time = 04/01/2012, 12:00 PM
- Encounter: Encounter Inpatient
- start = 04/01/2012, 1:00 PM
- end = 04/04/2012, 2:00 PM
- field values
- Discharge datetime = 04/04/2012, 2:00 PM
- Encounter: Emergency Department Visit
- start = 04/02/2012, 11:00 AM
- end = 04/02/2012, 12:30 PM
- field values
- Facility Arrival Time = 04/02/2012, 11:00 AM
- Facility Departure Time = 04/02/2012, 12:30 PM
- Encounter: Encounter Inpatient
- start = 04/02/2012, 1:00 PM
- end = 04/05/2012, 2:00 PM
- field values
- Discharge datetime = 04/05/2012, 2:00 PM

#### Screenshots ####
- results now show all actuals, even if no OBSERV expectations are present
- ![defaultpatient](https://cloud.githubusercontent.com/assets/456952/2781890/2b3b553e-cb19-11e3-9b30-3c7b14e5af49.png)
- results for test patient following strategy above
- ![default_testpatient](https://cloud.githubusercontent.com/assets/456952/2781891/2b3b715e-cb19-11e3-8c88-0d68b6867c04.png)
- updated expected values section provides multiple OBSERV inputs, with no order necessary
- ![updatedexpectedvalues](https://cloud.githubusercontent.com/assets/456952/2781933/8fc6f71a-cb19-11e3-8634-0fb7b51babc9.png)
- results for test patient with expected values
- ![updatedtestpatientresults](https://cloud.githubusercontent.com/assets/456952/2781892/2b3c0006-cb19-11e3-8c40-342e4a3db773.png)