Skip to content

Commit

Permalink
Merge branch 'master' into migrate-to-main
Browse files Browse the repository at this point in the history
  • Loading branch information
emvaldes authored Nov 6, 2024
2 parents 610ab7d + 7895c62 commit b9df6b3
Show file tree
Hide file tree
Showing 37 changed files with 208 additions and 133 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ runs:
sudo apt-get install openvpn-systemd-resolved
shell: bash

- name: Validate OpenVPN
run: |
echo -e "\nOpenVPN Version:" ;
openvpn --version ;
echo -e "\nPinging URL: ${{ inputs.PING_URL }}" ;
ping -c 3 ${{ inputs.PING_URL }} ;
echo -e "\nIP Route:" ;
ip route ;
shell: bash

- name: Connect VPN
env:
TLS_KEY: ${{ inputs.TLS_KEY }}
Expand All @@ -48,6 +58,8 @@ runs:
echo "$USER_CRT" | base64 -d > user.crt
echo "$USER_KEY" | base64 -d > user.key
echo "$SECRET" | base64 -d > secret.txt
echo -e "sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon" ;
sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon
- name: VPN Status
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions .github/actions/vpn-azure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ runs:
sed -i "s/\(dhcp-option DNS \).*/\1${{ inputs.dns-ip }}/" .github/vpn/${{ inputs.env-name }}.ovpn
shell: bash

- uses: josiahsiegel/action-connect-ovpn@794339aff94452216c97f609476c367a43a31295
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/action-connect-ovpn

- uses: ./.github/actions/connect-ovpn
if: inputs.env-name && inputs.ca-cert != 'false'
id: connect_vpn
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ updates:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/.github/actions/action-connect-ovpn"
directory: "/.github/actions/connect-ovpn"
schedule:
interval: "daily"

Expand Down
2 changes: 1 addition & 1 deletion .github/vpn/test.ovpn
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ key user.key
script-security 2
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre
down-pre
4 changes: 0 additions & 4 deletions frontend-react/e2e/helpers/internal-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,4 @@ export const developerResourcesApiSideNav = [
name: "Responses from ReportStream",
path: "/developer-resources/api/documentation/responses-from-reportstream",
},
{
name: "Sample payloads and output",
path: "/developer-resources/api/documentation/sample-payloads-and-output",
},
];
30 changes: 16 additions & 14 deletions frontend-react/e2e/spec/all/idletimeout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import process from "node:process";
import { OrganizationPage } from "../../pages/authenticated/admin/organization";
import { test as baseTest } from "../../test";

const timeout = parseInt(process.env.VITE_IDLE_TIMEOUT ?? "20000");
// Add/Sub 500 ms to account for variance
const timeoutLow = timeout - 500;
const timeoutHigh = timeout + 500;
const timeout = parseInt(process.env.VITE_IDLE_TIMEOUT ?? "900000");
const timeoutLow = timeout - 1000;
const timeoutHigh = timeout + 1000;

export interface OrganizationPageFixtures {
organizationPage: OrganizationPage;
Expand Down Expand Up @@ -37,27 +36,30 @@ const test = baseTest.extend<OrganizationPageFixtures>({
frontendWarningsLogPath,
isFrontendWarningsLog,
});
await page.page.clock.install();
await page.goto();
await use(page);
},
});

test.use({ storageState: "e2e/.auth/admin.json" });

test.skip("Does not trigger early", async ({ organizationPage }) => {
await expect(organizationPage.page.getByRole("banner").first()).toBeVisible();
await organizationPage.page.keyboard.down("Tab");
test.describe("Idle time out", () => {
test("Does not trigger early", async ({ organizationPage }) => {
await expect(organizationPage.page.getByRole("banner").first()).toBeVisible();
await organizationPage.page.keyboard.down("Tab");

const start = new Date();
await organizationPage.page.clock.fastForward(timeoutLow);

await organizationPage.page.waitForRequest(/\/oauth2\/default\/v1\/revoke/, {
timeout: timeoutHigh,
await expect(organizationPage.page.getByRole("banner").first()).toBeVisible();
});

const end = new Date();
test("Triggers on time", async ({ organizationPage }) => {
await expect(organizationPage.page.getByRole("banner").first()).toBeVisible();
await organizationPage.page.keyboard.down("Tab");

const idleTime = Math.abs(end.valueOf() - start.valueOf());
await organizationPage.page.clock.fastForward(timeoutHigh);

expect(idleTime).not.toBeLessThan(timeoutLow);
expect(idleTime).not.toBeGreaterThan(timeoutHigh);
await expect(organizationPage.page.getByRole("link", { name: "Login" })).toBeVisible();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const test = baseTest.extend<SecurityPageFixtures>({
},
});

test.describe(
// Page currently archived
test.describe.skip(
"Developer Resources / API / Documentation / Sample payloads and output page",
{
tag: "@smoke",
Expand Down
Binary file not shown.
3 changes: 0 additions & 3 deletions frontend-react/public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@
<url>
<loc>https://reportstream.cdc.gov/developer-resources/api/documentation/responses-from-reportstream</loc>
</url>
<url>
<loc>https://reportstream.cdc.gov/developer-resources/api/documentation/sample-payloads-and-output</loc>
</url>
<url>
<loc>https://reportstream.cdc.gov/support</loc>
</url>
Expand Down
10 changes: 6 additions & 4 deletions frontend-react/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ const ManagingYourConnectionIndex = lazy(
lazyRouteMarkdown(() => import("./content/managing-your-connection/index.mdx")),
);
const SupportIndex = lazy(lazyRouteMarkdown(() => import("./content/support/index.mdx")));
const ReportStreamApiDocumentationPayloads = lazy(
// Page currently archived
/*const ReportStreamApiDocumentationPayloads = lazy(
lazyRouteMarkdown(
() => import("./content/developer-resources/reportstream-api/documentation/SamplePayloadsAndOutput.mdx"),
),
);
);*/

/* Public Pages */
const TermsOfService = lazy(() => import("./pages/TermsOfService"));
Expand Down Expand Up @@ -269,13 +270,14 @@ export const appRoutes: RouteObject[] = [
isContentPage: true,
},
},
{
// Page currently archived
/*{
path: "sample-payloads-and-output",
element: <ReportStreamApiDocumentationPayloads />,
handle: {
isContentPage: true,
},
},
},*/
],
},
],
Expand Down
3 changes: 2 additions & 1 deletion frontend-react/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { WidgetOptions } from "@okta/okta-signin-widget";
import type { Feature } from "@okta/okta-signin-widget";
import type { IIdleTimerProps } from "react-idle-timer";

import site from "../content/site.json";
import type { ConsoleLevel } from "../utils/rsConsole/rsConsole";

const envVars = {
Expand Down Expand Up @@ -118,7 +119,7 @@ const config = {
} satisfies Partial<Record<Feature, boolean>>,
useClassicEngine: false,
helpLinks: {
help: "https://app.smartsheetgov.com/b/form/95d2f16b772c42d8aaa0ef5db28a6838",
help: site.forms.contactUs.url,
},
i18n: {
// Overriding English properties
Expand Down
5 changes: 4 additions & 1 deletion frontend-react/src/content/about/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ meta:
src: /assets/img/opengraph/reportstream-tagline.png
altText: "ReportStream. CDC's free, single connection to streamline your data transfer and improve public health. The words are surrounded by illustration of lines and boxes connected by colorful dots."
---

import site from "../site.json";

<HeroWrapper>
<div className="grid-container">
<div className="grid-row grid-gap margin-y-3">
Expand Down Expand Up @@ -126,7 +129,7 @@ meta:
<CardGroup>
<Card gridLayout={{col: "fill"}}>
<CardHeader typeof="div">
### <A href="/assets/pdf/ReportStream_Onepager_20240605.pdf" target="_blank">ReportStream overview PDF <Icon name='FileDownload'/></A>
### <A href={site.assets.onePager.path} target="_blank">ReportStream overview PDF <Icon name='FileDownload'/></A>
</CardHeader>
<CardBody>
Download a quick summary of ReportStream that you can print and share.
Expand Down
2 changes: 1 addition & 1 deletion frontend-react/src/content/about/news.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ While the pilot focused on flu data, the goal was to create solutions that laid

As we celebrate the success of the flu pilot, we'll be conducting further tests on other conditions with multiple partners. We are excited for the future of scaling these results so ReportStream can send a broad range of reportable public health data.

If you are interested in sending or receiving flu data, <A href="https://app.smartsheetgov.com/b/form/48f580abb9b440549b1a9cf996ba6957">connect with us</A> and we’ll discuss when and how your organization can start.
If you are interested in sending or receiving flu data, <A href={site.forms.connectWithRS.url}>connect with us</A> and we’ll discuss when and how your organization can start.
3 changes: 2 additions & 1 deletion frontend-react/src/content/about/our-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ backToTop: true
---
import Sidenav from "./sidenav.mdx"
import usamapsvg from "../usa_w_territories.svg"; // in /content dir to get unique filename per build
import site from "../site.json"

<LayoutSidenav>
<Sidenav />
Expand All @@ -22,7 +23,7 @@ import usamapsvg from "../usa_w_territories.svg"; // in /content dir to get uniq

State, local, and territorial agencies across the United States rely on ReportStream to make accurate, timely public health responses.

Don't see your state or territory? [Connect with us](https://app.smartsheetgov.com/b/form/48f580abb9b440549b1a9cf996ba6957).
Don't see your state or territory? <A href={site.forms.connectWithRS.url}>Connect with us</A>.

<figure>
<img src={usamapsvg} alt="Map of states using ReportStream" />
Expand Down
5 changes: 3 additions & 2 deletions frontend-react/src/content/about/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ meta:
backToTop: true
---
import Sidenav from "./sidenav.mdx"
import site from "../site.json"

<LayoutSidenav>
<Sidenav/>
Expand Down Expand Up @@ -508,9 +509,9 @@ You may also be interested in:
pandemics and gives us more flexibility for future
data types in public health. If your jurisdiction is
interested in REST/HTTP transport,{" "}
<a href="https://app.smartsheetgov.com/b/form/48f580abb9b440549b1a9cf996ba6957">
<A href={site.forms.connectWithRS.url}>
connect with our team
</a>
</A>
.
</p>
),
Expand Down
3 changes: 2 additions & 1 deletion frontend-react/src/content/about/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ meta:
altText: "An abstract illustration of screens and a document."
---
import Sidenav from "./sidenav.mdx"
import site from "../site.json"

<LayoutSidenav>
<Sidenav/>
Expand Down Expand Up @@ -103,7 +104,7 @@ ReportStream is committed to handling data securely and reliably. From federal r
headingLevel:"h3",
title: "How does ReportStream send data?",
content: (<p>
ReportStream transports data through Secure File Transfer Protocol (SFTP) or a REST API. Public health entities can request data be sent in real time or batched according to their needs. ReportStream transports data through Secure File Transfer Protocol (SFTP) or a REST API. Public health entities can request data be sent in real time or batched according to their needs. If you are a public health entity interested in another transport method, <A href="https://app.smartsheetgov.com/b/form/48f580abb9b440549b1a9cf996ba6957">contact our team</A> to explore your options.
ReportStream transports data through Secure File Transfer Protocol (SFTP) or a REST API. Public health entities can request data be sent in real time or batched according to their needs. ReportStream transports data through Secure File Transfer Protocol (SFTP) or a REST API. Public health entities can request data be sent in real time or batched according to their needs. If you are a public health entity interested in another transport method, <A href={site.forms.connectWithRS.url}>contact our team</A> to explore your options.
</p>)
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import site from "../../site.json";
</Card>
<Card gridLayout={{col: "fill"}}>
<CardHeader><span className="font-sans-lg">[Documentation](documentation)</span></CardHeader>
<CardBody>Details on our data model and sample responses, inputs and outputs to assist you in our set up and use of the ReportStream API.</CardBody>
<CardBody>Details on our sample responses to assist you in our set up and use of the ReportStream API.</CardBody>
</Card>
</CardGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<USNavLink href="/developer-resources/api/documentation/responses-from-reportstream#response-messages">Response messages</USNavLink>,
<USNavLink href="/developer-resources/api/documentation/responses-from-reportstream#json-error-responses">JSON error responses</USNavLink>,
]}>Responses from ReportStream</SideNavItem>,
<SideNavItem href="/developer-resources/api/documentation/sample-payloads-and-output" items={[
<USNavLink href="/developer-resources/api/documentation/sample-payloads-and-output#sample-hl7-251-payload-and-output">Sample HL7 v2.5.1 payload and output</USNavLink>,
]}>Sample payloads and output</SideNavItem>,
]}>Documentation</SideNavItem>,
]}>
</SideNav>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
meta:
title: ReportStream API documentation
description: Details on our data model and sample responses, inputs and outputs to assist you in your set up and use of the ReportStream API.
description: Details on our sample responses to assist you in your set up and use of the ReportStream API.
openGraph:
image:
src: /assets/img/opengraph/reportstream-tagline.png
Expand All @@ -28,21 +28,9 @@ import Sidenav from "../Sidenav.mdx";
ReportStream responds to each API call with a response (JSON formatted) about the disposition of your data.

**On this page:**
* [Errors and warnings](responses-from-reportstream#errors-and-warnings)
* [Response messages](responses-from-reportstream#response-messages)
* [JSON error responses](responses-from-reportstream#json-error-responses)
</CardBody>
</Card>
<Card className="width-full">
<CardHeader typeof="div">
## [Sample payloads and outputs](sample-payloads-and-output)
</CardHeader>
<CardBody>
Samples are provided for HL7 inputs and responses.

**On this page:**
* [Sample HL7 2.5.1 payload and output](sample-payloads-and-output#sample-hl7-251-payload-and-output)
</CardBody>
</Card>
</CardGroup>
</LayoutMain>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Page currently archived
meta:
title: ReportStream API sample payloads and output
description: Sample payloads and output for HL7 and CSV submissions to ReportStram's API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Step2 from "./Step2.mdx";
import Step3 from "./Step3.mdx";
import Step4 from "./Step4.mdx";
import Sidenav from "../Sidenav.mdx";
import site from "../../../site.json";

<LayoutSidenav><Sidenav /></LayoutSidenav>

Expand All @@ -24,24 +25,26 @@ import Sidenav from "../Sidenav.mdx";
Examples in this guide use curl commands for simplicity with the assumption you’ll be coding these calls into your sending system.
You can also use a program like Postman to test submissions.

<p className="text-base">**Last updated:** 9/9/24</p>
<p className="text-base">**Last updated:** 11/4/24</p>

***

<h2 className="rs-numbered">Format and validate a fake data file</h2>

To prepare your file for testing, set up a sample file with fake data (artificially created, non-PII data).

Currently, ReportStream can accept either HL7 or FHIR data.
We can send you a file with fake data to review that will always successfully validate against the NIST HL7v2 validator.
Note that because the data in those files are computer-generated, it may not feel realistic in some places.
Currently, ReportStream can accept either HL7 or FHIR data. We can provide a sample HL7 file with fake data
to review <A href={site.forms.contactUs.url}>upon request</A>.

<Alert type="tip">For this step, you can refer to formatting requirements for
[HL7v2.5.1 ORU-R01](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=185) or
[RADxMARS](https://www.nibib.nih.gov/covid-19/radx-tech-program/mars/hl7v2-getting-started) for OTC (over the counter) test data.</Alert>

When you’ve formatted your fake (non-PII) data file, test your data model using using the
[NIST General Validation Tool](https://hl7v2-gvt.nist.gov/gvt/#/home), and correct any errors you receive.
When you’ve formatted your fake (non-PII) data file, test your data model using the
<A href={site.external.nistValidationSuite.url}>NIST Electronic Lab Reporting (ELR) Validation Suite</A>.
(Note: If you’re testing OTC data, use the <A href={site.external.nistGeneralValidationTool.url}>NIST HL7 General Validation Tool</A> and
select “RADx MARS HL7v2” from the tool scope dropdown. Navigate to the “Context-free” tab and select the “Onboarding” profile group).
Correct any errors you receive.

<h2 className="rs-numbered">Set up authentication and test your API connection</h2>

Expand Down
6 changes: 3 additions & 3 deletions frontend-react/src/content/getting-started/receiving-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ backToTop: true
---

import Sidenav from "./sidenav.mdx"
import site from "../../content/site.json";
import site from "../site.json";

<LayoutSidenav>
<Sidenav/>
Expand Down Expand Up @@ -86,7 +86,7 @@ Connecting to ReportStream is similar to setting up an Electronic Lab Reporting

<h2 id="anchor-what-you-need">What you need</h2>

In addition to gathering your team and setting aside time for the weekly calls, you’ll need to provide us with more information about your requirements and preferences. Our [onboarding form](https://app.smartsheetgov.com/b/form/b0935d5d1e924c57b2d293b4ed0f2cd5) collects the specific details about your needs.
In addition to gathering your team and setting aside time for the weekly calls, you’ll need to provide us with more information about your requirements and preferences. Our <A href={site.forms.intakeElr.url}>onboarding form</A> collects the specific details about your needs.

Review what you need to gather to start onboarding.

Expand Down Expand Up @@ -209,7 +209,7 @@ Once you have all the information you need, submit the onboarding form. We'll ge
<CardGroup>
<Card gridLayout={{ tablet: { col: 4 } }}>
<CardHeader>
### <A href="/assets/pdf/ReportStream_Onepager_20240605.pdf" target="_blank">ReportStream overview PDF <Icon name='FileDownload'/></A>
### <A href={site.assets.onePager.path} target="_blank">ReportStream overview PDF <Icon name='FileDownload'/></A>
</CardHeader>
<CardBody>
Download a quick summary of ReportStream that you can print and share.
Expand Down
Loading

0 comments on commit b9df6b3

Please sign in to comment.