Service Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Backend service that manages role tag assignments on relative records, validating tags against the organization's configured label set and persisting the selection. Provides lookup and filtering capabilities so list, detail, and reporting views can surface relatives by their tagged role.

Feature: Relative Role Tagging

relative-role-service

Sources & reasoning

Source line 77 enumerates specific relative role types (foreldre/parents, søsken/siblings, nærmeste omsorgsperson/closest caregiver), indicating the system must distinguish between them. Role tagging is the mechanism to capture this distinction and falls within the Fase 1 Pårørende-database MUST scope.

  • registrering av pĂĄrørende (foreldre, søsken, nærmeste omsorgsperson) som egne kontaktsubjekter
  • PĂĄrørende database | âś“ | - | - | - | âś“ | MUST (Barnekreft) | 1

Responsibilities

  • Validate a submitted role tag against the organization's configured tags
  • Persist the role tag to the relative record
  • Retrieve role tags for relatives in list and detail views
  • Filter and group relatives by role tag for role-aware workflows
  • Reject invalid or unrecognized tag identifiers

Interfaces

assignRoleTag(relativeId, tagId, orgId): RelativeRecord
getRoleTag(relativeId): TagOption
listRelativesByRole(orgId, tagId): RelativeRecord[]
validateTagForOrganization(tagId, orgId): boolean