department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
98 stars 69 forks source link

VAMC Health Services: Remove already created services from the options when adding a new service #19075

Open jilladams opened 1 month ago

jilladams commented 1 month ago

Follow on ticket for https://github.com/department-of-veterans-affairs/va.gov-cms/issues/17674, to address VAMC Health Services.

Problem Statement

On the Create Service content form, Editors first select their facility, then select a Service name from a dropdown, for the type of Service they would like to create for their facility. (Services map to VAMC System Health Services available for the given VAMC System.)

Currently, the "Service name" dropdown displays all Services for the VAMC, regardless of whether a Facility Service for that Service+Facility combination has already been created. This means an editor may select a Facility, Service, populate the entire Create Service form (which is time consuming), and then receive a validation error on save saying that the given Facility Service already exists & cannot be saved.

**Example screenshot** ![Screenshot 2024-08-16 at 1 33 16 PM](https://github.com/user-attachments/assets/e694776e-2f47-465b-bcaa-701c0450c76a)

We should only show options in the "Service name" dropdown for Services that do not exist as a Facility Service for the given Facility.

User story

As an editor, when creating a new VAMC Facility Health Service, I want to choose from VAMC System Health Services that are not already in use on a Facility Service for my Facility.

Acceptance Criteria

jilladams commented 1 month ago

@Agile6MSkinner FYI this is the ticket we carved off of #17674. For now, I've added to the "Improve editorial experience for VAMCs" epic, but feel free to relocate it as needed.

jilladams commented 1 month ago

(also added to https://github.com/department-of-veterans-affairs/va.gov-cms/issues/16905)