Skip to content

FR health insurance affiliation

  • This directory is a work in progress
  • Most of the code is currently dry-run and compared to the current stack, but some parts are already used in production
  • Please ping @affiliation_eng_oncall for any questions you may have

Overview

The general architecture of the user lifecycle is detailed here ⧉.

Key points are: - Instructions are the entrypoints to use the User Lifecycle - There's one Instruction per business action - Instructions instantiate DomainModels that encapsulate the business logic and call their methods - TODO: describe the domain model types - DomainModels publish Events to notify about the changes that have occurred - Side effects register to Events through EVENT_HANDLERS mapping

How to use

  • Instantiate an Instruction
    instruction = RemoveEmployee(
        employment_id=employment_id,
        end_date=utctoday(),
        termination_type=EmployeeTerminationType.departure_resignation,
    )
    
  • execute it
    instruction.execute(commit=True)
    

How to contribute

If you plan to update files in this directory, please ping @affiliation_eng_oncall to discuss implementation first.