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
97 stars 69 forks source link

Add data for all medical systems (not just Cerner ones) to cerner JSON #9787

Closed wesrowe closed 2 years ago

wesrowe commented 2 years ago

Description

As a Veteran, I want to see the geographical hospital system name, instead of a specific facility name.

We need the front-end to know the names of all VA medical systems so that they can be displayed by CTA widgets. Currently, the FE instead displays the name of the main VA facility in place of the system name – e.g., instead of "Central Ohio" it says "Chalmers P. Wylie."

Technical details

VA System names are a field in the in vamc-ehr.json file. However, currently, only a few medical systems are included – those that have cut over to Cerner, or those that are about to (and are cerner_staged in Drupal). Non-Cerner facilities need to be added to the json file so that the FE has the correct names of all VA systems.

vamc-ehr.json is a programmatically built json file (we think), generated from a query.

The GraphQL query is located here: src/site/stages/build/drupal/static-data-files/vamcEhrSystem/index.js. Additional work around this in the content-build repo can be found in this PR.

7-9hrs

Acceptance Criteria

CMS Team

Please check the team(s) that will do this work.

dsasser commented 2 years ago

find vamc-ehr.json and understand how it's built - and/or confer with Ryan - 1hr

vamc-ehr.json is generated by plugin during the content-build 'build' phase, which occurs just prior to the 'Get Drupal content' step.

The plugin uses the following graphql query:

 query($onlyPublishedContent: Boolean!) {
    nodeQuery(
      limit: 250,
      filter: {
        conditions: [
          { field: "status", value: "1", enabled: $onlyPublishedContent},
          { field: "type", value: "health_care_local_facility" },
          { field: "field_main_location", value: "1" },
          { field: "field_region_page.entity.field_vamc_ehr_system", value: ["cerner", "cerner_staged"], operator: IN }
        ]
      }
    ) {
      count,
      entities {
        ... on NodeHealthCareLocalFacility {
          title,
          fieldFacilityLocatorApiId,
          fieldRegionPage {
            entity {
              title,
              ... on NodeHealthCareRegionPage {
                fieldVamcEhrSystem
              }
            }
          },
        }
      }
    }
  } 

A PR has been created to remove the field_vamc_ehr_system filter from the query, which will cause the generated vamc-ehr.json file to include all medical systems:

https://github.com/department-of-veterans-affairs/content-build/pull/1229