CMS has stricter requirements for HPT file than it used to

Created on 24 September 2024, about 2 months ago

Problem/Motivation

Way back when, the requirements for the MRF were pretty lax. It had to be xml or csv or json or some other machine-readable format.

Now, though, it can only be CSV or JSON and it has to follow one of three very specific tempaltes!

https://github.com/CMSgov/hospital-price-transparency/tree/master/docume...
https://github.com/CMSgov/hospital-price-transparency/tree/master/docume...

Proposed resolution

For one, we should stop allowing XML files and we should stop allowing any file types other that CSV, JSON, or zip. And we should update docs to reflect that.

But I also wonder if we couldn't somehow integrate with one of the new validators provided by CMS.

https://cmsgov.github.io/hpt-tool/

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @danflanagan8
  • πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US
  • πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US

    I was fortunate enough to meet with the OS team at CMS and ask some questions about the validation stuff! What a nice group of devs.

    First, there are no plans to create an api endpoint (security concerns and concerns over huge file sizes). Second, there are no plans to create a php library for validation (they want a single source of truth for validation, which is and will be the typescript library).

    So what can we don with the npm package that has the validation as js?

    The npm package is here: https://www.npmjs.com/package/hpt-validator

    The github for that is here: https://github.com/CMSgov/hpt-validator

    Naively, I want to make that npm package a dependency of the Drupal module. The module would then define a validation library that more-or-less is a drupal wrapper for the hpt-validator js. The validation would then happen on the front end, probably during file upload. Perhaps also on page load of the hpt edit form. And maybe after some use action (e.g. button click) on the hpt collection page.

    I'm never sure what the current best practice is for js dependencies, though, so I need to research that.

  • πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US

    I created an upstream issue (I guess?) hoping for a new build script that generates a dist js.

    https://github.com/CMSgov/hpt-validator/issues/62

Production build 0.71.5 2024