Hello all-

I asked this question a couple of weeks ago on this list, but Mike & I were 
debating it yesterday so I wanted to follow up with a more detailed version of 
the question...

I'm working on a new Provider Management module that we are planning to use to 
manage community health workers.  To do this, I've created a new Provider Role 
domain object that has a many-to-many relationship to RelationshipType as well 
as other Provider Roles:
public class ProviderRole extends BaseOpenmrsMetadata implements Serializable {

    private Integer providerRoleId;

    // the provider/patient relationships this role can support
    private Set<RelationshipType> relationshipTypes;

    // the provider roles this provider role can supervise
    private Set<ProviderRole> superviseeProviderRoles;

etc ...

A Provider Role has many-to-one relationship with Provider, and so the obvious 
solution to implement this would be to create a foreign key mapping table 
between Provider and Provider Role, but I thought it might be worth considering 
storing Provider Role as a Provider Attribute instead... so I asked the list, 
and the general consensus, I believe, was to use Provider Attribute.

I'm second guessing my decision a bit now... are Provider Attributes (and 
Attributes in general) really meant as a way to create a link between two core 
domain objects, or are they only intended for storing more basic information 
like provider health center, provider home town, etc?

Thanks,
Mark





_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to