API supports requisition templates per program

Description

As an administrator (Adam), I want to be able to support multiple requisition templates per program so that different parts of my supervisory hierarchy can use simplified, stock-based forms.

This configuration flexibility is to allow stock-based requisitions to be used in some requisition workflows.

The recommended mapping for multiple templates per program is to do it by facility type (e.g. a clinic's template might be a stock-based requisition template, while a district store's template might be a regular requisition template). This will allow different levels in the hierarchy to use different templates. (Another way to configure could be through the structure itself, but this will probably lead to duplication of templates at the same level.)

Mock Up

Acceptance Criteria

  • Programs can have multiple templates, by facility type

  • R&R templates should now have names, which are unique in the system (program name for existing templates)

  • New Zephyr test case is added to this ticket and tested

  • Create cross-service migration

  • For now initiate endpoint should use first template related with program (this will be changed in )

  • Get all endpoint should not return old requisition templates - there should be one template per program !

  • Change demo data to showcase UI

    • Give names to all existing requisition templates

    • Remove template for the "New Program" program

    • Associate existing template for "EPI" program with facility types "District Store", "Provincial Store"

    • Add new template for "EPI" program called "Vaccine Stock-Based R&R Template" with the same columns as the existing EPI template and associate it with facility type "Health Center"

    • Associate all other templates to all facility types in demo data (there should be four facility types in demo data)

Status

Assignee

Łukasz Lewczyński

Reporter

Klaudia Pałkowska

Labels

None

Time tracking

24h

Components

Sprint

None

Priority

Major