I need to separate the resources instances in different context on the system.
The context is used to define the operations and business logic on the resource: Search (filter), Insert/Update (Uniques Contraints), etc.
Each context can be seen as the organization responsible for manage the information, where an organization not only is related to the resource but also has ownership of the instance, managing the data (name, address, age, etc) based on context.
Different organizations can have their own representation of a single real person/object.
The Patient resource has an attribute named managingOrganization that can be used to define the organization responsible for the custody of the patient record on the system. How can I add this kind of information to the Practitioner resource for example? Can I extend the resource to have a similar attribute (managingOrganization)?
Can other resources, e.g. Coverage, extend its own managing organization attribute or should I use the context of the patient instance related to the coverage?