Skip to content

Commit

Permalink
Skipped tests until filters have been fixed per #15737
Browse files Browse the repository at this point in the history
  • Loading branch information
penny-lischer committed Sep 9, 2024
2 parents 4110c1f + c660ea7 commit 875b719
Show file tree
Hide file tree
Showing 230 changed files with 1,152 additions and 26,041 deletions.
3 changes: 3 additions & 0 deletions .environment/gitleaks/gitleaks-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ title = "PRIME ReportStream Gitleaks Configuration"
'authority\", \"extension\"', # FHIR extension URL also shows up in normal FHIR test data
'ApiKeyCredential\(\"flexion\"',
'authType: \"two-legged\"',
'\"apiKey\"',
'api-key\" to \"oracle123\"',
'Authorization-Type: \"username/password\"',
'cdctiautomated_sa'
]
paths = [
'.terraform/modules/',
Expand Down
17 changes: 15 additions & 2 deletions .github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
name: UP Migrating Receiver - Validate Test Data
about: This is the fourth step in migrating a STLT to the UP
title: "[name of STLT] - UP Migration - Validate Test Data"
labels: onboarding-ops, receiver
labels: onboarding-ops, receiver, engineering, needs-refinement
assignees: ''

---
[STLT] = name of STLT

### User Story:
As a developer, I want the [STLT] to validate test messages in staging, so that they can receive data in the format they expect.
Expand All @@ -27,4 +28,16 @@ As a developer, I want the [STLT] to validate test messages in staging, so that

### Acceptance Criteria
- [ ] Created and sent data using Simple Report
- [ ] Confirmed with STLT that data passes validation
- [ ] Confirmed with STLT that data passes validation
- [ ] When finished, tag Mikaelah, Chris, and Glenn in a slack post stating:
> [STLT] "Testing in Staging" is complete and will be moving on to "Monitor in Production"
>
> Connection Type: [REST, SFTP, SOAP, etc]
>
> Conditions tested: [List of Conditions]
>
> Positives set up to receive: [List of Conditions]
>
> Negatives set up to receive: [List of Conditions]
>
> Format receiving: [HL7 or FHIR]
2 changes: 1 addition & 1 deletion .github/actions/build-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
sudo rm -rf /usr/local/lib/android
- name: Set up JDK 17
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-submissions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
sudo rm -rf /usr/local/lib/android
- name: Set up JDK 17
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
with:
java-version: "17"
distribution: "temurin"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ jobs:
./gradlew :prime-router:primeCLI --args='validate-yaml --type Organizations --file settings/organizations.yml --dir settings/STLTs'
./gradlew :prime-router:primeCLI --args='validate-yaml --type FhirToFhirTransform --dir src/main/resources/metadata/fhir_transforms'
./gradlew :prime-router:primeCLI --args='validate-yaml --type FhirToHL7Mapping --dir src/main/resources/metadata/hl7_mapping'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingMessageTemplate --dir metadata/HL7/catchall/hl7/message metadata/HL7/v251-elr/hl7/message'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingResourceTemplate --dir metadata/HL7 --exclude-dir metadata/HL7/catchall/hl7/message metadata/HL7/v251-elr/hl7/message metadata/HL7/v251-elr/hl7/codesystem metadata/HL7/catchall/hl7/codesystem --exclude-file metadata/HL7/catchall/fhir/resourcemapping.yml metadata/HL7/v251-elr/fhir/resourcemapping.yml metadata/HL7/catchall/hl7/resource/Common.yml metadata/HL7/v251-elr/hl7/resource/Common.yml'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingMessageTemplate --dir metadata/HL7/catchall/hl7/message'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingResourceTemplate --dir metadata/HL7 --exclude-dir metadata/HL7/catchall/hl7/message metadata/HL7/catchall/hl7/codesystem --exclude-file metadata/HL7/catchall/fhir/resourcemapping.yml metadata/HL7/catchall/hl7/resource/Common.yml'
- name: Check for Uncommited Schema Docs
id: check_changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
cache-dependency-path: frontend-react/yarn.lock

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
path: frontend-react/e2e-data
pattern: frontend-e2e-data--shard-*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_to_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ jobs:
fetch-depth: 0
- name: Download router artifact
if: ${{ needs.wf_vars.outputs.enable_builds == 'true' }}
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: prime-router-build-${{ needs.wf_vars.outputs.version }}
path: archives/
- name: Download frontend artifact
if: ${{ needs.wf_vars.outputs.enable_builds == 'true' }}
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: static-website-react-${{ needs.wf_vars.outputs.version }}
path: archives/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: snyk/actions/setup@b98d498629f1c368650224d6d212bf7dfa89e4bf
- name: Set up JDK 17 to generate backend coverage stats
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up JDK 17
if: steps.changed-files-yaml.outputs.backend_any_changed == 'true' || steps.branch-name.outputs.is_default == 'true'
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Run Checkov action
uses: bridgecrewio/checkov-action@c9421864e014ef6b8acfa35d0bf3c7e52c13ab10
uses: bridgecrewio/checkov-action@64296236994261f657e33a40ddbeb06a4b8e9747
with:
directory: operations/app/terraform
skip_check: CKV_AZURE_139,CKV_AZURE_137,CKV_AZURE_103,CKV_AZURE_104,CKV_AZURE_102,CKV_AZURE_130,CKV_AZURE_121,CKV_AZURE_67,CKV_AZURE_56,CKV_AZURE_17,CKV_AZURE_63,CKV_AZURE_18,CKV_AZURE_88,CKV_AZURE_65,CKV_AZURE_13,CKV_AZURE_66,CKV_AZURE_33,CKV_AZURE_35,CKV_AZURE_36,CKV_AZURE_98,CKV2_AZURE_1,CKV2_AZURE_15,CKV2_AZURE_21,CKV_AZURE_213,CKV_AZURE_59,CKV2_AZURE_33,CKV2_AZURE_32,CKV2_AZURE_28,CKV_AZURE_206,CKV_AZURE_42,CKV_AZURE_110,CKV_AZURE_109,CKV_AZURE_166,CKV2_AZURE_38,CKV2_AZURE_40,CKV2_AZURE_41,CKV_AZURE_235
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ hs_err_pid*
**/build/**
**/log/**
**/dependency-reduced-pom.xml
**/version.json

# Frontend build output
**/node_modules/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,13 @@ test.describe(
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });
});

test.skip("downloads the file", async ({ dailyDataPage }) => {
await setDate(dailyDataPage.page, "#start-date", 14);
await setDate(dailyDataPage.page, "#end-date", 0);

await applyButton(dailyDataPage.page).click();
test("downloads the file", async ({ dailyDataPage, isMockDisabled }) => {
test.skip(!isMockDisabled, "Mocks are ENABLED, skipping 'downloads the file' test");

Check warning on line 377 in frontend-react/e2e/spec/chromium-only/authenticated/daily-data-page-user-flow.spec.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected use of the `.skip()` annotation
// Sort by File available until, but they're in ASCENDING order
await dailyDataPage.page.getByRole("button", { name: "File available until" }).click();
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });
// Sort by File available until again, to get the absolute latest result
await dailyDataPage.page.getByRole("button", { name: "File available until" }).click();
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });

const downloadProm = dailyDataPage.page.waitForEvent("download");
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Sidenav from "../Sidenav.mdx";

<p className="usa-intro text-base">ReportStream responds to each API call with a response (JSON formatted) about the disposition of your data.</p>

<p className="text-base">Last updated: 6/24/24</p>
<p className="text-base">Last updated: 9/9/24</p>

***

Expand Down Expand Up @@ -52,11 +52,9 @@ Example ReportStream response to an async submission:
}
```

ReportStream features a History Details API that can be later queried to obtain the actual destinations and relevant detail.
If you’d like to use this API, let the ReportStream team know, and we’ll provide you with additional information about requirements
for Okta authentication.
ReportStream features a History Details API that can be later queried to obtain the actual destinations and relevant detail using your existing private/public key pair.

The request is made with the submissionId in the earlier example.:
The request is made with the submissionId in the earlier example:

```
https://prime.cdc.gov/api/history/simple_report/submissions/1588
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import site from "../../../site.json";

<LayoutMain>
# Sample payloads and output
<p className="text-base">Last updated: 6/24/24</p>
<p className="text-base">Last updated: 9/9/24</p>

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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:** 6/24/24</p>
<p className="text-base">**Last updated:** 9/9/24</p>

***

Expand Down
2 changes: 1 addition & 1 deletion frontend-react/src/content/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"path": "/assets/csv/ReportStream-StandardCSV-ExampleData-20220509.csv"
},
"programmersGuidePdf": {
"path": "/assets/pdf/ReportStream-Programmers-Guide-v4.5.pdf"
"path": "/assets/pdf/ReportStream-Programmers-Guide-v4.6.pdf"
},
"exampleHl7": {
"path": "/assets/hl7/Example-hl7-file.hl7"
Expand Down
1 change: 1 addition & 0 deletions operations/app/terraform/modules/function_app/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ locals {
"RS_OKTA_authkey" = var.RS_OKTA_authKey
"RS_OKTA_ClientId" = var.RS_OKTA_clientId
"ETOR_TI_baseurl" = var.etor_ti_base_url
"cdctiautomated" = var.cdctiautomated_sa
# Manage client secrets via a Key Vault
"CREDENTIAL_STORAGE_METHOD" = "AZURE"
"CREDENTIAL_KEY_VAULT_NAME" = var.client_config_key_vault_name
Expand Down
3 changes: 3 additions & 0 deletions operations/app/terraform/modules/function_app/~inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ variable "RS_OKTA_authKey" {}
variable "RS_OKTA_clientId" {}
variable "RS_OKTA_scope" {}
variable "etor_ti_base_url" {}
variable "cdctiautomated_sa" {
default = ""
}

variable "subnets" {
description = "A set of all available subnet combinations"
Expand Down
6 changes: 6 additions & 0 deletions operations/app/terraform/vars/staging/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@ data "azurerm_key_vault_secret" "RS_OKTA_authKey" {
name = "functionapp-RS-OKTA-authkey"
key_vault_id = data.azurerm_key_vault.app_config.id

}

data "azurerm_key_vault_secret" "cdctiautomated_sa" {
name = "functionapp-cdctiautomated"
key_vault_id = data.azurerm_key_vault.app_config.id

}
1 change: 1 addition & 0 deletions operations/app/terraform/vars/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module "function_app" {
RS_OKTA_clientId = data.azurerm_key_vault_secret.RS_OKTA_clientId.value
RS_OKTA_authKey = data.azurerm_key_vault_secret.RS_OKTA_authKey.value
etor_ti_base_url = local.init.etor_ti_base_url
cdctiautomated_sa = data.azurerm_key_vault_secret.cdctiautomated_sa.value
}

module "front_door" {
Expand Down
15 changes: 15 additions & 0 deletions prime-router/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import org.apache.commons.io.FilenameUtils
import org.apache.tools.ant.filters.ReplaceTokens
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jooq.meta.jaxb.ForcedType
import java.io.ByteArrayOutputStream
import java.io.FileInputStream
import java.nio.charset.StandardCharsets
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.Properties
Expand Down Expand Up @@ -497,9 +499,22 @@ tasks.azureFunctionsPackage {
finalizedBy("copyAzureScripts")
}

tasks.register("generateVersionFile") {
doLast {
val stdout = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
val currentCommit = stdout.toString(StandardCharsets.UTF_8).trim()
File(buildDir, "$azureFunctionsDir/$azureAppName/version.json").writeText("{\"commitId\": \"$currentCommit\"}")
}
}

val azureResourcesTmpDir = File(buildDir, "$azureFunctionsDir-resources/$azureAppName")
val azureResourcesFinalDir = File(buildDir, "$azureFunctionsDir/$azureAppName")
tasks.register<Copy>("gatherAzureResources") {
dependsOn("generateVersionFile")
from("./")
into(azureResourcesTmpDir)
include("metadata/**/*.yml")
Expand Down
30 changes: 30 additions & 0 deletions prime-router/docs/api/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,36 @@ paths:
$ref: '#/components/schemas/Report'
'500':
description: Internal Server Error
/reports/download:
get:
summary: Downloads a message based on the report id
security:
- OAuth2: [ system_admin ]
parameters:
- in: query
name: reportId
description: The report id to look for to download.
schema:
type: string
required: true
example: e491f4fb-f2c5-4473-8db2-206ea04991e8
- in: query
name: removePII
description: Boolean that determines if PII will be removed from the message. If missing will default to true.
Required to be true if prod env.
required: false
schema:
type: boolean
example: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
'500':
description: Internal Server Error
# Building
components:
schemas:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ v251. That presents the opportunity for reuse.

1. Review existing data type mappings located in `prime-router/metadata/HL7/datatypes/` for reuse
2. Add folder to `prime-router/metadata/HL7/` with a name indicating the new conformance profile
3. Copy folder `fhir` from `prime-router/metadata/HL7/v251-elr` and add to your new mapping folder.
3. Copy folder `fhir` from `prime-router/metadata/HL7/catchall` and add to your new mapping folder.
4. Create folder `hl7` in your new mapping folder with the following sub-folders:
- "message" - **required** - within that, add a yml file named with the HL7 message type (ex ORU_R01, ORM_O01,
ADT_A01, etc.)
Expand Down
Loading

0 comments on commit 875b719

Please sign in to comment.