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

VAMC health service "Available at these locations" list sort order #13941

Closed mmiddaugh closed 1 year ago

mmiddaugh commented 3 years ago

Issue Description

The "Available at these locations" list in a health service accordion doesn't seem to have a logical order - likely due to a bug and/or oversight.

screenshot ![image](https://user-images.githubusercontent.com/55411834/130649944-529e59eb-be75-4a06-8c95-851d42c23b32.png)

Expected behavior

The list should be ordered using the same logic as the Locations page

Dev note


Tasks

Acceptance Criteria

stefaniefgray commented 3 years ago

Link to page where this is happening: https://www.va.gov/houston-health-care/health-services/

eselkin commented 1 year ago

This seems to still be happening. the liquid file health_service.drupal.liquid seems to just take healthService.fieldLocalHealthCareService and iterate over it without a any filter or sort.

jilladams commented 1 year ago

Added to Facility Health Services: Iteration candidates #13932 epic, removed Triage label.

swirtSJW commented 1 year ago

These are the two sources of data in the CMS

Bubble to the top field_main_location (fieldMainLocation) image

Possible for other sort field_facility_classification (fieldFacilityClassification) image

However that classification does not include Mobile. They are a different content type, and in many cases, not published. (we are inconsistent about publishing them.

maxx1128 commented 1 year ago

This is an example data object from one of the locations in the example.

{
    "entityId": "26895",
    "entityType": "node",
    "entityUrl": {
        "path": "/houston-health-care/health-services/gastroenterology-at-va-houston-health-care"
    },
    "fieldBody": {
        "processed": "<html><head></head><body><p><strong>Care we provide at VA Houston&#xA0; health care</strong></p>\n<p>Staff in our gastroenterology department can provide the following treatments:</p>\n<ul><li>Colonoscopy</li>\n<li>Endoscopic services</li>\n<li>Treatments for complex gastrointestinal conditions</li>\n<li>Services for patients with liver diseases</li>\n<li>Early screening and cancer detection</li>\n</ul><p><a data-entity-substitution=\"canonical\" data-entity-type=\"node\" data-entity-uuid=\"2f3c9623-bd71-4002-b423-f8ad74e77841\" href=\"/houston-health-care/programs/gastroenterology-and-hepatology\" title=\"Gastroenterology and hepatology\">Learn more about gastroenterology at VA Houston.</a></p>\n</body></html>"
    },
    "fieldLocalHealthCareService": [
        {
            "entity": {
                "status": true,
                "entityUrl": {
                    "path": "/houston-health-care/locations/michael-e-debakey-department-of-veterans-affairs-medical-center/gastroenterology"
                },
                "fieldFacilityLocation": {
                    "entity": {
                        "entityUrl": {
                            "path": "/houston-health-care/locations/michael-e-debakey-department-of-veterans-affairs-medical-center"
                        },
                        "title": "Michael E. DeBakey Department of Veterans Affairs Medical Center"
                    }
                },
                "fieldAdministration": {
                    "entity": {
                        "entityId": "228"
                    }
                }
            }
        }
    ],
    "fieldServiceNameAndDescripti": {
        "entity": {
            "weight": 0,
            "entityId": "86",
            "entityBundle": "health_care_service_taxonomy",
            "fieldAlsoKnownAs": "Digestive care, GI",
            "fieldCommonlyTreatedCondition": "reflux, GERD, Barrett's esophagus, endoscopy, colonoscopy",
            "name": "Gastroenterology",
            "description": {
                "processed": "<html><head></head><body>Our gastrointestinal (GI) specialists offer screening and treatment for conditions affecting your GI tract, gallbladder, liver&#xA0;and pancreas&#x2014;like reflux, Crohn&#x2019;s disease, hepatitis and pancreatitis.</body></html>"
            },
            "fieldTricareDescription": null,
            "fieldServiceTypeOfCare": "Specialty care"
        }
    }
}

Like Eli noted above, healthService.fieldLocalHealthCareService is being passed into the template, but we could also pass healthService.fieldServiceNameAndDescripti into the template as well for the additional info. However, I don't see any info there that can help with the needed sorting either. The closest I see is fieldServiceTypeOfCare, but it only has the following different values: "Specialty care", "Mental health care", "Social programs and services", "Primary care", "Other services".

Are there any extra fields we can add to the GraphQL queries to get in the needed data? cc: @swirtSJW @eselkin

eselkin commented 1 year ago

@maxx1128 and I met to look for where we might pull the data from for this sort. However, we were not able to find where the data could be pulled from. We investigated similar queries, CMS data (specifically health care location pages: https://cms-txcrk8bym4a0ivw3xfr8xvdhezmls36f.demo.cms.va.gov/houston-health-care/locations/michael-e-debakey-department-of-veterans-affairs-medical-center and https://cms-txcrk8bym4a0ivw3xfr8xvdhezmls36f.demo.cms.va.gov/houston-health-care/locations ) and find no identifying information to query for that sort. We need someone familiar with the data structures here, perhaps @omahane who has worked in these data structures to help us find what to add to the query.

swirtSJW commented 1 year ago

Sorry I mislead you when I said this data comes from the Facility API. I was mistaken about which ticket we were talking about.

Main clinics -> detectable by the field field_main_location == 1 though this is only used when there are more than one medical center in a system Alpha list of health clinics -> (anything that is not a Main, Dom, Mobile or CLC. If you extract all the others, this is what you have left) Doms/CLCs -> detectable by field_facility_classification Mobile -> detectable by field_mobile == 1

These are the values present in field_facility_classification value| label 1|VA Medical Center (VAMC) 2|Health Care Center (HCC) 3|Multi-Specialty CBOC 4|Primary Care CBOC 5|MCS 6|Other Outpatient Services (OOS) 7|Extended Care Site (Community Living Center) (Stand-Alone) 8|Residential Care Site (MH RRTP/DRRTP) (Stand-Alone)

swirtSJW commented 1 year ago

field_facility_classification field_mobile field_main_location

are all fields on the Facility, not the individual services directly but the facility can be obtained through field_office

maxx1128 commented 1 year ago

Per the end of Sprint 91, there's a pull request open for this ticket, and should be starting to undergo some review soon. For Sprint 92, it just needs any needed review and modifications before being merged, and then it can get closed.

xiongjaneg commented 1 year ago

@maxx1128 This looks merged but no updates since then. Would you please update this and mark off completed ACs? For the last AC, I can submit a summary to CMS Team for review.

maxx1128 commented 1 year ago

@xiongjaneg I confirmed this change has occurred on Prod (see screenshot below). I updated the tasks and ACs.

Screen Shot 2023-09-12 at 2 32 48 PM
xiongjaneg commented 1 year ago

Shared in CMS Support slack thread