This document contains general guidelines for using the group membership data types. It does not cover all the information that is stored in the type – see the GroupMembership and GroupMembershipActivity documentation for more information.
The group membership types are used as a communication mechanism between an organization (such as an employer) who subsidizes membership in a specific program (such as weight-loss, fitness, etc.) and a provider of services (health club, nutritionist, etc.)
An individual’s membership in a group is recorded by a GroupMembership instance. The organization creates a GroupMembershipType instance, recording a series of group names and values. The organization can also record a data when the membership expires.
The organization then writes the record the individual’s record.
A service provider can then retrieve the group membership instances from a user’s record, and see if any of them are the one that the organization and service provider agreed on. If such a record is found, the service provider then knows the user is a member of the group.
The GroupMembershipActivity type is used to provide information back to the sponsoring organization. When a user authorizes an application that has rights to create GroupMembershipActivity instances, the HealthVault platform will write a special instance of the GroupMembershipActivity to the user’s record, and set the Activity property to “RecordAuthorizedForApplication”. The application may write additional instances of GroupMembershipActivity as desired.
To make sure that the list of group memberships are current, they are fetched by calling the GetValidGroupMemberships() method. This ensures that the sponsoring organization still has access to the user’s record.
An employer offers a weight-loss program that provides a series of consultations with a nutritionist.