Can we use episodes of care to make data captured in a program enrolment specific?

@nsaranya

If I’m understanding the use case correct, I had assumed that you’d be able to solve it (or, part of it) just by using Program Enrollments and using the start and end dates of program enrollment to limit queries for data and determine which program enrollment a particular visit/encounter belongs to.

What are some reasons you want to have an explicit link between the program/episode and the visits/encounters in it (via the new db tables that will come with episodes of care), versus just having an implied link (because it falls between the program enrollment and end dates)?

(Also, Shruthi brought this up on the design call today; I think that Episodes of Care are going to have a significant impact across the API, so I think it will be a stretch to implement these in the 1.12.x branch, as opposed to the master branch, but let’s talk about this.)