# Corporate Membership ## Overview HMIS supports two categories of membership: - **Personal Membership** — individual or family schemes where the patient (or family) is the primary member. No company is involved. - **Corporate Membership** — schemes where a company or employer sponsors the membership. Employees (and optionally their dependents) are enrolled under the company's scheme, which carries its own discount and payment configuration. A single patient can be enrolled in **multiple** corporate schemes simultaneously — for example, an employee who is also covered under a spouse's employer scheme. ## How Corporate Schemes Work Corporate membership reuses the existing membership infrastructure: - A **Membership Scheme** becomes corporate simply by linking it to a **Company** (Institution). If the Company field is blank, the scheme is personal. - Each enrolled employee is a **FamilyMember** record under a **Family** that uses the corporate scheme. - Discounts and payment schemes are configured per Membership Scheme — exactly the same as personal membership. Corporate schemes can have different rates from personal ones. --- ## Administrator Guide ### Step 1 — Create a Corporate Membership Scheme 1. Go to **Administration → Manage Pricing → Manage Discount Schemes** tab → **Membership Schemes** (or **Administration → Membership Administration → Manage Discounts** tab → **Membership Schemes**) 2. Click **Add** 3. Enter the scheme **Name** (e.g. "Hemas Staff 2025") 4. Enter the scheme **Code** 5. In the **Company** field, start typing the company/institution name and select it from the autocomplete 6. Optionally set a **Discount Scheme** (Payment Scheme) for this corporate scheme 7. Click **Save** > A scheme with a Company linked is treated as Corporate everywhere in the system. A scheme with no Company is treated as Personal. ### Step 2 — Enrol an Employee 1. Go to **Membership → Add Corporate Member** 2. Search for the patient or register a new one using the patient details panel on the left 3. On the right panel, select the **Corporate Scheme** from the dropdown (only corporate schemes are shown here) 4. Enter the **Membership Card No** if applicable 5. Click **Save & Manage** to save and proceed to manage the membership, or **Save & Clear for New** to enrol the next employee ### Step 3 — Search Corporate Members 1. Go to **Membership → Search Corporate Members** 2. Enter any of: membership card number, phone number, patient name, or NIC 3. Click **Search** 4. The results show only corporate members, with the **Company** and **Scheme** columns displayed 5. Use the action buttons to manage the membership or proceed directly to OPD billing / cashier billing / channelling ### Managing Dependents A corporate family member (e.g. spouse, child) can be added through the **Manage Family** page after the primary member is saved: 1. From the search result, click the **Manage** button (building icon) 2. On the Family Manage page, add dependents with their relationship (Spouse, Child, etc.) --- ## End-User Guide ### Finding a Corporate Patient's Scheme at Billing When creating an OPD bill: 1. Search for the patient as usual 2. If the patient has a corporate membership, use **Search Corporate Members** to find them and click **OPD Billing** or **OPD Billing for Cashier** directly — this automatically applies the corporate payment scheme and discounts ### Checking Which Company a Patient Belongs To 1. Go to **Membership → Search Corporate Members** 2. Search by patient name or phone number 3. The **Company** column shows the employer/sponsor for each enrolled membership --- ## Technical Reference (for developers) - Corporate vs personal distinction: `MembershipScheme.institution != null` → corporate; `null` → personal - `MembershipScheme.isCorporate()` helper method available on the entity - `MembershipSchemeController.getCorporateSchemes()` — JPQL: `institution is not null` - `MembershipSchemeController.getPersonalSchemes()` — JPQL: `institution is null` - `PatientController.searchCorporateFamilyMember()` — searches only `FamilyMember` records where `family.membershipScheme.institution is not null` - New pages: `membership/corporate_membership_new.xhtml`, `membership/corporate_membership_search.xhtml` - No new database columns required — `institution` column already existed on the `Category` table (parent of `MembershipScheme`) - Privilege required: `MemberShipAdd` (enrol), `MemberShipSearch` (search) — same as personal membership