diff --git a/src/pages/txt-generator.jsx b/src/pages/txt-generator.jsx index 0b3cf6f..a879a30 100644 --- a/src/pages/txt-generator.jsx +++ b/src/pages/txt-generator.jsx @@ -1,14 +1,7 @@ import React from "react" import Clipboard from "clipboard" import { useEffect, useState } from "react" -import { - Alert, - Grid, - Button, - Label, - TextInput, - FormGroup, -} from "@trussworks/react-uswds" +import { Grid } from "@trussworks/react-uswds" import Layout from "../layouts" const txtFileOutput = (hospitals) => @@ -28,11 +21,6 @@ contact-email: ${contactEmail}` ) .join("\n\n") -const removeIndex = (array, index) => [ - ...array.slice(0, index), - ...array.slice(index + 1), -] - const TxtGenerator = () => { const baseHospital = { name: "", @@ -60,41 +48,6 @@ const TxtGenerator = () => { }) }, [state.hospitals]) - const updateHospital = (index, updatedHospital) => { - const hospitals = [...state.hospitals] - hospitals[index] = { ...hospitals[index], ...updatedHospital } - setState({ ...state, hospitals }) - } - - const getAlertParams = () => { - if ( - state.hospitals.length === 1 && - Object.values(state.hospitals[0]).every((v) => !v.trim()) - ) { - return { - type: "info", - message: "Fill in hospital fields to generate file", - } - } - if ( - state.hospitals.every((hospital) => - Object.values(hospital).every((v) => v.trim()) - ) - ) { - return { - type: "success", - message: "Generated file is valid", - } - } else { - return { - type: "error", - message: "All fields must be filled in for each hospital", - } - } - } - - const { type: alertType, message: alertMessage } = getAlertParams() - return (
@@ -102,83 +55,137 @@ const TxtGenerator = () => { + className="bg-white display-flex flex-column flex-align-self-start margin-bottom-4" + >

TXT File Instructions

-

Background

-

As finalized in the CY2024 OPPS/ASC Final Rule, beginning January 1, 2024, each hospital must ensure -that the public website it selects to host its machine-readable file (MRF) establishes and maintains, in -the form and manner specified by CMS: +

+ Background +

+

+ As finalized in the CY2024 OPPS/ASC Final Rule, beginning + January 1, 2024, each hospital must ensure that the public + website it selects to host its machine-readable file (MRF) + establishes and maintains, in the form and manner specified by + CMS:

    -
  • A .txt file in the root folder that includes: +
  • + A .txt file in the root folder that includes:
      -
    • The hospital location name that corresponds to the MRF;
    • -
    • The source page URL that hosts the MRF;
    • -
    • A direct link to the MRF (the MRF URL); and
    • -
    • Hospital point of contact information.
    • +
    • + {" "} + The hospital location name that corresponds to the MRF; +
    • +
    • The source page URL that hosts the MRF;
    • +
    • A direct link to the MRF (the MRF URL); and
    • +
    • Hospital point of contact information.
  • -
  • A link in the footer on its website, including but not limited to the homepage, that is labeled “Price Transparency” and links directly to the publicly available webpage that hosts the link to the MRF.
  • +
  • + A link in the footer on its website, including but not + limited to the homepage, that is labeled “Price + Transparency” and links directly to the publicly available + webpage that hosts the link to the MRF. +
- The purpose of these requirements is to facilitate automated access to hospital MRFs. Please refer to 45 CFR 180.50 (d)(6) and discussion at 88 FR 82111-82113. + The purpose of these requirements is to facilitate automated + access to hospital MRFs. Please refer to 45 CFR 180.50 (d)(6) + and discussion at 88 FR 82111-82113.

-

TXT technical specifications

-

Steps: +

+ TXT technical specifications +

+

+ {" "} + Steps:

    -
  1. Generate a TXT file that includes the required information indicated below.
  2. -
  3. If the MRF contains standard charge information for more than one location, create an entry for each of the inpatient locations and standalone emergency hospitals in the TXT file.
  4. +
  5. + Generate a TXT file that includes the required information + indicated below. +
  6. +
  7. + If the MRF contains standard charge information for more + than one location, create an entry for each of the inpatient + locations and standalone emergency hospitals in the TXT + file. +
  8. Name the file “cms-hpt.txt”.
  9. -
  10. Place the TXT file on the root of the domain of the public website your hospital has selected to host its machine-readable file (MRF), without regard to page structure. As an example, a hospital with the website https://hospital.com would locate its file at https://hospital.com/cms-hpt.txt
  11. -
+
  • + Place the TXT file on the root of the domain of the public + website your hospital has selected to host its + machine-readable file (MRF), without regard to page + structure. As an example, a hospital with the website + https://hospital.com would locate its file at + https://hospital.com/cms-hpt.txt +
  • +

    -

    Required Information for the TXT File

    - +

    + Required Information for the TXT File +

    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Attribute: ValueNameDefinition
    location-name: [hospital location name]Hospital Location NameIndicate the hospital location name that corresponds to the standard charge information contained in the MRF.
    source-page-url: [URL]Source page URLThe source page URL is the URL of the public webpage you have selected to host the MRF.
    mrf-url: [URL]Machine-readable file URLIndicate the URL of the MRF.
    contact-name: [name]POC NameIndicate the name of a point of contact (POC) that is capable of answering technical questions about your hospital’s MRF and the data contained in it.
    contact-email: [email]Contact emailIndicate the email address of the POC you have designated to answer technical questions about your hospital’s MRF and the data contained in it.
    -

    Example TXT File

    + + Attribute: Value + Name + Definition + + + + location-name: [hospital location name] + Hospital Location Name + + Indicate the hospital location name that corresponds to the + standard charge information contained in the MRF. + + + + source-page-url: [URL] + Source page URL + + The source page URL is the URL of the public webpage you + have selected to host the MRF. + + + + mrf-url: [URL] + Machine-readable file URL + Indicate the URL of the MRF. + + + contact-name: [name] + POC Name + + Indicate the name of a point of contact (POC) that is + capable of answering technical questions about your + hospital’s MRF and the data contained in it. + + + + contact-email: [email] + Contact email + + Indicate the email address of the POC you have designated to + answer technical questions about your hospital’s MRF and the + data contained in it. + + + +

    + Example TXT File +

    - location-name: Test Hospital
    - source-page-url: https://example.com
    - mrf-url: https://example.com/HPT
    - contact-name: Jon Snow
    - contact-email: jsnow@example.com
    -
    - location-name: Test Hospital 2
    - source-page-url: https://example2.com
    - mrf-url: https://example2.com/HPT
    - contact-name: Jane Doe
    - contact-email: jdoe@example2.com
    + location-name: Test Hospital
    + source-page-url: https://example.com
    + mrf-url: https://example.com/HPT
    + contact-name: Jon Snow
    + contact-email: jsnow@example.com
    +
    + location-name: Test Hospital 2
    + source-page-url: https://example2.com
    + mrf-url: https://example2.com/HPT
    + contact-name: Jane Doe
    + contact-email: jdoe@example2.com