@heudia/referral-action-center
v0.1.0
Published
Referral Management Action Center (RMAC) — focused MFA package for the AMC Insights referral table view with i18n (English + Spanish) and the broader auth role taxonomy.
Maintainers
Readme
@heudia/referral-action-center
Referral Management Action Center (RMAC) — a focused MFA package for AMC Insights' referral table view. Handles received + issued referrals with State / Status filters, search, lock revocation, i18n (English + Spanish), and the broader auth role taxonomy used in Insights.
Distinct from @heudia/referral-management, which combines dashboards and analytics. This package leverages widgets and services from there but ships as a stand-alone bundle so Insights can integrate just the RMAC surface.
Scope
Single primary element: <heudia-rmac>. Mounted by the Insights host inside Care Plan; takes service injection for auth, referrals, and locks.
| Feature | Source |
| --- | --- |
| Welcome banner | content/{en,es}.json#rmac.welcome |
| Search + Revoke toolbar | <heudia-rmac> top section |
| Received view with State filter (Received | Active | Completed | Closed | Expired | All) | <heudia-rmac> |
| Issued view → Referral History | <heudia-rmac> (tab) |
| Table columns: Action, Print, Doc REF ID, State, Status, Date Received, Q-Days, Client Name, Email, Phone, Zipcode, Referral POC, Referred From, Progress R/Y/G | <heudia-rmac> |
State / Status model
The RMAC vocabulary differs from the underlying ReferralStatus (which is granular). models/state.ts exposes the mapping:
| ReferralStatus | RmacState | RmacStatus (within Active) |
| --- | --- | --- |
| initial | Received | – |
| review | Active | Review |
| contact | pending-client | pending-org | scheduled | Active | Contact |
| closed-with-contact | Completed | Complete |
| closed-without-contact | Closed | Close |
| expired | Expired | – |
Progress thresholds (default)
models/progress.ts#DEFAULT_PROGRESS_THRESHOLDS:
| Q-Days | Progress | | --- | --- | | ≤ 3 | green | | 4 – 7 | yellow | | > 7 | red |
Override per-mount via an attribute / property on the host element.
Auth roles
Broader than @heudia/referral-management's network-admin \| org-admin \| org-user:
AMC_SUPER_ADMIN
ORG_ADMIN
ORG_REF_ADMIN
ORG_CARE_PROFESSIONAL
COMMUNITY_USER
GUEST_USER
INVITATION_USER → COMMUNITY_USER | REFERRED_USER | CAMPAIGN_USERIRmacAuthService provides the role-rich claim shape, plus invitation flows.
i18n
i18next + JSON resource files at content/en.json and content/es.json. Auto-detects device locale via i18next-browser-languagedetector; defaults to English when the detected locale isn't Spanish.
import { initI18n } from '@heudia/referral-action-center/i18n';
await initI18n(); // call once at host-app startupComponents subscribe via the I18nController Lit reactive controller and re-render automatically on language change.
Reference
docs/referral/management/insights-referral-integration.md— primary spec for the RMAC + Insights integrationdocs/referral/management/manage-referrals.md— table/column referencedocs/referral/referral-management-adjustments.md— auth role taxonomy + stand-alone package notes
