diff --git a/.environment/gitleaks/gitleaks-config.toml b/.environment/gitleaks/gitleaks-config.toml index da0f618980d..d95d877f4b8 100644 --- a/.environment/gitleaks/gitleaks-config.toml +++ b/.environment/gitleaks/gitleaks-config.toml @@ -203,8 +203,6 @@ 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' ] diff --git a/.github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md b/.github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md index f5c769eddcc..3398b3d7086 100644 --- a/.github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md +++ b/.github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md @@ -2,11 +2,10 @@ 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, engineering, needs-refinement +labels: onboarding-ops, receiver 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. @@ -28,16 +27,4 @@ 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 -- [ ] 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] +- [ ] Confirmed with STLT that data passes validation diff --git a/.github/actions/build-backend/action.yml b/.github/actions/build-backend/action.yml index a2aa9e2200f..7f2f489d485 100644 --- a/.github/actions/build-backend/action.yml +++ b/.github/actions/build-backend/action.yml @@ -33,7 +33,7 @@ runs: sudo rm -rf /usr/local/lib/android - name: Set up JDK 17 - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 + uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 with: java-version: "17" distribution: "temurin" diff --git a/.github/actions/build-submissions/action.yml b/.github/actions/build-submissions/action.yml index 15904917752..f189ce652f6 100644 --- a/.github/actions/build-submissions/action.yml +++ b/.github/actions/build-submissions/action.yml @@ -33,7 +33,7 @@ runs: sudo rm -rf /usr/local/lib/android - name: Set up JDK 17 - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 + uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 with: java-version: "17" distribution: "temurin" diff --git a/.github/workflows/build_hub.yml b/.github/workflows/build_hub.yml index 3774600f35e..b8a33cfc331 100644 --- a/.github/workflows/build_hub.yml +++ b/.github/workflows/build_hub.yml @@ -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' - ./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' + ./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' - name: Check for Uncommited Schema Docs id: check_changes diff --git a/.github/workflows/frontend_chromatic_main.yml b/.github/workflows/frontend_chromatic_main.yml index b6d051404f6..6302c480225 100644 --- a/.github/workflows/frontend_chromatic_main.yml +++ b/.github/workflows/frontend_chromatic_main.yml @@ -32,7 +32,7 @@ jobs: run: yarn install --immutable - name: Run Chromatic - uses: chromaui/action@95f238da20415287a1a877fecec79290ad2a7e0c + uses: chromaui/action@b984808b772126a9f44b2b7737b131b68a2ede32 with: workingDir: frontend-react token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/frontend_ci.yml b/.github/workflows/frontend_ci.yml index 328ec171966..dc05dc522e0 100644 --- a/.github/workflows/frontend_ci.yml +++ b/.github/workflows/frontend_ci.yml @@ -247,7 +247,7 @@ jobs: - name: Run Chromatic id: chromatic - uses: chromaui/action@95f238da20415287a1a877fecec79290ad2a7e0c + uses: chromaui/action@b984808b772126a9f44b2b7737b131b68a2ede32 with: workingDir: frontend-react token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 064c19860e7..555553c1bcd 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -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@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 + uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 with: java-version: "17" distribution: "temurin" diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index c6e54cb4ff9..29ae17f7afc 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -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@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 + uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 with: java-version: "17" distribution: "temurin" diff --git a/.github/workflows/validate_terraform.yml b/.github/workflows/validate_terraform.yml index 310178f7101..07e6b3068bd 100644 --- a/.github/workflows/validate_terraform.yml +++ b/.github/workflows/validate_terraform.yml @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Run Checkov action - uses: bridgecrewio/checkov-action@08a0f072354cdd9c009ce7c5c6174491834cec08 + uses: bridgecrewio/checkov-action@c9421864e014ef6b8acfa35d0bf3c7e52c13ab10 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 diff --git a/.gitignore b/.gitignore index 71f2e182cf9..c361e158a19 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ hs_err_pid* **/build/** **/log/** **/dependency-reduced-pom.xml -**/version.json # Frontend build output **/node_modules/** diff --git a/frontend-react/e2e/pages/authenticated/admin/receiver-status.ts b/frontend-react/e2e/pages/authenticated/admin/receiver-status.ts index 2f0673d9892..a937092350c 100644 --- a/frontend-react/e2e/pages/authenticated/admin/receiver-status.ts +++ b/frontend-react/e2e/pages/authenticated/admin/receiver-status.ts @@ -1,14 +1,11 @@ import { expect, Locator } from "@playwright/test"; import { endOfDay, format, startOfDay, subDays } from "date-fns"; -import type { RSOrganizationSettings } from "../../../../src/config/endpoints/settings"; import { RSReceiverStatus } from "../../../../src/hooks/api/UseReceiversConnectionStatus/UseReceiversConnectionStatus"; import { createStatusTimePeriodData, SUCCESS_RATE_CLASSNAME_MAP, - SuccessRate, } from "../../../../src/pages/admin/receiver-dashboard/utils"; -import { DatePair, dateShortFormat, durationFormatShort } from "../../../../src/utils/DateTimeUtils"; -import { formatDate } from "../../../../src/utils/misc"; +import { DatePair, dateShortFormat } from "../../../../src/utils/DateTimeUtils"; import { createMockGetReceiverStatus } from "../../../mocks/receiverStatus"; import { BasePage, BasePageTestArgs, type ResponseHandlerEntry, type RouteHandlerFulfillEntry } from "../../BasePage"; @@ -313,7 +310,8 @@ export class AdminReceiverStatusPage extends BasePage { if (!isRequestAwaitedBool) return undefined as void; const req = await p; - return req ? new URL(req.url()) : undefined; + const reqUrl = req ? new URL(req.url()) : undefined; + return reqUrl; } async updateFilterDateRange(start: Date, end: Date, inputMethod: "textbox" | "calendar" = "textbox") { @@ -402,7 +400,7 @@ export class AdminReceiverStatusPage extends BasePage { return a[0] !== b[0] && a[1] !== b[1]; } - async testReceiverStatusDisplay(isSmoke = false) { + async testReceiverStatusDisplay() { const [startDate, endDate] = this.filterFormInputs.dateRange.value; const statusRows = this.receiverStatusRowsLocator; await expect(statusRows).toHaveCount(new Set(this.receiverStatus?.map((r) => r.receiverId)).size); @@ -446,192 +444,6 @@ export class AdminReceiverStatusPage extends BasePage { await expect(sliceEle).toHaveClass(expectedClass); } } - - if (isSmoke && i === 0) { - break; - } - } - - return true; - } - - async testReceiverName() { - const { organizationName, receiverName, successRate } = - this.timePeriodData[1]; - - const receiversStatusRows = this.receiverStatusRowsLocator; - const expectedReceiverStatusRow = receiversStatusRows.nthCustom(0); - const expectedReceiverStatusRowTitle = - this.getExpectedReceiverStatusRowTitle( - organizationName, - receiverName, - successRate, - ); - - await expect(receiversStatusRows).toHaveCount(this.timePeriodData.length); - - await this.updateFilters({ - receiverName, - }); - - await expect(receiversStatusRows).toHaveCount(1); - await expect(expectedReceiverStatusRow).toBeVisible(); - await expect(expectedReceiverStatusRow.title).toHaveText(expectedReceiverStatusRowTitle); - - await this.resetFilters(); - - await expect(receiversStatusRows).toHaveCount(this.timePeriodData.length); - - return true; - } - - async testReceiverMessage() { - // get first entry's result from all-fail receiver's first day -> third time period - const receiverI = 0; - const dayI = 0; - const timePeriodI = 2; - const entryI = 0; - const {days} = this.timePeriodData[receiverI]; - const {connectionCheckResult} = days[dayI].timePeriods[timePeriodI].entries[entryI]; - - const receiversStatusRows = this.receiverStatusRowsLocator; - - await this.updateFilters({ - resultMessage: connectionCheckResult, - }); - - for (const [i, {days}] of this.timePeriodData.entries()) { - const isRowExpected = i === receiverI; - const row = receiversStatusRows.nthCustom(i); - - for (const [i, {timePeriods}] of days.entries()) { - const isDayExpected = isRowExpected && i === dayI; - const rowDay = row.days.nthCustom(i); - - for (const [i] of timePeriods.entries()) { - const isTimePeriodExpected = isDayExpected && i === timePeriodI; - const expectedClass = !isTimePeriodExpected - ? /success-result-hidden/ - : /^((?!success-result-hidden).)*$/; - const rowDayTimePeriod = rowDay.timePeriods.nth(i); - - await expect(rowDayTimePeriod).toBeVisible(); - await expect(rowDayTimePeriod).toHaveClass(expectedClass); - } - } - } - - await this.resetFilters(); - - await this.testReceiverStatusDisplay(); - - return true; - } - - async testReceiverOrgLinks(isSmoke = false) { - const rows = this.receiverStatusRowsLocator; - - for (const [i, { organizationName }] of this.timePeriodData.entries()) { - const row = rows.nthCustom(i); - - const link = row.title.getByRole("link", { name: organizationName, exact: true }).first(); - const expectedUrl = this.getExpectedStatusOrganizationUrl(i); - await expect(link).toBeVisible(); - const p = this.page.route( - `/api/settings/organizations/${organizationName}`, - (route) => - route.fulfill({ - json: { - description: "fake", - filters: [], - name: organizationName, - jurisdiction: "fake", - version: 0, - createdAt: "", - createdBy: "", - } satisfies RSOrganizationSettings, - }), - ); - await link.click(); - await expect(this.page).toHaveURL(expectedUrl); - await p; - await this.page.goBack(); - - if (isSmoke && i === 0) { - break; - } - } - - return true; - } - - async testReceiverTimePeriodModals(isSmoke = false) { - const overlay = this.filterFormInputs.dateRange.modalOverlay; - - for (const [i, { days }] of this.timePeriodData.entries()) { - const { days: daysLoc } = this.receiverStatusRowsLocator.nthCustom(i); - - for (const [dayI, day] of days.entries()) { - for (const [i, { successRateType, entries }] of day.timePeriods.entries()) { - // only first entry in time period is currently displayed - const { - organizationName, - organizationId, - receiverId, - receiverName, - connectionCheckSuccessful, - connectionCheckStartedAt, - connectionCheckCompletedAt, - connectionCheckResult, - } = entries[0] ?? {}; - const sliceEle = daysLoc.nthCustom(dayI).timePeriods.nth(i); - - const isModalExpectedVisible = successRateType !== SuccessRate.UNDEFINED; - - await sliceEle.click({ force: true }); - await expect(overlay).toBeAttached({ - attached: isModalExpectedVisible, - }); - - if (isModalExpectedVisible) { - const expectedResultText = connectionCheckSuccessful ? "success" : "failed"; - const expectedModalText = `Results for connection verification checkOrg:${organizationName} (id: ${organizationId})Receiver:${receiverName} (id: ${receiverId})Result:${expectedResultText}Started At:${formatDate(connectionCheckStartedAt)}${connectionCheckStartedAt.toISOString()}Time to complete:${durationFormatShort(connectionCheckCompletedAt, connectionCheckStartedAt)}Result message:${connectionCheckResult}`; - - await expect(overlay).toBeVisible(); - await expect(overlay).toHaveText(expectedModalText); - - await overlay.press("Escape"); - } - } - } - - if (isSmoke && i === 0) { - break; - } - } - - return true; - } - - async testReceiverLinks(isSmoke = false) { - const rows = this.receiverStatusRowsLocator; - - for (const [i, { receiverName }] of this.timePeriodData.entries()) { - const row = rows.nthCustom(i); - - const link = row.title.getByRole("link", { - name: receiverName, - }); - await expect(link).toBeVisible(); - await link.click(); - await expect(this.page).toHaveURL( - this.getExpectedStatusReceiverUrl(i), - ); - await this.page.goBack(); - - if (isSmoke && i === 0) { - break; - } } return true; diff --git a/frontend-react/e2e/pages/authenticated/last-mile-failures.ts b/frontend-react/e2e/pages/authenticated/last-mile-failures.ts index bfc8c1bccea..ab8e38e5f92 100644 --- a/frontend-react/e2e/pages/authenticated/last-mile-failures.ts +++ b/frontend-react/e2e/pages/authenticated/last-mile-failures.ts @@ -1,6 +1,3 @@ -import { expect, Locator } from "@playwright/test"; -import { startOfDay, subDays } from "date-fns"; -import { tableRows } from "../../helpers/utils"; import { MOCK_GET_RESEND, MOCK_GET_SEND_FAILURES } from "../../mocks/lastMilefailures"; import { BasePage, BasePageTestArgs, RouteHandlerFulfillEntry } from "../BasePage"; @@ -9,16 +6,6 @@ export class LastMileFailuresPage extends BasePage { static readonly API_GET_SEND_FAILURES = "/api/adm/getsendfailures?days_to_show=15"; static readonly API_GET_RESEND = "/api/adm/getresend?days_to_show=15"; - readonly filterFormInputs: { - filter: { - input: Locator; - }, - daysToShow: { - input: Locator; - button: Locator - } - }; - constructor(testArgs: BasePageTestArgs) { super( { @@ -32,20 +19,8 @@ export class LastMileFailuresPage extends BasePage { ); this.addMockRouteHandlers([this.createMockGetSendFailuresHandler(), this.createMockGetResendHandler()]); - this.filterFormInputs = { - filter: { - input: this.page.locator("#input_filter") - }, - daysToShow: { - input: this.page.locator("#days_to_show"), - button: this.page.getByRole("button", { - name: "Refresh", - }), - } - } } - createMockGetSendFailuresHandler(): RouteHandlerFulfillEntry { return [ LastMileFailuresPage.API_GET_SEND_FAILURES, @@ -67,38 +42,4 @@ export class LastMileFailuresPage extends BasePage { }, ]; } - - async tableColumnDateTimeInRange( - daysToShow: number, - ) { - let datesInRange = true; - const rowCount = await tableRows(this.page).count(); - const now = new Date(); - const targetFrom = startOfDay(subDays(now, daysToShow)); - - for (let i = 0; i < rowCount; i++) { - const columnValue = await tableRows(this.page).nth(i).locator("td").nth(0).innerText(); - const columnDate = new Date(columnValue); - - if (!(columnDate >= targetFrom)) { - datesInRange = false; - break; - } - } - return datesInRange; - } - - async testReportId( - reportId: string, - ) { - const rowCount = await tableRows(this.page).count(); - - for (let i = 0; i < rowCount; i++) { - const columnValue = await tableRows(this.page).nth(i).locator("td").nth(1).innerText(); - - expect(reportId).toEqual(columnValue); - } - - return true; - } } diff --git a/frontend-react/e2e/spec/all/authenticated/admin/receiver-status-page.spec.ts b/frontend-react/e2e/spec/all/authenticated/admin/receiver-status-page.spec.ts index edba29a56c0..f8f92d2615b 100644 --- a/frontend-react/e2e/spec/all/authenticated/admin/receiver-status-page.spec.ts +++ b/frontend-react/e2e/spec/all/authenticated/admin/receiver-status-page.spec.ts @@ -1,6 +1,10 @@ -import {addDays, endOfDay, startOfDay, subDays} from "date-fns"; -import {AdminReceiverStatusPage} from "../../../../pages/authenticated/admin/receiver-status"; -import {test as baseTest, expect, logins} from "../../../../test"; +import { addDays, endOfDay, startOfDay, subDays } from "date-fns"; +import type { RSOrganizationSettings } from "../../../../../src/config/endpoints/settings"; +import { SuccessRate } from "../../../../../src/pages/admin/receiver-dashboard/utils"; +import { durationFormatShort } from "../../../../../src/utils/DateTimeUtils"; +import { formatDate } from "../../../../../src/utils/misc"; +import { AdminReceiverStatusPage } from "../../../../pages/authenticated/admin/receiver-status"; +import { test as baseTest, expect, logins } from "../../../../test"; export interface AdminReceiverStatusPageFixtures { adminReceiverStatusPage: AdminReceiverStatusPage; @@ -38,29 +42,29 @@ const test = baseTest.extend({ test.describe("Admin Receiver Status Page", () => { test.describe("not authenticated", () => { - test("redirects to login", async ({adminReceiverStatusPage}) => { + test("redirects to login", async ({ adminReceiverStatusPage }) => { await expect(adminReceiverStatusPage.page).toHaveURL("/login"); }); }); test.describe("authenticated receiver", () => { - test.use({storageState: logins.receiver.path}); - test("returns Page Not Found", async ({adminReceiverStatusPage}) => { + test.use({ storageState: logins.receiver.path }); + test("returns Page Not Found", async ({ adminReceiverStatusPage }) => { await expect(adminReceiverStatusPage.page).toHaveTitle(/Page Not Found/); }); }); test.describe("authenticated sender", () => { - test.use({storageState: logins.sender.path}); - test("returns Page Not Found", async ({adminReceiverStatusPage}) => { + test.use({ storageState: logins.sender.path }); + test("returns Page Not Found", async ({ adminReceiverStatusPage }) => { await expect(adminReceiverStatusPage.page).toHaveTitle(/Page Not Found/); }); }); test.describe("authenticated admin", () => { - test.use({storageState: logins.admin.path}); + test.use({ storageState: logins.admin.path }); - test("If there is an error, the error is shown on the page", async ({adminReceiverStatusPage}) => { + test("If there is an error, the error is shown on the page", async ({ adminReceiverStatusPage }) => { adminReceiverStatusPage.mockError = true; await adminReceiverStatusPage.reload(); @@ -70,7 +74,10 @@ test.describe("Admin Receiver Status Page", () => { test.describe("Header", () => { test( "has correct title + heading", - async ({adminReceiverStatusPage}) => { + { + tag: "@smoke", + }, + async ({ adminReceiverStatusPage }) => { await adminReceiverStatusPage.testHeader(); }, ); @@ -80,9 +87,12 @@ test.describe("Admin Receiver Status Page", () => { test.describe("Displays correctly", () => { test.describe( "filters", + { + tag: "@smoke", + }, () => { - test("date range", async ({adminReceiverStatusPage}) => { - const {button, label, modalOverlay, valueDisplay} = + test("date range", async ({ adminReceiverStatusPage }) => { + const { button, label, modalOverlay, valueDisplay } = adminReceiverStatusPage.filterFormInputs.dateRange; await expect(label).toBeVisible(); await expect(button).toBeVisible(); @@ -90,8 +100,8 @@ test.describe("Admin Receiver Status Page", () => { await expect(modalOverlay).toBeHidden(); }); - test("receiver name", async ({adminReceiverStatusPage}) => { - const {input, expectedTooltipText, label, tooltip, expectedDefaultValue} = + test("receiver name", async ({ adminReceiverStatusPage }) => { + const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = adminReceiverStatusPage.filterFormInputs.receiverName; await expect(label).toBeVisible(); await expect(input).toBeVisible(); @@ -103,8 +113,8 @@ test.describe("Admin Receiver Status Page", () => { await expect(tooltip).toHaveText(expectedTooltipText); }); - test("results message", async ({adminReceiverStatusPage}) => { - const {input, expectedTooltipText, label, tooltip, expectedDefaultValue} = + test("results message", async ({ adminReceiverStatusPage }) => { + const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = adminReceiverStatusPage.filterFormInputs.resultMessage; await expect(label).toBeVisible(); await expect(input).toBeVisible(); @@ -116,8 +126,8 @@ test.describe("Admin Receiver Status Page", () => { await expect(tooltip).toHaveText(expectedTooltipText); }); - test("success type", async ({adminReceiverStatusPage}) => { - const {input, expectedTooltipText, label, tooltip, expectedDefaultValue} = + test("success type", async ({ adminReceiverStatusPage }) => { + const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = adminReceiverStatusPage.filterFormInputs.successType; await expect(label).toBeVisible(); await expect(input).toBeVisible(); @@ -133,7 +143,7 @@ test.describe("Admin Receiver Status Page", () => { // Failures here indicate potential misalignment of playwright/browser timezone test.describe("receiver statuses", () => { - test("time periods", async ({adminReceiverStatusPage}) => { + test("time periods", async ({ adminReceiverStatusPage }) => { const result = await adminReceiverStatusPage.testReceiverStatusDisplay(); expect(result).toBe(true); }); @@ -142,8 +152,8 @@ test.describe("Admin Receiver Status Page", () => { test.describe("Footer", () => { test("has footer and explicit scroll to footer and scroll to top", async ({ - adminReceiverStatusPage, - }) => { + adminReceiverStatusPage, + }) => { await adminReceiverStatusPage.testFooter(); }); }); @@ -152,9 +162,12 @@ test.describe("Admin Receiver Status Page", () => { test.describe("filters", () => { test.describe( "date range", + { + tag: "@smoke", + }, () => { - test("works through calendar", async ({adminReceiverStatusPage}) => { - const {valueDisplay} = adminReceiverStatusPage.filterFormInputs.dateRange; + test("works through calendar", async ({ adminReceiverStatusPage }) => { + const { valueDisplay } = adminReceiverStatusPage.filterFormInputs.dateRange; const now = new Date(); const targetFrom = startOfDay(subDays(now, 3)); const targetTo = addDays(endOfDay(now), 1); @@ -175,8 +188,8 @@ test.describe("Admin Receiver Status Page", () => { }); }); - test("works through textboxes", async ({adminReceiverStatusPage}) => { - const {valueDisplay} = adminReceiverStatusPage.filterFormInputs.dateRange; + test("works through textboxes", async ({ adminReceiverStatusPage }) => { + const { valueDisplay } = adminReceiverStatusPage.filterFormInputs.dateRange; await expect(adminReceiverStatusPage.receiverStatusRowsLocator).not.toHaveCount(0); const now = new Date(); const targetFrom = startOfDay(subDays(now, 3)); @@ -229,12 +242,48 @@ test.describe("Admin Receiver Status Page", () => { await expect(receiversStatusRows).toHaveCount(adminReceiverStatusPage.timePeriodData.length); }); - test("result message", async ({adminReceiverStatusPage}) => { - const result = await adminReceiverStatusPage.testReceiverMessage(); - expect(result).toBe(true); + test("result message", async ({ adminReceiverStatusPage }) => { + // get first entry's result from all-fail receiver's first day -> third time period + const receiverI = 0; + const dayI = 0; + const timePeriodI = 2; + const entryI = 0; + const { days } = adminReceiverStatusPage.timePeriodData[receiverI]; + const { connectionCheckResult } = days[dayI].timePeriods[timePeriodI].entries[entryI]; + + const receiversStatusRows = adminReceiverStatusPage.receiverStatusRowsLocator; + + await adminReceiverStatusPage.updateFilters({ + resultMessage: connectionCheckResult, + }); + + for (const [i, { days }] of adminReceiverStatusPage.timePeriodData.entries()) { + const isRowExpected = i === receiverI; + const row = receiversStatusRows.nthCustom(i); + + for (const [i, { timePeriods }] of days.entries()) { + const isDayExpected = isRowExpected && i === dayI; + const rowDay = row.days.nthCustom(i); + + for (const [i] of timePeriods.entries()) { + const isTimePeriodExpected = isDayExpected && i === timePeriodI; + const expectedClass = !isTimePeriodExpected + ? /success-result-hidden/ + : /^((?!success-result-hidden).)*$/; + const rowDayTimePeriod = rowDay.timePeriods.nth(i); + + await expect(rowDayTimePeriod).toBeVisible(); + await expect(rowDayTimePeriod).toHaveClass(expectedClass); + } + } + } + + await adminReceiverStatusPage.resetFilters(); + + await adminReceiverStatusPage.testReceiverStatusDisplay(); }); - test("success type", async ({adminReceiverStatusPage}) => { + test("success type", async ({ adminReceiverStatusPage }) => { const [failRow, , mixedRow] = adminReceiverStatusPage.timePeriodData; const failRowTitle = adminReceiverStatusPage.getExpectedReceiverStatusRowTitle( failRow.organizationName, @@ -272,7 +321,7 @@ test.describe("Admin Receiver Status Page", () => { test.describe("receiver statuses", () => { test.describe("date range length changes", () => { - test("increases", async ({adminReceiverStatusPage}) => { + test("increases", async ({ adminReceiverStatusPage }) => { const rows = adminReceiverStatusPage.receiverStatusRowsLocator; const days = rows.nthCustom(0).days; await expect(rows).not.toHaveCount(0); @@ -287,7 +336,7 @@ test.describe("Admin Receiver Status Page", () => { await expect(days).toHaveCount(4); }); - test("decreases", async ({adminReceiverStatusPage}) => { + test("decreases", async ({ adminReceiverStatusPage }) => { const rows = adminReceiverStatusPage.receiverStatusRowsLocator; const days = rows.nthCustom(0).days; await expect(rows).not.toHaveCount(0); @@ -303,19 +352,96 @@ test.describe("Admin Receiver Status Page", () => { }); }); - test("time period modals", async ({adminReceiverStatusPage}) => { - const result = await adminReceiverStatusPage.testReceiverTimePeriodModals(); - expect(result).toBe(true); + test("time period modals", async ({ adminReceiverStatusPage }) => { + const overlay = adminReceiverStatusPage.filterFormInputs.dateRange.modalOverlay; + for (const [i, { days }] of adminReceiverStatusPage.timePeriodData.entries()) { + const { days: daysLoc } = adminReceiverStatusPage.receiverStatusRowsLocator.nthCustom(i); + + for (const [dayI, day] of days.entries()) { + for (const [i, { successRateType, entries }] of day.timePeriods.entries()) { + // only first entry in time period is currently displayed + const { + organizationName, + organizationId, + receiverId, + receiverName, + connectionCheckSuccessful, + connectionCheckStartedAt, + connectionCheckCompletedAt, + connectionCheckResult, + } = entries[0] ?? {}; + const sliceEle = daysLoc.nthCustom(dayI).timePeriods.nth(i); + + const isModalExpectedVisible = successRateType !== SuccessRate.UNDEFINED; + + await sliceEle.click({ force: true }); + await expect(overlay).toBeAttached({ + attached: isModalExpectedVisible, + }); + + if (isModalExpectedVisible) { + const expectedResultText = connectionCheckSuccessful ? "success" : "failed"; + const expectedModalText = `Results for connection verification checkOrg:${organizationName} (id: ${organizationId})Receiver:${receiverName} (id: ${receiverId})Result:${expectedResultText}Started At:${formatDate(connectionCheckStartedAt)}${connectionCheckStartedAt.toISOString()}Time to complete:${durationFormatShort(connectionCheckCompletedAt, connectionCheckStartedAt)}Result message:${connectionCheckResult}`; + + await expect(overlay).toBeVisible(); + await expect(overlay).toHaveText(expectedModalText); + + await overlay.press("Escape"); + } + } + } + } }); - test("receiver org links", async ({adminReceiverStatusPage}) => { - const result = await adminReceiverStatusPage.testReceiverOrgLinks(); - expect(result).toBe(true); + test("receiver org links", async ({ adminReceiverStatusPage }) => { + const rows = adminReceiverStatusPage.receiverStatusRowsLocator; + + for (const [i, { organizationName }] of adminReceiverStatusPage.timePeriodData.entries()) { + const row = rows.nthCustom(i); + + const link = row.title.getByRole("link", { + name: organizationName, + }); + const expectedUrl = adminReceiverStatusPage.getExpectedStatusOrganizationUrl(i); + await expect(link).toBeVisible(); + const p = adminReceiverStatusPage.page.route( + `api/settings/organizations/${organizationName}`, + (route) => + route.fulfill({ + json: { + description: "fake", + filters: [], + name: organizationName, + jurisdiction: "fake", + version: 0, + createdAt: "", + createdBy: "", + } satisfies RSOrganizationSettings, + }), + ); + await link.click(); + await expect(adminReceiverStatusPage.page).toHaveURL(expectedUrl); + await p; + await adminReceiverStatusPage.page.goBack(); + } }); - test("receiver links", async ({adminReceiverStatusPage}) => { - const result = await adminReceiverStatusPage.testReceiverLinks(); - expect(result).toBe(true); + test("receiver links", async ({ adminReceiverStatusPage }) => { + const rows = adminReceiverStatusPage.receiverStatusRowsLocator; + + for (const [i, { receiverName }] of adminReceiverStatusPage.timePeriodData.entries()) { + const row = rows.nthCustom(i); + + const link = row.title.getByRole("link", { + name: receiverName, + }); + await expect(link).toBeVisible(); + await link.click(); + await expect(adminReceiverStatusPage.page).toHaveURL( + adminReceiverStatusPage.getExpectedStatusReceiverUrl(i), + ); + await adminReceiverStatusPage.page.goBack(); + } }); }); }); diff --git a/frontend-react/e2e/spec/all/authenticated/admin/last-mile-failures-page.spec.ts b/frontend-react/e2e/spec/all/authenticated/last-mile-failures-page.spec.ts similarity index 95% rename from frontend-react/e2e/spec/all/authenticated/admin/last-mile-failures-page.spec.ts rename to frontend-react/e2e/spec/all/authenticated/last-mile-failures-page.spec.ts index ba01d3812c2..df8503376bb 100644 --- a/frontend-react/e2e/spec/all/authenticated/admin/last-mile-failures-page.spec.ts +++ b/frontend-react/e2e/spec/all/authenticated/last-mile-failures-page.spec.ts @@ -1,6 +1,6 @@ -import { tableRows } from "../../../../helpers/utils"; -import { LastMileFailuresPage } from "../../../../pages/authenticated/last-mile-failures"; -import { test as baseTest, expect } from "../../../../test"; +import { tableRows } from "../../../helpers/utils"; +import { LastMileFailuresPage } from "../../../pages/authenticated/last-mile-failures"; +import { test as baseTest, expect } from "../../../test"; export interface LastMileFailuresPageFixtures { lastMileFailuresPage: LastMileFailuresPage; diff --git a/frontend-react/e2e/spec/all/authenticated/admin/message-details-page.spec.ts b/frontend-react/e2e/spec/all/authenticated/message-details-page.spec.ts similarity index 93% rename from frontend-react/e2e/spec/all/authenticated/admin/message-details-page.spec.ts rename to frontend-react/e2e/spec/all/authenticated/message-details-page.spec.ts index 2a101640d8c..916b14b1096 100644 --- a/frontend-react/e2e/spec/all/authenticated/admin/message-details-page.spec.ts +++ b/frontend-react/e2e/spec/all/authenticated/message-details-page.spec.ts @@ -1,12 +1,12 @@ import fs from "node:fs"; -import { parseFileLocation } from "../../../../../src/utils/misc"; -import { tableRows } from "../../../../helpers/utils"; -import { MOCK_GET_MESSAGE } from "../../../../mocks/messages"; -import { MessageDetailsPage } from "../../../../pages/authenticated/message-details"; -import { MessageIDSearchPage } from "../../../../pages/authenticated/message-id-search"; -import { mockGetHistoryReportResponse } from "../../../../pages/authenticated/report-details"; - -import { test as baseTest, expect } from "../../../../test"; +import { parseFileLocation } from "../../../../src/utils/misc"; +import { tableRows } from "../../../helpers/utils"; +import { MOCK_GET_MESSAGE } from "../../../mocks/messages"; +import { MessageDetailsPage } from "../../../pages/authenticated/message-details"; +import { MessageIDSearchPage } from "../../../pages/authenticated/message-id-search"; +import { mockGetHistoryReportResponse } from "../../../pages/authenticated/report-details"; + +import { test as baseTest, expect } from "../../../test"; export interface MessageDetailsPageFixtures { messageDetailsPage: MessageDetailsPage; diff --git a/frontend-react/e2e/spec/all/authenticated/admin/message-id-search-page.spec.ts b/frontend-react/e2e/spec/all/authenticated/message-id-search-page.spec.ts similarity index 94% rename from frontend-react/e2e/spec/all/authenticated/admin/message-id-search-page.spec.ts rename to frontend-react/e2e/spec/all/authenticated/message-id-search-page.spec.ts index 2ac84973da4..9de8e807739 100644 --- a/frontend-react/e2e/spec/all/authenticated/admin/message-id-search-page.spec.ts +++ b/frontend-react/e2e/spec/all/authenticated/message-id-search-page.spec.ts @@ -1,9 +1,9 @@ -import { noData, tableRows } from "../../../../helpers/utils"; -import { MOCK_GET_MESSAGES } from "../../../../mocks/messages"; -import { MessageIDSearchPage } from "../../../../pages/authenticated/message-id-search"; -import { openReportIdDetailPage } from "../../../../pages/authenticated/submission-history"; +import { noData, tableRows } from "../../../helpers/utils"; +import { MOCK_GET_MESSAGES } from "../../../mocks/messages"; +import { MessageIDSearchPage } from "../../../pages/authenticated/message-id-search"; +import { openReportIdDetailPage } from "../../../pages/authenticated/submission-history"; -import { test as baseTest, expect } from "../../../../test"; +import { test as baseTest, expect } from "../../../test"; export interface MessageIDSearchPageFixtures { messageIDSearchPage: MessageIDSearchPage; diff --git a/frontend-react/e2e/spec/all/authenticated/admin/organization-settings-page.spec.ts b/frontend-react/e2e/spec/all/authenticated/organization-settings-page.spec.ts similarity index 81% rename from frontend-react/e2e/spec/all/authenticated/admin/organization-settings-page.spec.ts rename to frontend-react/e2e/spec/all/authenticated/organization-settings-page.spec.ts index ee9773e664c..83ce97b9e2a 100644 --- a/frontend-react/e2e/spec/all/authenticated/admin/organization-settings-page.spec.ts +++ b/frontend-react/e2e/spec/all/authenticated/organization-settings-page.spec.ts @@ -1,10 +1,10 @@ -import {expect} from "@playwright/test"; -import {readFileSync} from "node:fs"; -import {join} from "node:path"; -import {fileURLToPath} from "node:url"; -import {MOCK_GET_ORGANIZATION_SETTINGS_LIST} from "../../../../mocks/organizations"; -import {OrganizationPage} from "../../../../pages/authenticated/organization"; -import {test as baseTest} from "../../../../test"; +import { expect } from "@playwright/test"; +import { readFileSync } from "node:fs"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { MOCK_GET_ORGANIZATION_SETTINGS_LIST } from "../../../mocks/organizations"; +import { OrganizationPage } from "../../../pages/authenticated/organization"; +import { test as baseTest } from "../../../test"; const __dirname = fileURLToPath(import.meta.url); @@ -43,35 +43,35 @@ const test = baseTest.extend({ test.describe("Admin Organization Settings Page", () => { test.describe("not authenticated", () => { - test("redirects to login", async ({organizationPage}) => { + test("redirects to login", async ({ organizationPage }) => { await expect(organizationPage.page).toHaveURL("/login"); }); }); test.describe("authenticated receiver", () => { - test.use({storageState: "e2e/.auth/receiver.json"}); - test("returns Page Not Found", async ({organizationPage}) => { + test.use({ storageState: "e2e/.auth/receiver.json" }); + test("returns Page Not Found", async ({ organizationPage }) => { await expect(organizationPage.page).toHaveTitle(/Page Not Found/); }); }); test.describe("authenticated sender", () => { - test.use({storageState: "e2e/.auth/sender.json"}); - test("returns Page Not Found", async ({organizationPage}) => { + test.use({ storageState: "e2e/.auth/sender.json" }); + test("returns Page Not Found", async ({ organizationPage }) => { await expect(organizationPage.page).toHaveTitle(/Page Not Found/); }); }); test.describe("authenticated admin", () => { - test.use({storageState: "e2e/.auth/admin.json"}); + test.use({ storageState: "e2e/.auth/admin.json" }); test.describe("Header", () => { - test("has correct title + heading", async ({organizationPage}) => { + test("has correct title + heading", async ({ organizationPage }) => { await organizationPage.testHeader(); }); }); - test("If there is an error, the error is shown on the page", async ({organizationPage}) => { + test("If there is an error, the error is shown on the page", async ({ organizationPage }) => { organizationPage.mockError = true; await organizationPage.reload(); await expect(organizationPage.page.getByText("there was an error")).toBeVisible(); @@ -79,8 +79,8 @@ test.describe("Admin Organization Settings Page", () => { test.describe("When there is no error", () => { test("nav contains the 'Admin tools' dropdown with 'Organization Settings' option", async ({ - organizationPage, - }) => { + organizationPage, + }) => { const navItems = organizationPage.page.locator(".usa-nav li"); await expect(navItems).toContainText(["Admin tools"]); @@ -96,12 +96,12 @@ test.describe("Admin Organization Settings Page", () => { await expect(organizationPage.page).toHaveURL("/admin/settings"); }); - test("Has correct title", async ({organizationPage}) => { + test("Has correct title", async ({ organizationPage }) => { await expect(organizationPage.page).toHaveURL(/settings/); await expect(organizationPage.page).toHaveTitle(/Admin-Organizations/); }); - test("Displays data", async ({organizationPage}) => { + test("Displays data", async ({ organizationPage }) => { // Heading with result length await expect( organizationPage.page.getByRole("heading", { @@ -122,12 +122,12 @@ test.describe("Admin Organization Settings Page", () => { const cols = await row.getByRole("cell").allTextContents(); expect(cols).toHaveLength(colHeaders.length); - const {description, jurisdiction, name, stateCode} = + const { description, jurisdiction, name, stateCode } = i === 0 ? MOCK_GET_ORGANIZATION_SETTINGS_LIST[0] : (MOCK_GET_ORGANIZATION_SETTINGS_LIST.find((i) => i.name === cols[0]) ?? { - name: "INVALID", - }); + name: "INVALID", + }); // if first row, we expect column headers. else, the data row matching id (name) // SetEdit is text of buttons in button column const expectedColContents = @@ -141,7 +141,7 @@ test.describe("Admin Organization Settings Page", () => { } }); - test("Create new organization navigation works", async ({organizationPage}) => { + test("Create new organization navigation works", async ({ organizationPage }) => { const link = organizationPage.page.getByRole("link", { name: "Create New Organization", }); @@ -155,7 +155,7 @@ test.describe("Admin Organization Settings Page", () => { expect(organizationPage.page.url()).toContain(expectedUrl); }); - test("Save CSV button downloads a file", async ({organizationPage}) => { + test("Save CSV button downloads a file", async ({ organizationPage }) => { const downloadProm = organizationPage.page.waitForEvent("download"); const saveButton = organizationPage.page.getByRole("button", { name: "Save List to CSV", @@ -165,7 +165,7 @@ test.describe("Admin Organization Settings Page", () => { await saveButton.click(); const download = await downloadProm; - const expectedFile = readFileSync(join(__dirname, "../../../../../mocks/prime-orgs.csv"), { + const expectedFile = readFileSync(join(__dirname, "../../../../mocks/prime-orgs.csv"), { encoding: "utf-8", }); const stream = await download.createReadStream(); @@ -174,9 +174,9 @@ test.describe("Admin Organization Settings Page", () => { expect(download.suggestedFilename()).toBe("prime-orgs.csv"); }); - test("Filtering works", async ({organizationPage}) => { + test("Filtering works", async ({ organizationPage }) => { const table = organizationPage.page.getByRole("table"); - const {description, name, jurisdiction, stateCode} = MOCK_GET_ORGANIZATION_SETTINGS_LIST[2]; + const { description, name, jurisdiction, stateCode } = MOCK_GET_ORGANIZATION_SETTINGS_LIST[2]; const filterBox = organizationPage.page.getByRole("textbox", { name: "Filter:", }); @@ -201,7 +201,7 @@ test.describe("Admin Organization Settings Page", () => { } }); - test('Clicking "Set" updates link label', async ({organizationPage}) => { + test('Clicking "Set" updates link label', async ({ organizationPage }) => { const firstDataRow = organizationPage.page.getByRole("table").getByRole("row").nth(1); const firstDataRowName = (await firstDataRow.getByRole("cell").nth(0).textContent()) ?? "INVALID"; const setButton = firstDataRow.getByRole("button", { @@ -218,7 +218,7 @@ test.describe("Admin Organization Settings Page", () => { await expect(orgLink).toHaveAttribute("href", "/admin/settings"); }); - test("Edit navigation works", async ({organizationPage}) => { + test("Edit navigation works", async ({ organizationPage }) => { const firstDataRow = organizationPage.page.getByRole("table").getByRole("row").nth(1); const firstDataRowName = await firstDataRow.getByRole("cell").nth(0).textContent(); const expectedUrl = `/admin/orgsettings/org/${firstDataRowName}`; @@ -237,7 +237,7 @@ test.describe("Admin Organization Settings Page", () => { }); test.describe("Footer", () => { - test("has footer and explicit scroll to footer and scroll to top", async ({organizationPage}) => { + test("has footer and explicit scroll to footer and scroll to top", async ({ organizationPage }) => { await organizationPage.testFooter(); }); }); diff --git a/frontend-react/e2e/spec/chromium-only/authenticated/daily-data-page-user-flow.spec.ts b/frontend-react/e2e/spec/chromium-only/authenticated/daily-data-page-user-flow.spec.ts index c39aaff902e..5950c5a4314 100644 --- a/frontend-react/e2e/spec/chromium-only/authenticated/daily-data-page-user-flow.spec.ts +++ b/frontend-react/e2e/spec/chromium-only/authenticated/daily-data-page-user-flow.spec.ts @@ -74,8 +74,7 @@ const SMOKE_RECEIVERS = [TEST_ORG_UP_RECEIVER_UP, TEST_ORG_CP_RECEIVER_CP, TEST_ test.describe( "Daily Data page - user flow smoke tests", { - // TODO: Investigate Daily Data page - user flow smoke tests › admin user › ignore org - FULL_ELR receiver › filter › on 'Apply' › clears 'Report ID' - //tag: "@smoke", + tag: "@smoke", }, () => { test.describe("admin user", () => { @@ -207,7 +206,7 @@ test.describe( ); }); - test.skip("clears 'Report ID'", async ({ dailyDataPage }) => { + test("clears 'Report ID'", async ({ dailyDataPage }) => { // Search by Report ID const reportId = await tableDataCellValue(dailyDataPage.page, 0, 0); await searchInput(dailyDataPage.page).fill(reportId); @@ -374,13 +373,11 @@ test.describe( await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" }); }); - test("downloads the file", async ({ dailyDataPage, isMockDisabled }) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, skipping 'downloads the file' test"); - // 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(); + 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(); await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" }); const downloadProm = dailyDataPage.page.waitForEvent("download"); diff --git a/frontend-react/e2e/spec/chromium-only/authenticated/last-mile-failures-page-user-flow.spec.ts b/frontend-react/e2e/spec/chromium-only/authenticated/last-mile-failures-page-user-flow.spec.ts deleted file mode 100644 index e1a09504f79..00000000000 --- a/frontend-react/e2e/spec/chromium-only/authenticated/last-mile-failures-page-user-flow.spec.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { tableRows } from "../../../helpers/utils"; -import { LastMileFailuresPage } from "../../../pages/authenticated/last-mile-failures"; -import { test as baseTest, expect } from "../../../test"; - -export interface LastMileFailuresPageFixtures { - lastMileFailuresPage: LastMileFailuresPage; -} - -const test = baseTest.extend({ - lastMileFailuresPage: async ( - { - page: _page, - isMockDisabled, - adminLogin, - senderLogin, - receiverLogin, - storageState, - frontendWarningsLogPath, - isFrontendWarningsLog, - }, - use, - ) => { - const page = new LastMileFailuresPage({ - page: _page, - isMockDisabled, - adminLogin, - senderLogin, - receiverLogin, - storageState, - frontendWarningsLogPath, - isFrontendWarningsLog, - }); - await page.goto(); - await use(page); - }, -}); - -test.describe("Last Mile Failure page", - { - tag: "@smoke", - }, () => { - test.describe("admin user", () => { - test.use({ storageState: "e2e/.auth/admin.json" }); - - test.describe("'Filter'", () => { - test("table has expected data when filtering by 'ReportId'", async ({ lastMileFailuresPage }) => { - const reportId = await tableRows(lastMileFailuresPage.page).nth(0).locator("td").nth(1).innerText(); - await lastMileFailuresPage.filterFormInputs.filter.input.fill(reportId); - const isReportIdReturned = await lastMileFailuresPage.testReportId( - reportId, - ); - expect(isReportIdReturned).toBe(true); - }); - }); - - test.describe("'Days to show' filter", () => { - test.beforeEach(async ({ lastMileFailuresPage }) => { - await lastMileFailuresPage.filterFormInputs.daysToShow.input.fill("200"); - await lastMileFailuresPage.page.locator(".usa-table tbody").waitFor({ state: "visible" }); - }); - - test("table has correct headers", async ({ lastMileFailuresPage }) => { - await expect(lastMileFailuresPage.page.locator(".column-header-text").nth(0)).toHaveText(/Failed At/); - await expect(lastMileFailuresPage.page.locator(".column-header-text").nth(1)).toHaveText(/ReportId/); - await expect(lastMileFailuresPage.page.locator(".column-header-text").nth(2)).toHaveText(/Receiver/); - }); - - test("table column 'Failed At' has expected data", async ({ lastMileFailuresPage, isMockDisabled }) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, test"); - const areDatesInRange = await lastMileFailuresPage.tableColumnDateTimeInRange( - 200, - ); - expect(areDatesInRange).toBe(true); - }); - }); - - test("table column 'ReportId' will open a modal with report details", async ({ lastMileFailuresPage }) => { - const reportId = tableRows(lastMileFailuresPage.page).nth(0).locator("td").nth(1); - const reportIdCell = await reportId.innerText(); - await reportId.click(); - - const modal = lastMileFailuresPage.page.getByTestId("modalWindow").nth(0); - await expect(modal).toContainText(`Report ID:${reportIdCell}`); - }); - - test("table column 'Receiver' will open receiver edit page", async ({ lastMileFailuresPage, isMockDisabled }) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, skipping test"); - const receiver = tableRows(lastMileFailuresPage.page).nth(0).locator("td").nth(2); - const receiverCell = await receiver.getByRole("link").innerText(); - await receiver.click(); - - await expect(lastMileFailuresPage.page).toHaveURL( - `/admin/orgreceiversettings/org/${receiverCell}/receiver//action/edit`, - ); - }); - }); - }, -); diff --git a/frontend-react/e2e/spec/chromium-only/authenticated/receiver-status-page-user-flow.spec.ts b/frontend-react/e2e/spec/chromium-only/authenticated/receiver-status-page-user-flow.spec.ts deleted file mode 100644 index 8cb59f03528..00000000000 --- a/frontend-react/e2e/spec/chromium-only/authenticated/receiver-status-page-user-flow.spec.ts +++ /dev/null @@ -1,339 +0,0 @@ -import { addDays, endOfDay, startOfDay, subDays } from "date-fns"; -import { AdminReceiverStatusPage } from "../../../pages/authenticated/admin/receiver-status"; -import { test as baseTest, expect, logins } from "../../../test"; - -export interface AdminReceiverStatusPageFixtures { - adminReceiverStatusPage: AdminReceiverStatusPage; -} - -const test = baseTest.extend({ - adminReceiverStatusPage: async ( - { - page: _page, - isMockDisabled, - adminLogin, - senderLogin, - receiverLogin, - storageState, - frontendWarningsLogPath, - isFrontendWarningsLog, - }, - use, - ) => { - const page = new AdminReceiverStatusPage({ - page: _page, - isMockDisabled, - adminLogin, - senderLogin, - receiverLogin, - storageState, - isFrontendWarningsLog, - frontendWarningsLogPath, - isTestOrg: true, - }); - await page.goto(); - await use(page); - }, -}); - -test.describe("Admin Receiver Status Page", - { - // TODO: Investigate Admin Receiver Status Page › functions correctly › receiver statuses › time period modals - // tag: "@smoke", - }, () => { - test.use({ storageState: logins.admin.path }); - test.describe("displays correctly", () => { - test.describe("header", () => { - test( - "has correct title + heading", - async ({ adminReceiverStatusPage }) => { - await adminReceiverStatusPage.testHeader(); - }, - ); - }); - - test.describe( - "filters", - () => { - test("date range", async ({ adminReceiverStatusPage }) => { - const { button, label, modalOverlay, valueDisplay } = - adminReceiverStatusPage.filterFormInputs.dateRange; - await expect(label).toBeVisible(); - await expect(button).toBeVisible(); - await expect(valueDisplay).toHaveText(adminReceiverStatusPage.expectedDateRangeLabelText); - await expect(modalOverlay).toBeHidden(); - }); - - test("receiver name", async ({ adminReceiverStatusPage }) => { - const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = - adminReceiverStatusPage.filterFormInputs.receiverName; - await expect(label).toBeVisible(); - await expect(input).toBeVisible(); - await expect(input).toHaveValue(expectedDefaultValue); - - await expect(tooltip).toBeHidden(); - await input.hover(); - await expect(tooltip).toBeVisible(); - await expect(tooltip).toHaveText(expectedTooltipText); - }); - - test("results message", async ({ adminReceiverStatusPage }) => { - const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = - adminReceiverStatusPage.filterFormInputs.resultMessage; - await expect(label).toBeVisible(); - await expect(input).toBeVisible(); - await expect(input).toHaveValue(expectedDefaultValue); - - await expect(tooltip).toBeHidden(); - await input.hover(); - await expect(tooltip).toBeVisible(); - await expect(tooltip).toHaveText(expectedTooltipText); - }); - - test("success type", async ({ adminReceiverStatusPage }) => { - const { input, expectedTooltipText, label, tooltip, expectedDefaultValue } = - adminReceiverStatusPage.filterFormInputs.successType; - await expect(label).toBeVisible(); - await expect(input).toBeVisible(); - await expect(input).toHaveValue(expectedDefaultValue); - - await expect(tooltip).toBeHidden(); - await input.hover(); - await expect(tooltip).toBeVisible(); - await expect(tooltip).toHaveText(expectedTooltipText); - }); - }, - ); - - // Failures here indicate potential misalignment of playwright/browser timezone - test.describe("receiver statuses", () => { - test("time periods", async ({ adminReceiverStatusPage }) => { - const result = await adminReceiverStatusPage.testReceiverStatusDisplay(true); - expect(result).toBe(true); - }); - }); - - test.describe("has footer", () => { - test("has footer and explicit scroll to footer and scroll to top", - async ({ - adminReceiverStatusPage, - }) => { - await adminReceiverStatusPage.testFooter(); - }); - }); - }); - - test.describe("functions correctly", () => { - test.describe("filters", () => { - test.describe( - "date range", - () => { - test("works through calendar", async ({ adminReceiverStatusPage }) => { - const { valueDisplay } = adminReceiverStatusPage.filterFormInputs.dateRange; - const now = new Date(); - const targetFrom = startOfDay(subDays(now, 3)); - const targetTo = addDays(endOfDay(now), 1); - - const reqUrl = await adminReceiverStatusPage.updateFilters({ - dateRange: { - value: [targetFrom, targetTo], - }, - }); - expect(reqUrl).toBeDefined(); - - await expect(valueDisplay).toHaveText( - adminReceiverStatusPage.expectedDateRangeLabelText, - ); - expect(Object.fromEntries(reqUrl!.searchParams.entries())).toMatchObject({ - start_date: targetFrom.toISOString(), - end_date: targetTo.toISOString(), - }); - }); - - test("works through textboxes", async ({ adminReceiverStatusPage }) => { - const { valueDisplay } = adminReceiverStatusPage.filterFormInputs.dateRange; - await expect(adminReceiverStatusPage.receiverStatusRowsLocator).not.toHaveCount(0); - const now = new Date(); - const targetFrom = startOfDay(subDays(now, 3)); - const targetTo = addDays(endOfDay(now), 1); - - const reqUrl = await adminReceiverStatusPage.updateFilters({ - dateRange: { - value: [targetFrom, targetTo], - }, - }); - - expect(reqUrl).toBeDefined(); - - await expect(valueDisplay).toHaveText( - adminReceiverStatusPage.expectedDateRangeLabelText, - ); - expect(Object.fromEntries(reqUrl!.searchParams.entries())).toMatchObject({ - start_date: targetFrom.toISOString(), - end_date: targetTo.toISOString(), - }); - }); - }, - ); - - // TODO: revisit after filters have been fixed per ticket #15737 - test.skip("receiver name", async ({adminReceiverStatusPage, isMockDisabled}) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, skipping 'receiver name' test"); - const {organizationName, receiverName, successRate} = - adminReceiverStatusPage.timePeriodData[1]; - - const receiversStatusRows = adminReceiverStatusPage.receiverStatusRowsLocator; - const defaultReceiversStatusRowsCount = await receiversStatusRows.count(); - const expectedReceiverStatusRow = receiversStatusRows.nthCustom(0); - const expectedReceiverStatusRowTitle = - adminReceiverStatusPage.getExpectedReceiverStatusRowTitle( - organizationName, - receiverName, - successRate, - ); - - expect(defaultReceiversStatusRowsCount).toBe(adminReceiverStatusPage.timePeriodData.length); - - await adminReceiverStatusPage.updateFilters({ - receiverName, - }); - - const receiversStatusRowsCount = await receiversStatusRows.count(); - expect(receiversStatusRowsCount).toBeGreaterThanOrEqual(1); - await expect(expectedReceiverStatusRow).toBeVisible(); - await expect(expectedReceiverStatusRow.title).toHaveText(expectedReceiverStatusRowTitle); - - await adminReceiverStatusPage.resetFilters(); - - expect(defaultReceiversStatusRowsCount).toBe(adminReceiverStatusPage.timePeriodData.length); - }); - - test.skip("result message", async ({adminReceiverStatusPage, isMockDisabled}) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, skipping 'result message' test"); - // get first entry's result from all-fail receiver's first day -> third time period - const receiverI = 0; - const dayI = 0; - const timePeriodI = 2; - const entryI = 0; - const {days} = adminReceiverStatusPage.timePeriodData[receiverI]; - const {connectionCheckResult} = days[dayI].timePeriods[timePeriodI].entries[entryI]; - - const receiversStatusRows = adminReceiverStatusPage.receiverStatusRowsLocator; - - await adminReceiverStatusPage.updateFilters({ - resultMessage: connectionCheckResult, - }); - - for (const [i, {days}] of adminReceiverStatusPage.timePeriodData.entries()) { - const row = receiversStatusRows.nthCustom(i); - - for (const [i, {timePeriods}] of days.entries()) { - const rowDay = row.days.nthCustom(i); - - for (const [i] of timePeriods.entries()) { - const rowDayTimePeriod = rowDay.timePeriods.nth(i); - - await expect(rowDayTimePeriod).toHaveClass(/success-result-hidden/); - } - } - } - - await adminReceiverStatusPage.resetFilters(); - - // TODO: revisit after filters have been fixed per ticket #15737 - // await adminReceiverStatusPage.testReceiverStatusDisplay(); - }); - - test.skip("success type", async ({ adminReceiverStatusPage, isMockDisabled }) => { - test.skip(!isMockDisabled, "Mocks are ENABLED, skipping 'success type' test"); - const [failRow, ,] = adminReceiverStatusPage.timePeriodData; - const failRowTitle = adminReceiverStatusPage.getExpectedReceiverStatusRowTitle( - failRow.organizationName, - failRow.receiverName, - failRow.successRate, - ); - // const mixedRowTitle = adminReceiverStatusPage.getExpectedReceiverStatusRowTitle( - // mixedRow.organizationName, - // mixedRow.receiverName, - // mixedRow.successRate, - // ); - - const receiversStatusRows = adminReceiverStatusPage.receiverStatusRowsLocator; - const defaultReceiversStatusRowsCount = await receiversStatusRows.count(); - const expectedRow = receiversStatusRows.nthCustom(0); - - expect(defaultReceiversStatusRowsCount).toBe(adminReceiverStatusPage.timePeriodData.length); - - await adminReceiverStatusPage.updateFilters({ - successType: "ALL_FAILURE", - }); - let receiversStatusRowsCount = await receiversStatusRows.count(); - - expect(receiversStatusRowsCount).toBeGreaterThanOrEqual(1); - await expect(expectedRow.title).toHaveText(failRowTitle); - - await adminReceiverStatusPage.updateFilters({ - successType: "MIXED_SUCCESS", - }); - receiversStatusRowsCount = await receiversStatusRows.count(); - expect(receiversStatusRowsCount).toBeGreaterThanOrEqual(1); - // TODO: revisit after filters have been fixed per ticket #15737 - // await expect(expectedRow.title).toHaveText(mixedRowTitle); - - // await adminReceiverStatusPage.resetFilters(); - // receiversStatusRowsCount = await receiversStatusRows.count(); - // - // expect(receiversStatusRowsCount).toBe(defaultReceiversStatusRowsCount); - }); - }); - - test.describe("receiver statuses", () => { - test.describe("date range length changes", () => { - test("increases", async ({ adminReceiverStatusPage }) => { - const rows = adminReceiverStatusPage.receiverStatusRowsLocator; - const days = rows.nthCustom(0).days; - await expect(rows).not.toHaveCount(0); - const now = new Date(); - const targetFrom = startOfDay(subDays(now, 3)); - const targetTo = endOfDay(now); - await adminReceiverStatusPage.updateFilters({ - dateRange: { - value: [targetFrom, targetTo], - }, - }); - await expect(days).toHaveCount(4); - }); - - test("decreases", async ({ adminReceiverStatusPage }) => { - const rows = adminReceiverStatusPage.receiverStatusRowsLocator; - const days = rows.nthCustom(0).days; - await expect(rows).not.toHaveCount(0); - const now = new Date(); - const targetFrom = startOfDay(subDays(now, 1)); - const targetTo = endOfDay(now); - await adminReceiverStatusPage.updateFilters({ - dateRange: { - value: [targetFrom, targetTo], - }, - }); - await expect(days).toHaveCount(2); - }); - }); - - test.skip("time period modals", async ({ adminReceiverStatusPage }) => { - const result = await adminReceiverStatusPage.testReceiverTimePeriodModals(true); - expect(result).toBe(true); - }); - - test("receiver org links", async ({ adminReceiverStatusPage }) => { - const result = await adminReceiverStatusPage.testReceiverOrgLinks(true); - expect(result).toBe(true); - }); - - test("receiver links", async ({ adminReceiverStatusPage }) => { - const result = await adminReceiverStatusPage.testReceiverLinks(true); - expect(result).toBe(true); - }); - }); - }); - }); diff --git a/frontend-react/package.json b/frontend-react/package.json index 74e016d89d4..620f0fe9663 100644 --- a/frontend-react/package.json +++ b/frontend-react/package.json @@ -5,16 +5,16 @@ "type": "module", "npmClient": "yarn", "dependencies": { - "@microsoft/applicationinsights-react-js": "^17.3.2", - "@microsoft/applicationinsights-web": "^3.3.2", + "@microsoft/applicationinsights-react-js": "^17.3.1", + "@microsoft/applicationinsights-web": "^3.3.1", "@okta/okta-react": "^6.9.0", - "@okta/okta-signin-widget": "^7.23.0", + "@okta/okta-signin-widget": "^7.21.2", "@rest-hooks/rest": "^3.0.3", - "@tanstack/react-query": "^5.55.4", - "@tanstack/react-query-devtools": "^5.55.4", - "@trussworks/react-uswds": "^9.1.0", + "@tanstack/react-query": "^5.51.23", + "@tanstack/react-query-devtools": "^5.51.23", + "@trussworks/react-uswds": "^9.0.0", "@uswds/uswds": "3.7.1", - "axios": "^1.7.7", + "axios": "^1.7.5", "classnames": "^2.5.1", "date-fns": "^3.6.0", "date-fns-tz": "^3.1.3", @@ -32,15 +32,15 @@ "react-loader-spinner": "^6.1.6", "react-markdown": "^9.0.1", "react-query-kit": "^3.3.0", - "react-router": "^6.26.1", - "react-router-dom": "^6.26.1", + "react-router": "^6.25.1", + "react-router-dom": "^6.25.1", "react-scroll-sync": "^0.11.2", "react-toastify": "^10.0.5", "rehype-raw": "^7.0.0", "rehype-slug": "^5.1.0", "rest-hooks": "^6.1.7", "sanitize-html": "^2.13.0", - "tsx": "^4.19.0", + "tsx": "^4.17.0", "use-deep-compare-effect": "^1.8.1", "uuid": "^10.0.0", "web-vitals": "^3.4.0" @@ -111,7 +111,7 @@ "devDependencies": { "@mdx-js/react": "^3.0.1", "@mdx-js/rollup": "^3.0.1", - "@playwright/test": "^1.47.0", + "@playwright/test": "^1.46.1", "@rest-hooks/test": "^7.3.1", "@storybook/addon-a11y": "^8.2.9", "@storybook/addon-actions": "^8.2.9", @@ -127,8 +127,8 @@ "@storybook/testing-library": "^0.2.2", "@storybook/theming": "^8.2.9", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.5.0", - "@testing-library/react": "^16.0.1", + "@testing-library/jest-dom": "^6.4.8", + "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@types/dompurify": "^3.0.5", "@types/dotenv-flow": "^3.3.3", @@ -138,16 +138,16 @@ "@types/lodash": "^4.17.7", "@types/mdx": "^2.0.13", "@types/node": "^20.12.5", - "@types/react": "18.3.5", + "@types/react": "18.3.3", "@types/react-dom": "^18.3.0", "@types/react-router-dom": "^5.3.3", "@types/react-scroll-sync": "^0.9.0", - "@types/sanitize-html": "^2.13.0", + "@types/sanitize-html": "^2.11.0", "@typescript-eslint/eslint-plugin": "^7.17.0", "@typescript-eslint/parser": "^7.17.0", "@vitejs/plugin-react": "^4.3.1", - "@vitest/coverage-istanbul": "^2.0.5", - "@vitest/ui": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.4", + "@vitest/ui": "^2.0.4", "autoprefixer": "^10.4.20", "browserslist": "^4.23.3", "browserslist-useragent-regexp": "^4.1.3", @@ -168,34 +168,34 @@ "eslint-plugin-testing-library": "^6.3.0", "eslint-plugin-vitest": "^0.5.4", "husky": "^9.1.5", - "jsdom": "^25.0.0", - "lint-staged": "^15.2.10", + "jsdom": "^24.1.1", + "lint-staged": "^15.2.9", "mockdate": "^3.0.5", "msw": "^2.3.5", "msw-storybook-addon": "beta", "npm-run-all": "^4.1.5", "otpauth": "^9.3.2", "patch-package": "^8.0.0", - "postcss": "^8.4.45", + "postcss": "^8.4.41", "prettier": "^3.3.3", "react-error-boundary": "^4.0.13", "remark-frontmatter": "^5.0.0", "remark-mdx-frontmatter": "^5.0.0", "remark-mdx-toc": "^0.3.1", - "sass": "^1.78.0", + "sass": "^1.77.8", "storybook": "^8.2.9", "storybook-addon-remix-react-router": "^3.0.0", "ts-node": "^10.9.2", "tslib": "^2.6.3", "typescript": "^5.5.4", "undici": "^6.19.8", - "vite": "^5.4.3", - "vite-plugin-checker": "^0.8.0", + "vite": "^5.3.4", + "vite-plugin-checker": "^0.7.2", "vite-plugin-svgr": "^4.2.0", - "vitest": "^2.0.5" + "vitest": "^2.0.4" }, "resolutions": { - "@types/react": "18.3.5" + "@types/react": "18.3.3" }, "engines": { "node": "^20.15" diff --git a/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.5.pdf b/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.5.pdf new file mode 100644 index 00000000000..b3e0b02b6f1 Binary files /dev/null and b/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.5.pdf differ diff --git a/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.6.pdf b/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.6.pdf deleted file mode 100644 index 54b3b06920c..00000000000 Binary files a/frontend-react/public/assets/pdf/ReportStream-Programmers-Guide-v4.6.pdf and /dev/null differ diff --git a/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx b/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx index 3abd44e560f..7cd01d52882 100644 --- a/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx +++ b/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx @@ -17,7 +17,7 @@ import Sidenav from "../Sidenav.mdx";

ReportStream responds to each API call with a response (JSON formatted) about the disposition of your data.

-

Last updated: 9/9/24

+

Last updated: 6/24/24

*** @@ -52,9 +52,11 @@ 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 using your existing private/public key pair. +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. -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 diff --git a/frontend-react/src/content/developer-resources/reportstream-api/documentation/SamplePayloadsAndOutput.mdx b/frontend-react/src/content/developer-resources/reportstream-api/documentation/SamplePayloadsAndOutput.mdx index de160a051be..9c8c69d4cc3 100644 --- a/frontend-react/src/content/developer-resources/reportstream-api/documentation/SamplePayloadsAndOutput.mdx +++ b/frontend-react/src/content/developer-resources/reportstream-api/documentation/SamplePayloadsAndOutput.mdx @@ -16,7 +16,7 @@ import site from "../../../site.json"; # Sample payloads and output -

Last updated: 9/9/24

+

Last updated: 6/24/24

*** diff --git a/frontend-react/src/content/developer-resources/reportstream-api/getting-started/GettingStarted.mdx b/frontend-react/src/content/developer-resources/reportstream-api/getting-started/GettingStarted.mdx index bdc0f1fc993..3ee2e505c05 100644 --- a/frontend-react/src/content/developer-resources/reportstream-api/getting-started/GettingStarted.mdx +++ b/frontend-react/src/content/developer-resources/reportstream-api/getting-started/GettingStarted.mdx @@ -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. -

**Last updated:** 9/9/24

+

**Last updated:** 6/24/24

*** diff --git a/frontend-react/src/content/site.json b/frontend-react/src/content/site.json index 77485c73e4d..38654e3249a 100644 --- a/frontend-react/src/content/site.json +++ b/frontend-react/src/content/site.json @@ -48,7 +48,7 @@ "path": "/assets/csv/ReportStream-StandardCSV-ExampleData-20220509.csv" }, "programmersGuidePdf": { - "path": "/assets/pdf/ReportStream-Programmers-Guide-v4.6.pdf" + "path": "/assets/pdf/ReportStream-Programmers-Guide-v4.5.pdf" }, "exampleHl7": { "path": "/assets/hl7/Example-hl7-file.hl7" diff --git a/frontend-react/yarn.lock b/frontend-react/yarn.lock index 262a13d07be..8c9e38e5ff8 100644 --- a/frontend-react/yarn.lock +++ b/frontend-react/yarn.lock @@ -2164,118 +2164,118 @@ __metadata: languageName: node linkType: hard -"@microsoft/applicationinsights-analytics-js@npm:3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-analytics-js@npm:3.3.2" +"@microsoft/applicationinsights-analytics-js@npm:3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-analytics-js@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: f36f555b4d8937a63014ef28f5c09cf5e7c9f35f2e10a702edb926ba135c7b71eefd796d15400b1841f99e3625879580608081b50cb031264566a29ad4b94492 + tslib: "*" + checksum: e5c34f3cbafdd81a2e5ff87922d3b80754b41dccc50359ee407b4af70cba8e4ed57476f12a87364c7fbef33953ffe9bacdaf70c0e03eeb2a4fc3f447cb39f7ab languageName: node linkType: hard -"@microsoft/applicationinsights-cfgsync-js@npm:3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-cfgsync-js@npm:3.3.2" +"@microsoft/applicationinsights-cfgsync-js@npm:3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-cfgsync-js@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-async": ">= 0.5.2 < 2.x" "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: 81709fd0f4a15fc465bb22857e996a7474a8e49ddf9d2fe8cd7651c7d6dfdd3fe6b226f79ca334c73dbfb9df1fbd33602fe401a6daf56ccbd1c41b153b51a334 + tslib: "*" + checksum: eab8ba79732bceeba93f5888006a23321e33cf46c9c30c77ab325782f1e0b3621c9851ac6a7d0813398ff16a62833b6812fd0caccdb36760700f34fdaf09f463 languageName: node linkType: hard -"@microsoft/applicationinsights-channel-js@npm:3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-channel-js@npm:3.3.2" +"@microsoft/applicationinsights-channel-js@npm:3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-channel-js@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-async": ">= 0.5.2 < 2.x" "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: af2d5703c9beb9d20ebb87c277b028b3a0a90e0c135d37ad21697a963504066914cfc3160be35b58570c75d40dddc23b4cc85f708a9936c102bea79801b35936 + tslib: "*" + checksum: 880bec408d65620e1585996a1f78119114ed14e12fa81277f9c70799065d7f4471a1e771c498b3ff0cee009edd3559412ac45eb73099168092d013bf49481cdc languageName: node linkType: hard -"@microsoft/applicationinsights-common@npm:3.3.2, @microsoft/applicationinsights-common@npm:^3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-common@npm:3.3.2" +"@microsoft/applicationinsights-common@npm:3.3.1, @microsoft/applicationinsights-common@npm:^3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-common@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: ae459e7301244251a7e9a3e3cd51715848bfabf1fdcfe269d8bed19eb6d92819b3cf915be0423215e8c676a650b2c48e167e6870860ac70540e7a137654b1a64 + tslib: "*" + checksum: 3d2762807812f3dacc4675bce8ecad529d41d4990f4be3e1123047797bfcd42d8fa69b551ae722fbc5e1d42feb3ac62a17ca0f9cb047ff219154072aa5050c23 languageName: node linkType: hard -"@microsoft/applicationinsights-core-js@npm:3.3.2, @microsoft/applicationinsights-core-js@npm:^3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-core-js@npm:3.3.2" +"@microsoft/applicationinsights-core-js@npm:3.3.1, @microsoft/applicationinsights-core-js@npm:^3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-core-js@npm:3.3.1" dependencies: "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-async": ">= 0.5.2 < 2.x" "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: f3cedb3e79d4e5ceac42ee3cf089dc7810fed734901d2108cdfa47375a3c7d26ff282c535909a4bd87761ed0e623310c8c0e87c4142de32ab129161eff4eb53e + tslib: "*" + checksum: e51dca60df15e576321c1a9aeea70357d7eb29b3ed08c5f361a3919f5100fa4736b8778397ee0995c2683f988d38fc7e45b6b0943cda1e799cbffb852477624f languageName: node linkType: hard -"@microsoft/applicationinsights-dependencies-js@npm:3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-dependencies-js@npm:3.3.2" +"@microsoft/applicationinsights-dependencies-js@npm:3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-dependencies-js@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-async": ">= 0.5.2 < 2.x" "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: fa915a95b8be6c675c72de5e4435ebd9f8c03bfad0ff4daa2980d7d2ccf4b0592a12bcbfcfa8b95a01349334deaf11c1cea8a9ea0ac2df8c53c8b754726aeef8 + tslib: "*" + checksum: 30cf9882fa3b8fff62b6dd1a1ac27f00b466eac4a22394c284761a56f799857ba1711f1acec33168c1872f42938068a18de9b74c323460fc96d82e72792acadd languageName: node linkType: hard -"@microsoft/applicationinsights-properties-js@npm:3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-properties-js@npm:3.3.2" +"@microsoft/applicationinsights-properties-js@npm:3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-properties-js@npm:3.3.1" dependencies: - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: 0ba90bcfd91311763d6d2046da62efe6654d77b33d49bb1ff1141f4bd0ac204fddd73afa42abd805a979ff4d9d64c5429b3ff0a1f15d699ebc8bee34656b6998 + tslib: "*" + checksum: 5a229fe7920101d2ff118a2e3c3d83b22cb11ba21b86ddcdf46a37f93d4f62dd2ee08a109ff49d3aaa5b922c5b793677b171035d642c8be6421be7e3bb214ae8 languageName: node linkType: hard -"@microsoft/applicationinsights-react-js@npm:^17.3.2": - version: 17.3.2 - resolution: "@microsoft/applicationinsights-react-js@npm:17.3.2" +"@microsoft/applicationinsights-react-js@npm:^17.3.1": + version: 17.3.1 + resolution: "@microsoft/applicationinsights-react-js@npm:17.3.1" dependencies: - "@microsoft/applicationinsights-common": ^3.3.2 - "@microsoft/applicationinsights-core-js": ^3.3.2 + "@microsoft/applicationinsights-common": ^3.3.1 + "@microsoft/applicationinsights-core-js": ^3.3.1 "@microsoft/applicationinsights-shims": ^3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-utils": ">= 0.11.3 < 2.x" @@ -2283,7 +2283,7 @@ __metadata: history: ">= 4.10.1" react: ">= 17.0.1" tslib: "*" - checksum: b5c128c5c1fcf46b64ca15184f9ced77bc83ff3e93255acce7ae8a13fc4ed83e6422c4d5181825fb90a9c0f476f1a89cf540af346f5dd1266c8937e2e873a012 + checksum: 954b2fb18d0b0e2d78f082236a42f2b9b830e1c4b251c9328ef633ff0561db34a17c6e958c68b534c5c5cc2393466a96d737d8d7c8497f222d763f1276d016e9 languageName: node linkType: hard @@ -2296,24 +2296,24 @@ __metadata: languageName: node linkType: hard -"@microsoft/applicationinsights-web@npm:^3.3.2": - version: 3.3.2 - resolution: "@microsoft/applicationinsights-web@npm:3.3.2" - dependencies: - "@microsoft/applicationinsights-analytics-js": 3.3.2 - "@microsoft/applicationinsights-cfgsync-js": 3.3.2 - "@microsoft/applicationinsights-channel-js": 3.3.2 - "@microsoft/applicationinsights-common": 3.3.2 - "@microsoft/applicationinsights-core-js": 3.3.2 - "@microsoft/applicationinsights-dependencies-js": 3.3.2 - "@microsoft/applicationinsights-properties-js": 3.3.2 +"@microsoft/applicationinsights-web@npm:^3.3.1": + version: 3.3.1 + resolution: "@microsoft/applicationinsights-web@npm:3.3.1" + dependencies: + "@microsoft/applicationinsights-analytics-js": 3.3.1 + "@microsoft/applicationinsights-cfgsync-js": 3.3.1 + "@microsoft/applicationinsights-channel-js": 3.3.1 + "@microsoft/applicationinsights-common": 3.3.1 + "@microsoft/applicationinsights-core-js": 3.3.1 + "@microsoft/applicationinsights-dependencies-js": 3.3.1 + "@microsoft/applicationinsights-properties-js": 3.3.1 "@microsoft/applicationinsights-shims": 3.0.1 "@microsoft/dynamicproto-js": ^2.0.3 "@nevware21/ts-async": ">= 0.5.2 < 2.x" "@nevware21/ts-utils": ">= 0.11.3 < 2.x" peerDependencies: - tslib: ">= 1.0.0" - checksum: fd96bf7509179a73c0e49a6d1fe8fd330e529d7a9b0fa00c3f022a34f5c4e6220aa2cead83596c8f3482b6aa44ef28c28e10a8ad6f3118ffb893f6de28b4c73b + tslib: "*" + checksum: 3371f4b5f2e278ab2bd320a23687abf94587004a751b509c3704e55d638fa6a8c8b42d8bdaac93de4ae94c4be00b655dac4151665c253042260b7bd63d00bd38 languageName: node linkType: hard @@ -2399,9 +2399,9 @@ __metadata: languageName: node linkType: hard -"@okta/okta-auth-js@npm:^7.8.0": - version: 7.8.0 - resolution: "@okta/okta-auth-js@npm:7.8.0" +"@okta/okta-auth-js@npm:^7.7.0": + version: 7.7.0 + resolution: "@okta/okta-auth-js@npm:7.7.0" dependencies: "@babel/runtime": ^7.12.5 "@peculiar/webcrypto": ^1.4.0 @@ -2419,7 +2419,7 @@ __metadata: tiny-emitter: 1.1.0 webcrypto-shim: ^0.1.5 xhr2: 0.1.3 - checksum: faeac22381a46784381e3757c1f5193bb7dc821ea39fdd5d58952dc744cf0a64788e979aa3ce4a2551dd29f6b49e9e7eda756bafc3737386ec4c6d2b3277582c + checksum: 86f091db8131694aa373dc36400dd6a89160cd0efd695c98459bae83a6c68fe615b9fa9083b96ec301c321b7e7efc93a20a5bd9ca43da8117b26be2ba398c492 languageName: node linkType: hard @@ -2438,11 +2438,11 @@ __metadata: languageName: node linkType: hard -"@okta/okta-signin-widget@npm:^7.23.0": - version: 7.23.0 - resolution: "@okta/okta-signin-widget@npm:7.23.0" +"@okta/okta-signin-widget@npm:^7.21.2": + version: 7.21.2 + resolution: "@okta/okta-signin-widget@npm:7.21.2" dependencies: - "@okta/okta-auth-js": ^7.8.0 + "@okta/okta-auth-js": ^7.7.0 "@sindresorhus/to-milliseconds": ^1.0.0 "@types/backbone": ^1.4.15 "@types/eslint-scope": ^3.7.3 @@ -2464,7 +2464,7 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: 5b55d5fc39412778505d262810ab3a87c2bf557a55a59e4f041f77393b6344e35a96477603a40e80cae325f0bd534aa61c95f0b154b659e647b35e55346d4b90 + checksum: ac78f2055248aff5d09a50bbe086023cc1aee0b6c10f84e80eeac2488dfbd6e5647b10abb8b65b60a80c754159d50c828ae11a6769e255df588fc7b8b681fd19 languageName: node linkType: hard @@ -2532,14 +2532,14 @@ __metadata: languageName: node linkType: hard -"@playwright/test@npm:^1.47.0": - version: 1.47.0 - resolution: "@playwright/test@npm:1.47.0" +"@playwright/test@npm:^1.46.1": + version: 1.46.1 + resolution: "@playwright/test@npm:1.46.1" dependencies: - playwright: 1.47.0 + playwright: 1.46.1 bin: playwright: cli.js - checksum: 4f5a921c57d2577c64b0bc03d4b97937a6f853eee6afb58f2fc8fb140147b7f33800afe490c9ba3af515d5feb104f65319663931ec1ee75e10f001c1d69b138c + checksum: 180d90c6421ee6a8c00a1ae65d91d5f69767e2de95c3f5582ac2bdf3a388e621fdd3ee00ecb7836db427bb0d4cee58111c14f133cb62150357d8e4f43e3e2295 languageName: node linkType: hard @@ -2550,10 +2550,10 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.19.1": - version: 1.19.1 - resolution: "@remix-run/router@npm:1.19.1" - checksum: ebe4474ba0c1046093976b48a4eb4e39bd2f47368aacea21400126d72e133d2cfbfb50254cf1bde0b66dacdf0344452f743049d1595a22e86130668f60112376 +"@remix-run/router@npm:1.18.0": + version: 1.18.0 + resolution: "@remix-run/router@npm:1.18.0" + checksum: dad8e8cbd3b44503c89de0fc5d8f92954d04c00bf36b42a18ae8b03fe0783742a99d0cae36f2962db38e2bdba3d40259105202c69620943e88f81711ceeb8fe4 languageName: node linkType: hard @@ -2663,13 +2663,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.2" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - "@rollup/rollup-android-arm64@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-android-arm64@npm:4.13.0" @@ -2677,13 +2670,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-android-arm64@npm:4.21.2" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-darwin-arm64@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.13.0" @@ -2691,13 +2677,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-darwin-arm64@npm:4.21.2" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-darwin-x64@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-darwin-x64@npm:4.13.0" @@ -2705,13 +2684,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-darwin-x64@npm:4.21.2" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0" @@ -2719,20 +2691,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.2" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.2" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - "@rollup/rollup-linux-arm64-gnu@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.13.0" @@ -2740,13 +2698,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.2" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-arm64-musl@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.13.0" @@ -2754,20 +2705,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.2" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.2" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-riscv64-gnu@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.13.0" @@ -2775,20 +2712,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.2" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.2" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-x64-gnu@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.13.0" @@ -2796,13 +2719,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.2" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-x64-musl@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.13.0" @@ -2810,13 +2726,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.2" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@rollup/rollup-win32-arm64-msvc@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.13.0" @@ -2824,13 +2733,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.2" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-win32-ia32-msvc@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.13.0" @@ -2838,13 +2740,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.2" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@rollup/rollup-win32-x64-msvc@npm:4.13.0": version: 4.13.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.13.0" @@ -2852,13 +2747,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.21.2": - version: 4.21.2 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.2" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@selderee/plugin-htmlparser2@npm:^0.11.0": version: 0.11.0 resolution: "@selderee/plugin-htmlparser2@npm:0.11.0" @@ -3511,40 +3399,40 @@ __metadata: languageName: node linkType: hard -"@tanstack/query-core@npm:5.55.4": - version: 5.55.4 - resolution: "@tanstack/query-core@npm:5.55.4" - checksum: f20fc8dbd7484b38aa010bd51a381f185691589373ebb41b9fe22c24492d8537a9eaaf6bf273cb781f2dfd65021f4fc984d4104a92a34c911df706b2bd1bdb8c +"@tanstack/query-core@npm:5.51.21": + version: 5.51.21 + resolution: "@tanstack/query-core@npm:5.51.21" + checksum: a602e70bfbfa1fa28333be8c1b9ac9c9b97937b236d3997a757079ae04086fe59c2688cb6406fd82dcf9ef07f73e7a4ba1d373040f6cad340e1f64bceafe0e07 languageName: node linkType: hard -"@tanstack/query-devtools@npm:5.55.1": - version: 5.55.1 - resolution: "@tanstack/query-devtools@npm:5.55.1" - checksum: f1a4fba14f512b3250536703e2363712ac942ffb7712aa694988b8df75c04b52f0ac75fcf90c85abb6974ef422e64ad27f9e0ff07a06854ae02ba1ce4cbdd1d1 +"@tanstack/query-devtools@npm:5.51.16": + version: 5.51.16 + resolution: "@tanstack/query-devtools@npm:5.51.16" + checksum: 77ffcfc693b32d640144ccdcc51da3d7ecd7ac43ae0d1665465da701fce77f90c606fc6863ecf34ab375d0ce3c3dab5b4c9c66c889e4d35fa6bd1decf7f8a096 languageName: node linkType: hard -"@tanstack/react-query-devtools@npm:^5.55.4": - version: 5.55.4 - resolution: "@tanstack/react-query-devtools@npm:5.55.4" +"@tanstack/react-query-devtools@npm:^5.51.23": + version: 5.51.23 + resolution: "@tanstack/react-query-devtools@npm:5.51.23" dependencies: - "@tanstack/query-devtools": 5.55.1 + "@tanstack/query-devtools": 5.51.16 peerDependencies: - "@tanstack/react-query": ^5.55.4 + "@tanstack/react-query": ^5.51.23 react: ^18 || ^19 - checksum: 264f70d5b1796d2e2e73fc177c21fcb298e345e0e6be82d242722f31e19e04c9908614d63ae5095027c8b81804f4a3b74a73805a8f2471e239b988ea74f4c44f + checksum: 4551cf800ff0fa83174130b885f68dacbddd451d4a68b4b6652e55be7a9989a0c27a21f2acab9c144e29cf86d927736514ac5b1fc648225ac3b40d7c478e0035 languageName: node linkType: hard -"@tanstack/react-query@npm:^5.55.4": - version: 5.55.4 - resolution: "@tanstack/react-query@npm:5.55.4" +"@tanstack/react-query@npm:^5.51.23": + version: 5.51.23 + resolution: "@tanstack/react-query@npm:5.51.23" dependencies: - "@tanstack/query-core": 5.55.4 + "@tanstack/query-core": 5.51.21 peerDependencies: - react: ^18 || ^19 - checksum: 26e4ecc0950f2d9a1c0d527dbe736827ae63bcb12e688b442083507235a48abf3bf9fc247ee730820b0d1af242d7b516ed9de02568a4867b7867c2dd23de3664 + react: ^18.0.0 + checksum: d1d8131232430635923694befff9bdabc8d18ca2392789456a28191020d489671577e02ee5b0107e0064fea981c74c99cea3077a4e34cc1ac7438175bd50effe languageName: node linkType: hard @@ -3629,18 +3517,19 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.5.0": - version: 6.5.0 - resolution: "@testing-library/jest-dom@npm:6.5.0" +"@testing-library/jest-dom@npm:^6.4.8": + version: 6.4.8 + resolution: "@testing-library/jest-dom@npm:6.4.8" dependencies: "@adobe/css-tools": ^4.4.0 + "@babel/runtime": ^7.9.2 aria-query: ^5.0.0 chalk: ^3.0.0 css.escape: ^1.5.1 dom-accessibility-api: ^0.6.3 lodash: ^4.17.21 redent: ^3.0.0 - checksum: c2d14103ebe3358852ec527ff7512f64207a39932b2f7b6dff7e73ba91296b01a71bad9a9584b6ee010681380a906c1740af50470adc6db660e1c7585d012ebf + checksum: b601688950e522557c2c6bbc0f026ae31a10583577c8a557814b0eb33648fe82afc06299f3cdb79ff0c5076fd1a6106f3d76e2ca0dde6f7ee0555e63008fbd72 languageName: node linkType: hard @@ -3666,9 +3555,9 @@ __metadata: languageName: node linkType: hard -"@testing-library/react@npm:^16.0.1": - version: 16.0.1 - resolution: "@testing-library/react@npm:16.0.1" +"@testing-library/react@npm:^16.0.0": + version: 16.0.0 + resolution: "@testing-library/react@npm:16.0.0" dependencies: "@babel/runtime": ^7.12.5 peerDependencies: @@ -3682,7 +3571,7 @@ __metadata: optional: true "@types/react-dom": optional: true - checksum: 1837db473ea018cf2b5d0cbfffb7a30d0d759e5a7f23aad431441c77bcc3d2533250cd003a61878fd908267df47404cedcb5914f12d79e413002c659652b37fd + checksum: 45a35f0b5f34b5a7f4dcefdd3f1d202d5421692e5cc7a491c9bc71e6ed9dd5872a182b80b4dfefb4a56d9c1df35e50f6fa2917bcf657cc26b4bc0d2259df0027 languageName: node linkType: hard @@ -3702,15 +3591,15 @@ __metadata: languageName: node linkType: hard -"@trussworks/react-uswds@npm:^9.1.0": - version: 9.1.0 - resolution: "@trussworks/react-uswds@npm:9.1.0" +"@trussworks/react-uswds@npm:^9.0.0": + version: 9.0.0 + resolution: "@trussworks/react-uswds@npm:9.0.0" peerDependencies: "@uswds/uswds": ^3.7.1 focus-trap-react: ^10.2.3 react: ^16.x || ^17.x || ^18.x react-dom: ^16.x || ^17.x || ^18.x - checksum: 907613e6bc42d7b304f69e52556ab78b0df86adcb24453cf9616805786e5940a3dbdd55bf6f03270c41dd672cfda1a4fdb9331ff64dd8c7beeecaa578771783c + checksum: 2e2d310c69a6dc2e92d48830537ad1873b45a4f0cfab81ccfa180ec2cae55c4b61153397c4956295dfd2cdad7b8a5156b69eb3c5464b0bba213fc386564c4993 languageName: node linkType: hard @@ -4204,13 +4093,13 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:18.3.5": - version: 18.3.5 - resolution: "@types/react@npm:18.3.5" +"@types/react@npm:18.3.3": + version: 18.3.3 + resolution: "@types/react@npm:18.3.3" dependencies: "@types/prop-types": "*" csstype: ^3.0.2 - checksum: 63d2ff473b348c902b68c20be55d2c5124d078c4336c2d1778f316c27789ed596657e8e714022ce14fb24994b0960fc64c913e629bb0bf85815355b0c31eb46b + checksum: c63d6a78163244e2022b01ef79b0baec4fe4da3475dc4a90bb8accefad35ef0c43560fd0312e5974f92a0f1108aa4d669ac72d73d66396aa060ea03b5d2e3873 languageName: node linkType: hard @@ -4221,12 +4110,12 @@ __metadata: languageName: node linkType: hard -"@types/sanitize-html@npm:^2.13.0": - version: 2.13.0 - resolution: "@types/sanitize-html@npm:2.13.0" +"@types/sanitize-html@npm:^2.11.0": + version: 2.11.0 + resolution: "@types/sanitize-html@npm:2.11.0" dependencies: htmlparser2: ^8.0.0 - checksum: a32c67bdf86048efa8ee5cdc1a68351758bae888956010eea58e694c1f9fc580632d1ce0478d31984559e0b03282d130ffe3e87479838c8da92cf1ac06626edc + checksum: a901d55d31cd946a7fce0130cc7cf6bcf56602af9c87291be77d8149c60e7afc47c83ca74c67c2d84e6ba029fe9bbd6f14f89a8cb30fbd185766eebc5722c251 languageName: node linkType: hard @@ -4609,9 +4498,9 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-istanbul@npm:^2.0.5": - version: 2.0.5 - resolution: "@vitest/coverage-istanbul@npm:2.0.5" +"@vitest/coverage-istanbul@npm:^2.0.4": + version: 2.0.4 + resolution: "@vitest/coverage-istanbul@npm:2.0.4" dependencies: "@istanbuljs/schema": ^0.1.3 debug: ^4.3.5 @@ -4624,8 +4513,8 @@ __metadata: test-exclude: ^7.0.1 tinyrainbow: ^1.2.0 peerDependencies: - vitest: 2.0.5 - checksum: 641e8169d8ca67f1d8cf9d9acf603aa0a23f2066898e542d0fd119f8ae84afb32f0c67dafefd478899f8cd41e2091aa5641042e33b80ad456a7341bec5bc8eeb + vitest: 2.0.4 + checksum: 4438e918427c5970a57978c3bb958c7c40d9e866960ebc0a3427846617befa37098430255525721a7845786ce44ee181e131ee5c02ce557d950d17fbf4bce612 languageName: node linkType: hard @@ -4640,45 +4529,45 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/expect@npm:2.0.5" +"@vitest/expect@npm:2.0.4": + version: 2.0.4 + resolution: "@vitest/expect@npm:2.0.4" dependencies: - "@vitest/spy": 2.0.5 - "@vitest/utils": 2.0.5 + "@vitest/spy": 2.0.4 + "@vitest/utils": 2.0.4 chai: ^5.1.1 tinyrainbow: ^1.2.0 - checksum: 0c65eb24c2fd9ef5735d1e65dc8fee59936e6cab1d6ab24a95e014b8337be5598242fceae4e8ec2974e2ae70a30c1906ad41208bf6de6cdf2043594cdb65e627 + checksum: 6841da3ffa58572c24b3720c84bade5b7293d60905b17b3e2ea28fcecb7c18592851fe84538bfc9995ab3b7681cd3e0fc6913512390ae1564d3fb1de8d9edad8 languageName: node linkType: hard -"@vitest/pretty-format@npm:2.0.5, @vitest/pretty-format@npm:^2.0.5": - version: 2.0.5 - resolution: "@vitest/pretty-format@npm:2.0.5" +"@vitest/pretty-format@npm:2.0.4, @vitest/pretty-format@npm:^2.0.4": + version: 2.0.4 + resolution: "@vitest/pretty-format@npm:2.0.4" dependencies: tinyrainbow: ^1.2.0 - checksum: d60346001180e5bb3c53be4b4d0b6d9352648b066641d5aba7b97d7c97a8e252dc934204d58818330262a65f07127455fc5f3b5f7e3647c60f6ff302a725733b + checksum: a0dbfea5a1379aa1b69ee208116bd88e39edccb7e2f71be56f85868495217b2d8c0284ecba81a6f66f8e78a6d50b9f2c2fc3f3bc2114e909b7b43b96fdee7042 languageName: node linkType: hard -"@vitest/runner@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/runner@npm:2.0.5" +"@vitest/runner@npm:2.0.4": + version: 2.0.4 + resolution: "@vitest/runner@npm:2.0.4" dependencies: - "@vitest/utils": 2.0.5 + "@vitest/utils": 2.0.4 pathe: ^1.1.2 - checksum: 4d6c23ea77ada83d70cb8cfd20b17cd0b9a375bc70b95466acee822734e203952931319abf167abcdba33dca415affed71d98d3f7212e1812dbf81e540fae4a4 + checksum: 313030973a80766de9bed1ed6f4342c5320d9b9dfcf97bc8d61899a41a916e8f5d2aa2ab727023372ad057ca5f95daae3820535f1124e0651814ce7045883414 languageName: node linkType: hard -"@vitest/snapshot@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/snapshot@npm:2.0.5" +"@vitest/snapshot@npm:2.0.4": + version: 2.0.4 + resolution: "@vitest/snapshot@npm:2.0.4" dependencies: - "@vitest/pretty-format": 2.0.5 + "@vitest/pretty-format": 2.0.4 magic-string: ^0.30.10 pathe: ^1.1.2 - checksum: 468d040106aa186a63ff3a86ce6bf333d52de83a2d906dc8c7c5c63406f2ecb46850ac5d69f5838a15764094946963962fa963d64c62a1a8a127ba20496fa3f1 + checksum: af9bd9da387dca25c13d6b8323d9e574ce3be19b7965ef26c427394e07ca7c7d291d3d52e65c90cf2bcafbfe673a70d362c526597150fe4407d5c13f9cf47412 languageName: node linkType: hard @@ -4691,20 +4580,20 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/spy@npm:2.0.5" +"@vitest/spy@npm:2.0.4": + version: 2.0.4 + resolution: "@vitest/spy@npm:2.0.4" dependencies: tinyspy: ^3.0.0 - checksum: a010dec99146832a2586c639fccf533b194482f6f25ffb2d64367598a4e77d094aedd3d82cdb55fc1a3971649577a039513ccf8dc1571492e5982482c530c7b9 + checksum: 097cef445965e4145993f0436007116f5c56da6e02d51f9c7f18c56fb9ae05c045c627b75a34609b4f39901f2f8e9acf54dae94b490db3c4b1656c0e4fbf5847 languageName: node linkType: hard -"@vitest/ui@npm:^2.0.5": - version: 2.0.5 - resolution: "@vitest/ui@npm:2.0.5" +"@vitest/ui@npm:^2.0.4": + version: 2.0.4 + resolution: "@vitest/ui@npm:2.0.4" dependencies: - "@vitest/utils": 2.0.5 + "@vitest/utils": 2.0.4 fast-glob: ^3.3.2 fflate: ^0.8.2 flatted: ^3.3.1 @@ -4712,8 +4601,8 @@ __metadata: sirv: ^2.0.4 tinyrainbow: ^1.2.0 peerDependencies: - vitest: 2.0.5 - checksum: a1c0e5484279189e0e0d2b93809932a6fa971224b1677f069d8071c2b953853a11b01eb56009f51ca7a53e61d51f0f1d0a688ba06166533c868f43f41bf96673 + vitest: 2.0.4 + checksum: 60a9db849662de4fac8109afc02616b235880751432d22b4b9e9a75f75bde1062ecb311ebc7aecb3d47924168a6ed19997deaa2ccf734906316ff108bd102da7 languageName: node linkType: hard @@ -4729,15 +4618,15 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/utils@npm:2.0.5" +"@vitest/utils@npm:2.0.4": + version: 2.0.4 + resolution: "@vitest/utils@npm:2.0.4" dependencies: - "@vitest/pretty-format": 2.0.5 + "@vitest/pretty-format": 2.0.4 estree-walker: ^3.0.3 loupe: ^3.1.1 tinyrainbow: ^1.2.0 - checksum: 6867556dd7e376437e454b96c7e596ec16e141fb00b002b6ce435611ab3d9d1e3f38ebf48b1fc49f4c97f9754ed37abb602de8bf122f4ac0de621a4dbe0a314e + checksum: 1f6ce4d80403750e1ed3669de746327cd6626c3a80ba9e30613653521e4c9126d7db5b4ea764a644eb7e933f9fef218816515181deb746c5ed6988c5ea9dde0d languageName: node linkType: hard @@ -5264,14 +5153,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.7.7": - version: 1.7.7 - resolution: "axios@npm:1.7.7" +"axios@npm:^1.7.5": + version: 1.7.5 + resolution: "axios@npm:1.7.5" dependencies: follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 882d4fe0ec694a07c7f5c1f68205eb6dc5a62aecdb632cc7a4a3d0985188ce3030e0b277e1a8260ac3f194d314ae342117660a151fabffdc5081ca0b5a8b47fe + checksum: 2859fe01437cf133eee35571abc1d4b5224bb13e530e66cb3581ca226e170541dd5eef9f46abb41592cee0a2f54930c9e4978354e0cf1064748fc20d9a05e9d5 languageName: node linkType: hard @@ -5368,9 +5257,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" +"body-parser@npm:1.20.2": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: 3.1.2 content-type: ~1.0.5 @@ -5380,11 +5269,11 @@ __metadata: http-errors: 2.0.0 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.13.0 + qs: 6.11.0 raw-body: 2.5.2 type-is: ~1.6.18 unpipe: 1.0.0 - checksum: 1a35c59a6be8d852b00946330141c4f142c6af0f970faa87f10ad74f1ee7118078056706a05ae3093c54dabca9cd3770fa62a170a85801da1a4324f04381167d + checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737 languageName: node linkType: hard @@ -6660,13 +6549,6 @@ __metadata: languageName: node linkType: hard -"encodeurl@npm:~2.0.0": - version: 2.0.0 - resolution: "encodeurl@npm:2.0.0" - checksum: abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe - languageName: node - linkType: hard - "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -7642,41 +7524,41 @@ __metadata: linkType: hard "express@npm:^4.19.2": - version: 4.20.0 - resolution: "express@npm:4.20.0" + version: 4.19.2 + resolution: "express@npm:4.19.2" dependencies: accepts: ~1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.3 + body-parser: 1.20.2 content-disposition: 0.5.4 content-type: ~1.0.4 cookie: 0.6.0 cookie-signature: 1.0.6 debug: 2.6.9 depd: 2.0.0 - encodeurl: ~2.0.0 + encodeurl: ~1.0.2 escape-html: ~1.0.3 etag: ~1.8.1 finalhandler: 1.2.0 fresh: 0.5.2 http-errors: 2.0.0 - merge-descriptors: 1.0.3 + merge-descriptors: 1.0.1 methods: ~1.1.2 on-finished: 2.4.1 parseurl: ~1.3.3 - path-to-regexp: 0.1.10 + path-to-regexp: 0.1.7 proxy-addr: ~2.0.7 qs: 6.11.0 range-parser: ~1.2.1 safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.0 + send: 0.18.0 + serve-static: 1.15.0 setprototypeof: 1.2.0 statuses: 2.0.1 type-is: ~1.6.18 utils-merge: 1.0.1 vary: ~1.1.2 - checksum: faa11bffa16be97b26d9f38187e569378c01cad0b92fbd02094fb4e35a224dc5177cc9cc6849141702da80d2d8cbe857c60a7e622e8106695405dc27e38fb3ee + checksum: 212dbd6c2c222a96a61bc927639c95970a53b06257080bb9e2838adb3bffdb966856551fdad1ab5dd654a217c35db94f987d0aa88d48fb04d306340f5f34dca5 languageName: node linkType: hard @@ -9531,9 +9413,9 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^25.0.0": - version: 25.0.0 - resolution: "jsdom@npm:25.0.0" +"jsdom@npm:^24.1.1": + version: 24.1.1 + resolution: "jsdom@npm:24.1.1" dependencies: cssstyle: ^4.0.1 data-urls: ^5.0.0 @@ -9561,7 +9443,7 @@ __metadata: peerDependenciesMeta: canvas: optional: true - checksum: aa7dc92333f7694c3ddd61685b640f743a61e5e638fcc9c24156e63dc432ab36dbe90137d608c82a3f84d9e05f70c903a38f9e34d6cca1a74469fad4c93f76c2 + checksum: c3f3c9c8f6ac4ce308de6f005980d0f3da4d504686a0fc20c59760f1e3be714d48adf3d31f8d3a352d8adb4961e6cfebfc6b6c3c9841408cf6e7f8c0cd4dcdc4 languageName: node linkType: hard @@ -9779,9 +9661,9 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^15.2.10": - version: 15.2.10 - resolution: "lint-staged@npm:15.2.10" +"lint-staged@npm:^15.2.9": + version: 15.2.9 + resolution: "lint-staged@npm:15.2.9" dependencies: chalk: ~5.3.0 commander: ~12.1.0 @@ -9789,13 +9671,13 @@ __metadata: execa: ~8.0.1 lilconfig: ~3.1.2 listr2: ~8.2.4 - micromatch: ~4.0.8 + micromatch: ~4.0.7 pidtree: ~0.6.0 string-argv: ~0.3.2 yaml: ~2.5.0 bin: lint-staged: bin/lint-staged.js - checksum: 7ab255b848478ca47c6b94aad0e7a3cfe5ba48ae1fb353cfa86635741333b83b1fd793d7cac6d44bf0388ad087d7e0250c7ec0a8ebece63fbcf7a8d175279809 + checksum: 7f804c24d0374b48d26f11a051342141b84c9954f77225bab5ae221b1e4d47a72f722f39b13169267592c28b2614ad39f9722fd86bc4cdfdf93e8601ff66b0e1 languageName: node linkType: hard @@ -10300,10 +10182,10 @@ __metadata: languageName: node linkType: hard -"merge-descriptors@npm:1.0.3": - version: 1.0.3 - resolution: "merge-descriptors@npm:1.0.3" - checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 +"merge-descriptors@npm:1.0.1": + version: 1.0.1 + resolution: "merge-descriptors@npm:1.0.1" + checksum: 5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 languageName: node linkType: hard @@ -10684,7 +10566,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:~4.0.8": +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:~4.0.7": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -11662,10 +11544,10 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.10": - version: 0.1.10 - resolution: "path-to-regexp@npm:0.1.10" - checksum: ab7a3b7a0b914476d44030340b0a65d69851af2a0f33427df1476100ccb87d409c39e2182837a96b98fb38c4ef2ba6b87bdad62bb70a2c153876b8061760583c +"path-to-regexp@npm:0.1.7": + version: 0.1.7 + resolution: "path-to-regexp@npm:0.1.7" + checksum: 69a14ea24db543e8b0f4353305c5eac6907917031340e5a8b37df688e52accd09e3cebfe1660b70d76b6bd89152f52183f28c74813dbf454ba1a01c82a38abce languageName: node linkType: hard @@ -11809,27 +11691,27 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.47.0": - version: 1.47.0 - resolution: "playwright-core@npm:1.47.0" +"playwright-core@npm:1.46.1": + version: 1.46.1 + resolution: "playwright-core@npm:1.46.1" bin: playwright-core: cli.js - checksum: 64c6adae3ba76cd9f05e6569b1350a6e6990fd8236bb17d1f241b49bea68592a4f4390adb38863d2ee8ef5124e9cb77ff50b9076f8ef3a0890b2a37f87fb842a + checksum: 99a03f97d76af02b0565aa09758eb03427e13497ef7e9e9044fd1184a5f050e7545a517dd7ad8988a68b3ea76e2ba0d411f81e410b1cb29f5ac9161c49689822 languageName: node linkType: hard -"playwright@npm:1.47.0": - version: 1.47.0 - resolution: "playwright@npm:1.47.0" +"playwright@npm:1.46.1": + version: 1.46.1 + resolution: "playwright@npm:1.46.1" dependencies: fsevents: 2.3.2 - playwright-core: 1.47.0 + playwright-core: 1.46.1 dependenciesMeta: fsevents: optional: true bin: playwright: cli.js - checksum: e055fee751035f306a636267d0e080f08d4a523a6c1e3ebb01c91c18838c29bb9165ec3e63eb706798886fa2715f272dec908a7e2e1abcd7a55984688dbac2db + checksum: 9e721cb27f919cd92ea8c7461f4a8e97e32eade9da036baa4747f483549e33a8d77585f51e228d6639a1e28a76b0c1d59ca0a05dbd07aa3cfe427be7aaeb9ec8 languageName: node linkType: hard @@ -11867,7 +11749,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.3.11, postcss@npm:^8.4.38": +"postcss@npm:^8.3.11, postcss@npm:^8.4.38, postcss@npm:^8.4.39": version: 8.4.39 resolution: "postcss@npm:8.4.39" dependencies: @@ -11878,14 +11760,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.43, postcss@npm:^8.4.45": - version: 8.4.45 - resolution: "postcss@npm:8.4.45" +"postcss@npm:^8.4.41": + version: 8.4.41 + resolution: "postcss@npm:8.4.41" dependencies: nanoid: ^3.3.7 picocolors: ^1.0.1 source-map-js: ^1.2.0 - checksum: 3223cdad4a9392c0b334ee3ee7e4e8041c631cb6160609cef83c18d2b2580e931dd8068ab13cc6000c1a254d57492ac6c38717efc397c5dcc9756d06bc9c44f3 + checksum: f865894929eb0f7fc2263811cc853c13b1c75103028b3f4f26df777e27b201f1abe21cb4aa4c2e901c80a04f6fb325ee22979688fe55a70e2ea82b0a517d3b6f languageName: node linkType: hard @@ -12044,15 +11926,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.13.0": - version: 6.13.0 - resolution: "qs@npm:6.13.0" - dependencies: - side-channel: ^1.0.6 - checksum: e9404dc0fc2849245107108ce9ec2766cde3be1b271de0bf1021d049dc5b98d1a2901e67b431ac5509f865420a7ed80b7acb3980099fe1c118a1c5d2e1432ad8 - languageName: node - linkType: hard - "querystringify@npm:^2.1.1": version: 2.2.0 resolution: "querystringify@npm:2.2.0" @@ -12184,11 +12057,11 @@ __metadata: dependencies: "@mdx-js/react": ^3.0.1 "@mdx-js/rollup": ^3.0.1 - "@microsoft/applicationinsights-react-js": ^17.3.2 - "@microsoft/applicationinsights-web": ^3.3.2 + "@microsoft/applicationinsights-react-js": ^17.3.1 + "@microsoft/applicationinsights-web": ^3.3.1 "@okta/okta-react": ^6.9.0 - "@okta/okta-signin-widget": ^7.23.0 - "@playwright/test": ^1.47.0 + "@okta/okta-signin-widget": ^7.21.2 + "@playwright/test": ^1.46.1 "@rest-hooks/rest": ^3.0.3 "@rest-hooks/test": ^7.3.1 "@storybook/addon-a11y": ^8.2.9 @@ -12204,13 +12077,13 @@ __metadata: "@storybook/react-vite": ^8.2.9 "@storybook/testing-library": ^0.2.2 "@storybook/theming": ^8.2.9 - "@tanstack/react-query": ^5.55.4 - "@tanstack/react-query-devtools": ^5.55.4 + "@tanstack/react-query": ^5.51.23 + "@tanstack/react-query-devtools": ^5.51.23 "@testing-library/dom": ^10.4.0 - "@testing-library/jest-dom": ^6.5.0 - "@testing-library/react": ^16.0.1 + "@testing-library/jest-dom": ^6.4.8 + "@testing-library/react": ^16.0.0 "@testing-library/user-event": ^14.5.2 - "@trussworks/react-uswds": ^9.1.0 + "@trussworks/react-uswds": ^9.0.0 "@types/dompurify": ^3.0.5 "@types/dotenv-flow": ^3.3.3 "@types/downloadjs": ^1.4.6 @@ -12219,19 +12092,19 @@ __metadata: "@types/lodash": ^4.17.7 "@types/mdx": ^2.0.13 "@types/node": ^20.12.5 - "@types/react": 18.3.5 + "@types/react": 18.3.3 "@types/react-dom": ^18.3.0 "@types/react-router-dom": ^5.3.3 "@types/react-scroll-sync": ^0.9.0 - "@types/sanitize-html": ^2.13.0 + "@types/sanitize-html": ^2.11.0 "@typescript-eslint/eslint-plugin": ^7.17.0 "@typescript-eslint/parser": ^7.17.0 "@uswds/uswds": 3.7.1 "@vitejs/plugin-react": ^4.3.1 - "@vitest/coverage-istanbul": ^2.0.5 - "@vitest/ui": ^2.0.5 + "@vitest/coverage-istanbul": ^2.0.4 + "@vitest/ui": ^2.0.4 autoprefixer: ^10.4.20 - axios: ^1.7.7 + axios: ^1.7.5 browserslist: ^4.23.3 browserslist-useragent-regexp: ^4.1.3 chromatic: ^11.7.1 @@ -12260,8 +12133,8 @@ __metadata: history: ^5.3.0 html-to-text: ^9.0.5 husky: ^9.1.5 - jsdom: ^25.0.0 - lint-staged: ^15.2.10 + jsdom: ^24.1.1 + lint-staged: ^15.2.9 lodash: ^4.17.21 mockdate: ^3.0.5 msw: ^2.3.5 @@ -12269,7 +12142,7 @@ __metadata: npm-run-all: ^4.1.5 otpauth: ^9.3.2 patch-package: ^8.0.0 - postcss: ^8.4.45 + postcss: ^8.4.41 prettier: ^3.3.3 react: ^18.3.1 react-dom: ^18.3.1 @@ -12279,8 +12152,8 @@ __metadata: react-loader-spinner: ^6.1.6 react-markdown: ^9.0.1 react-query-kit: ^3.3.0 - react-router: ^6.26.1 - react-router-dom: ^6.26.1 + react-router: ^6.25.1 + react-router-dom: ^6.25.1 react-scroll-sync: ^0.11.2 react-toastify: ^10.0.5 rehype-raw: ^7.0.0 @@ -12290,20 +12163,20 @@ __metadata: remark-mdx-toc: ^0.3.1 rest-hooks: ^6.1.7 sanitize-html: ^2.13.0 - sass: ^1.78.0 + sass: ^1.77.8 storybook: ^8.2.9 storybook-addon-remix-react-router: ^3.0.0 ts-node: ^10.9.2 tslib: ^2.6.3 - tsx: ^4.19.0 + tsx: ^4.17.0 typescript: ^5.5.4 undici: ^6.19.8 use-deep-compare-effect: ^1.8.1 uuid: ^10.0.0 - vite: ^5.4.3 - vite-plugin-checker: ^0.8.0 + vite: ^5.3.4 + vite-plugin-checker: ^0.7.2 vite-plugin-svgr: ^4.2.0 - vitest: ^2.0.5 + vitest: ^2.0.4 web-vitals: ^3.4.0 languageName: unknown linkType: soft @@ -12421,27 +12294,27 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:^6.26.1": - version: 6.26.1 - resolution: "react-router-dom@npm:6.26.1" +"react-router-dom@npm:^6.25.1": + version: 6.25.1 + resolution: "react-router-dom@npm:6.25.1" dependencies: - "@remix-run/router": 1.19.1 - react-router: 6.26.1 + "@remix-run/router": 1.18.0 + react-router: 6.25.1 peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: e393ab62e3239585d44d598e6bc8cc138ac8353f3dc46262680c6ad83dea35773662ada2f1c353921a05c37d1f369c0a2cb097848a6210689e9b6076550c7de0 + checksum: fac768bc02cc0f39f5c1f022c8e7323ce9ffcc9b8e80456b51a70ff765854444cb4e6cdbf7d4132064a8fcbeeabeb82b8802614fbe66d8cbe7408e23ee33d789 languageName: node linkType: hard -"react-router@npm:6.26.1, react-router@npm:^6.26.1": - version: 6.26.1 - resolution: "react-router@npm:6.26.1" +"react-router@npm:6.25.1, react-router@npm:^6.25.1": + version: 6.25.1 + resolution: "react-router@npm:6.25.1" dependencies: - "@remix-run/router": 1.19.1 + "@remix-run/router": 1.18.0 peerDependencies: react: ">=16.8" - checksum: 810949febc1bf2a6f8dd65f4c0532a2413d0532df462b3e78891aec81dca5a088d387b32c9922cde52bd9770f32263590993cab2383c94ddc1cdb50a20fd7adc + checksum: 2abbab5ecc5d1210f70980571326fd1956da3898b78bfcce6229e346e658dd42ec75bea1caea6aa45607ef677e442f3241dc3fb839293f276fa4bd466870aadd languageName: node linkType: hard @@ -13002,69 +12875,6 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.20.0": - version: 4.21.2 - resolution: "rollup@npm:4.21.2" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.21.2 - "@rollup/rollup-android-arm64": 4.21.2 - "@rollup/rollup-darwin-arm64": 4.21.2 - "@rollup/rollup-darwin-x64": 4.21.2 - "@rollup/rollup-linux-arm-gnueabihf": 4.21.2 - "@rollup/rollup-linux-arm-musleabihf": 4.21.2 - "@rollup/rollup-linux-arm64-gnu": 4.21.2 - "@rollup/rollup-linux-arm64-musl": 4.21.2 - "@rollup/rollup-linux-powerpc64le-gnu": 4.21.2 - "@rollup/rollup-linux-riscv64-gnu": 4.21.2 - "@rollup/rollup-linux-s390x-gnu": 4.21.2 - "@rollup/rollup-linux-x64-gnu": 4.21.2 - "@rollup/rollup-linux-x64-musl": 4.21.2 - "@rollup/rollup-win32-arm64-msvc": 4.21.2 - "@rollup/rollup-win32-ia32-msvc": 4.21.2 - "@rollup/rollup-win32-x64-msvc": 4.21.2 - "@types/estree": 1.0.5 - fsevents: ~2.3.2 - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: ac83ca15495dd00d6b910e87e7f5f2c480d36977471ec11e3d207089e0aa207d34fc9bd0270f7804b268a7f7473d3bc6b65bccf474fbd1d1826a70bde2741894 - languageName: node - linkType: hard - "rrweb-cssom@npm:^0.6.0": version: 0.6.0 resolution: "rrweb-cssom@npm:0.6.0" @@ -13146,16 +12956,16 @@ __metadata: languageName: node linkType: hard -"sass@npm:^1.78.0": - version: 1.78.0 - resolution: "sass@npm:1.78.0" +"sass@npm:^1.77.8": + version: 1.77.8 + resolution: "sass@npm:1.77.8" dependencies: chokidar: ">=3.0.0 <4.0.0" immutable: ^4.0.0 source-map-js: ">=0.6.2 <2.0.0" bin: sass: sass.js - checksum: ea856bd224c85d831a5800195750c2dd008d101771d071dbaca886c47fe4f131c30c328755d7a974ad944ba5b3aafa7a9f6010952da306436dcebddb41580e1c + checksum: 6b5dce17faa1bd1e349b4825bf7f76559a32f3f95d789cd2847623c88ee9635e1485d3458532a05fa5b9134cfbce79a4bad3f13dc63c2433632347674db0abae languageName: node linkType: hard @@ -13243,36 +13053,15 @@ __metadata: languageName: node linkType: hard -"send@npm:0.19.0": - version: 0.19.0 - resolution: "send@npm:0.19.0" - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: ~1.0.2 - escape-html: ~1.0.3 - etag: ~1.8.1 - fresh: 0.5.2 - http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: ~1.2.1 - statuses: 2.0.1 - checksum: 5ae11bd900c1c2575525e2aa622e856804e2f96a09281ec1e39610d089f53aa69e13fd8db84b52f001d0318cf4bb0b3b904ad532fc4c0014eb90d32db0cff55f - languageName: node - linkType: hard - -"serve-static@npm:1.16.0": - version: 1.16.0 - resolution: "serve-static@npm:1.16.0" +"serve-static@npm:1.15.0": + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" dependencies: encodeurl: ~1.0.2 escape-html: ~1.0.3 parseurl: ~1.3.3 send: 0.18.0 - checksum: a479dfe7e9fa7e8cb3ceccb0d944a3c72bb8f88d78472e30989f58fe15a92cfc909ab05a5c7cda2d1a6aa2663ab503ad1e2f40653740346e53e72b3ba41b6951 + checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d languageName: node linkType: hard @@ -14301,9 +14090,9 @@ __metadata: languageName: node linkType: hard -"tsx@npm:^4.19.0": - version: 4.19.0 - resolution: "tsx@npm:4.19.0" +"tsx@npm:^4.17.0": + version: 4.17.0 + resolution: "tsx@npm:4.17.0" dependencies: esbuild: ~0.23.0 fsevents: ~2.3.3 @@ -14313,7 +14102,7 @@ __metadata: optional: true bin: tsx: dist/cli.mjs - checksum: 950e502265d3af1d3a95dc155ecba6bc4feaf0ec38fd5e94777c5e090b5d5ac47eda7c93f8cb97c31782b65a6ff889a851dd07340f4f0e9de45259a5d7592ff3 + checksum: 36fb12cef74b177d11601f04aa1b768e7ce74ad0c4d8983a6050c6e19657a30362b07ac84ac5796fd1923b51904e801b42d26768a563a6139b310f8ffb0f08b1 languageName: node linkType: hard @@ -14928,9 +14717,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:2.0.5": - version: 2.0.5 - resolution: "vite-node@npm:2.0.5" +"vite-node@npm:2.0.4": + version: 2.0.4 + resolution: "vite-node@npm:2.0.4" dependencies: cac: ^6.7.14 debug: ^4.3.5 @@ -14939,13 +14728,13 @@ __metadata: vite: ^5.0.0 bin: vite-node: vite-node.mjs - checksum: 30071f1cd3d3b78fd52726d66d18d81b63b321dee70d03c259db959a72f46dce2d71f12a85eaf503497f562ce11fea51197a74888d5892d3c7f3ad0ef093ec25 + checksum: 1e40f2a6eb977fdb77a56b4cb71de0c329b9214bff9db2bedca6186626d70a70e2f3878acad3311e28d718b97e804de3e6795aab846bcb74ea66d4cba5ff48cd languageName: node linkType: hard -"vite-plugin-checker@npm:^0.8.0": - version: 0.8.0 - resolution: "vite-plugin-checker@npm:0.8.0" +"vite-plugin-checker@npm:^0.7.2": + version: 0.7.2 + resolution: "vite-plugin-checker@npm:0.7.2" dependencies: "@babel/code-frame": ^7.12.13 ansi-escapes: ^4.3.0 @@ -14971,7 +14760,7 @@ __metadata: vite: ">=2.0.0" vls: "*" vti: "*" - vue-tsc: ~2.1.6 + vue-tsc: ">=2.0.0" peerDependenciesMeta: "@biomejs/biome": optional: true @@ -14991,7 +14780,7 @@ __metadata: optional: true vue-tsc: optional: true - checksum: f7a21be71256efe4e835a3945760e2ac220d5f8f3353b7df10fe02396d2e92a0e15226816843748b9fb1f5aca3ed1d588eba1070de08dee57e43fec4e3ceb8ae + checksum: 91e15bfa9d259cb69cca0590e45e3fc36214918634ec3f5fc413f30277b0b2e9f08a60009d7d1a8e01562f23b0c4a2cb34aedccf9453270c4e4599afd6fa036a languageName: node linkType: hard @@ -15048,20 +14837,19 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.4.3": - version: 5.4.3 - resolution: "vite@npm:5.4.3" +"vite@npm:^5.3.4": + version: 5.3.4 + resolution: "vite@npm:5.3.4" dependencies: esbuild: ^0.21.3 fsevents: ~2.3.3 - postcss: ^8.4.43 - rollup: ^4.20.0 + postcss: ^8.4.39 + rollup: ^4.13.0 peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 less: "*" lightningcss: ^1.21.0 sass: "*" - sass-embedded: "*" stylus: "*" sugarss: "*" terser: ^5.4.0 @@ -15077,8 +14865,6 @@ __metadata: optional: true sass: optional: true - sass-embedded: - optional: true stylus: optional: true sugarss: @@ -15087,21 +14873,21 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 3a28bcb09345030d2dba41b93b6b8a3aac8f19a9336c50e7e5f5e30931fbb16193cdd97814c5c0d1b5ade3b3e763b329eb881ea5cfe6e422c669d21a304f3295 + checksum: 2dfbab98daf91b86b3d3e535add1d6a982f7087df62f8f4bc219f3ae91a97f38c04683a32ba2457618e804fa93380090ddda5b0c9823a94bdcb53d6044b04732 languageName: node linkType: hard -"vitest@npm:^2.0.5": - version: 2.0.5 - resolution: "vitest@npm:2.0.5" +"vitest@npm:^2.0.4": + version: 2.0.4 + resolution: "vitest@npm:2.0.4" dependencies: "@ampproject/remapping": ^2.3.0 - "@vitest/expect": 2.0.5 - "@vitest/pretty-format": ^2.0.5 - "@vitest/runner": 2.0.5 - "@vitest/snapshot": 2.0.5 - "@vitest/spy": 2.0.5 - "@vitest/utils": 2.0.5 + "@vitest/expect": 2.0.4 + "@vitest/pretty-format": ^2.0.4 + "@vitest/runner": 2.0.4 + "@vitest/snapshot": 2.0.4 + "@vitest/spy": 2.0.4 + "@vitest/utils": 2.0.4 chai: ^5.1.1 debug: ^4.3.5 execa: ^8.0.1 @@ -15112,13 +14898,13 @@ __metadata: tinypool: ^1.0.0 tinyrainbow: ^1.2.0 vite: ^5.0.0 - vite-node: 2.0.5 + vite-node: 2.0.4 why-is-node-running: ^2.3.0 peerDependencies: "@edge-runtime/vm": "*" "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 2.0.5 - "@vitest/ui": 2.0.5 + "@vitest/browser": 2.0.4 + "@vitest/ui": 2.0.4 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -15136,7 +14922,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 4709e7678d89f957d9bd8e4dd2f99734857df03e22d38d9c3986a75f608205572b73c2faaf059ed41a2dccbc5c65f6717bf66594d6459cf2e57ab175be9aebc1 + checksum: d00015d1518e297283fc939dc2d30e95258bda65cae9146e82380c87ac0cafd8bb892882516a4940d628afc835fc20e55c8be30f30c8bcaba93e20568dbb3744 languageName: node linkType: hard diff --git a/prime-router/build.gradle.kts b/prime-router/build.gradle.kts index 90a5971f314..f470edb4efa 100644 --- a/prime-router/build.gradle.kts +++ b/prime-router/build.gradle.kts @@ -23,9 +23,7 @@ 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 @@ -101,8 +99,7 @@ val reportsApiEndpointHost = ( val devAzureConnectString = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=" + "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=" + - "http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" + - "TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" + "http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" val env = mutableMapOf( "AzureWebJobsStorage" to devAzureConnectString, @@ -500,22 +497,9 @@ 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("gatherAzureResources") { - dependsOn("generateVersionFile") from("./") into(azureResourcesTmpDir) include("metadata/**/*.yml") diff --git a/prime-router/docs/api/reports.yml b/prime-router/docs/api/reports.yml index 2a860227aa8..e3475f53e21 100644 --- a/prime-router/docs/api/reports.yml +++ b/prime-router/docs/api/reports.yml @@ -118,36 +118,6 @@ 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: diff --git a/prime-router/docs/docs-deprecated/getting-started/Using-an-apple-silicon-mac.md b/prime-router/docs/docs-deprecated/getting-started/Using-an-apple-silicon-mac.md index 4b839860dfd..448d9454a2e 100644 --- a/prime-router/docs/docs-deprecated/getting-started/Using-an-apple-silicon-mac.md +++ b/prime-router/docs/docs-deprecated/getting-started/Using-an-apple-silicon-mac.md @@ -59,8 +59,8 @@ Here's a list of environment variables that are used at the time of writing this CREDENTIAL_STORAGE_METHOD=HASHICORP_VAULT VAULT_TOKEN= VAULT_API_ADDR=http://localhost:8200 -AzureWebJobsStorage="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" -PartnerStorage="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" +AzureWebJobsStorage="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" +PartnerStorage="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" POSTGRES_USER=prime POSTGRES_PASSWORD=changeIT! POSTGRES_URL=jdbc:postgresql://localhost:5432/prime_data_hub diff --git a/prime-router/docs/onboarding-users/fhir-to-hl7-transforms.md b/prime-router/docs/onboarding-users/fhir-to-hl7-transforms.md deleted file mode 100644 index 9d22507f9ef..00000000000 --- a/prime-router/docs/onboarding-users/fhir-to-hl7-transforms.md +++ /dev/null @@ -1,180 +0,0 @@ -This file documents the types of transforms currently being used by Engagement. This document does not recommend any particular method of acheiving the needed transformations or purport to show best practices. This is simply to document how things have been accomplished so far. - -## Types of FHIR->HL7 transforms currently used - -Default value in field - Default a static value into a single field or subfield -```yaml - - name: ak-receiving-application - value: [ '"AKDOH"' ] - hl7Spec: [ 'MSH-5-1' ] -``` - -Replace value in single field/subfield with empty string -```yaml - - name: ak-ordering-provider-id-number - value: [ '""' ] - hl7Spec: [ '/PATIENT_RESULT/ORDER_OBSERVATION/OBR-16-1' ] -``` - -Replace value in multiple fields/subfields with empty string -```yaml - - name: remove-hl7-fields - value: [ '""' ] - hl7Spec: [ 'MSH-19-1' , 'MSH-19-2' , 'MSH-19-3' , '%{ORC}-2-1' , '%{ORC}-2-2' , '%{ORC}-2-3' , '%{ORC}-2-4' , '%{ORC}-4-1' , '%{ORC}-4-2' , '%{ORC}-4-3' , '%{ORC}-4-4' , '%{OBR}-2-1' , '%{OBR}-2-2' , '%{OBR}-2-3' , '%{OBR}-2-4' ] -``` - -Modify value - Change the format of a value in a single field or subfield -```yaml -- name: obx-value-dtm-dt - condition: '%context.extension(%`rsext-obx-observation`).extension.where(url = "OBX.2").value = "DT"' - value: [ '%resource.value.extension(%`rsext-hl7v2-date-time`).value.toString().replace("-","")' ] - hl7Spec: [ '%{hl7OBXField}-5' ] -``` - -Modify value based on valueset - Correlate a set of values to another set of values -```yaml - - name: ak-patient-ethnicity-identifier-code - value: - - 'Bundle.entry.resource.ofType(Patient).extension(%`rsext-ethnic-group`).value.coding[0].code' - hl7Spec: [ '/PATIENT_RESULT/PATIENT/PID-22-1' ] - valueSet: - values: - H: 2135-2 - N: 2186-5 -``` - -Use customFhirFunction to correlate FHir valuesets with HL7 valuesets -```yaml - - name: ak-patient-race-coding-system - resource: 'Bundle.entry.resource.ofType(Patient).extension("http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd").value.coding' - condition: '%resource.code.exists()' - value: [ '%resource.system.getCodingSystemMapping()' ] - hl7Spec: [ '/PATIENT_RESULT/PATIENT/PID-10-3' ] -``` - -Override base mappings to prevent certain segments/fields from being mapped to outbound HL7 -```yaml - - name: obx-equipment-instance-identifier - condition: 'false' -``` - -Override base mappings to prevent a field in specific datatype from being mapped to outbound hl7 -```yaml - - name: xtn-extension-value - resource: '%resource.extension(%`rsext-xtn-contact-point`)' - schema: classpath:/metadata/hl7_mapping/receivers/Common/remove-xtn-1/XTNExtension.yml -``` -```yaml -elements: - - - name: xtn-2-telecom-use-code - value: [ '%resource.extension("XTN.2").value' ] - hl7Spec: [ '%{hl7TelecomPath}-2' ] - - - name: xtn-3-telecom-equipment-type - value: [ '%resource.extension("XTN.3").value' ] - hl7Spec: [ '%{hl7TelecomPath}-3' ] - - - name: xtn-4-communication-address - value: [ '%resource.extension("XTN.4").value' ] - hl7Spec: [ '%{hl7TelecomPath}-4' ] - - - name: xtn-7-local-number - value: [ '%resource.extension("XTN.7").value' ] - hl7Spec: [ '%{hl7TelecomPath}-7' ] - - - name: xtn-9-any-text - value: [ '%resource.extension("XTN.9").value' ] - hl7Spec: [ '%{hl7TelecomPath}-9' ] - - - name: xtn-12-unformatted-telephone-number - value: [ '%resource.extension("XTN.12").value' ] - hl7Spec: [ '%{hl7TelecomPath}-12' ] -``` - -Override base mappings to create segments/fields in a specific format/ordering -```yaml - - name: ca-order-observations - resource: 'Bundle.entry.resource.ofType(DiagnosticReport)' - condition: '%resource.count() > 0' - schema: classpath:/metadata/hl7_mapping/receivers/STLTs/CA/ca-order-observation.yml - resourceIndex: orderIndex -``` -```yaml -constants: - hl7Order: '/PATIENT_RESULT/ORDER_OBSERVATION(%{orderIndex})' - diagnostic: 'Bundle.entry.resource.ofType(DiagnosticReport)[%orderIndex]' - service: 'Bundle.entry.resource.ofType(DiagnosticReport)[%orderIndex].basedOn.resolve()' - specimen: 'Bundle.entry.resource.ofType(DiagnosticReport)[%orderIndex].specimen.resolve()' -elements: - - name: ca-observation-result - resource: '%resource.result.resolve()' - schema: classpath:/metadata/hl7_mapping/receivers/STLTs/CA/ca-observation-result.yml - resourceIndex: resultIndex -``` -```yaml -constants: - hl7ObservationPath: '/PATIENT_RESULT/ORDER_OBSERVATION(%{orderIndex})/OBSERVATION(%{resultIndex})' - rsext: '"https://reportstream.cdc.gov/fhir/StructureDefinition/"' - observation: '%diagnostic.result[%resultIndex].resolve()' -elements: - - # California requirement: Move all regular notes and AOE questions between last OBX segment and SPM - # as NTE segments - # To do that we have to compare the Observation index against the Observation count - # to make sure is the last OBX segment and only add notes and AOE questions to that segment - - name: ca-order-observation-note - resource: '%diagnostic.result.resolve().note.text.split(''\n'') | %service.note.text.split(''\n'') | %service.supportingInfo.resolve()' - condition: >- - (Bundle.entry.resource.ofType(Observation).note.exists() or %service.note.exists() or %service.supportingInfo.exists()) - and (%diagnostic.result.count() - 1) = %resultIndex - schema: classpath:/metadata/hl7_mapping/receivers/STLTs/CA/ca-order-note.yml - resourceIndex: noteIndex - constants: - hl7NotePath: '%{hl7ObservationPath}' -``` -```yaml -elements: - - name: aoe-note - condition: '%resource is Observation' - schema: classpath:/metadata/hl7_mapping/receivers/STLTs/CA/ca-aoe-note.yml - - - name: note - condition: '%resource is string' - schema: classpath:/metadata/hl7_mapping/datatypes/annotation/NTE.yml - constants: - noteDetails: '%resource.note' -``` -```yaml -constants: - caAoeNteFieldPath: '%{hl7NotePath}/NTE(%{noteIndex})' - commentCondition: '%resource.code.coding.code.exists() and %resource.code.text.exists()' -elements: - - name: aoe-note-id - value: [ '%noteIndex + 1' ] - hl7Spec: [ '%{caAoeNteFieldPath}-1' ] - - - name: aoe-note-source - value: - - '"L"' - hl7Spec: [ '%{caAoeNteFieldPath}-2' ] - - - name: aoe-note-comment-datetime - condition: '%resource.value.exists() and %resource.value is dateTime and %commentCondition' - value: [ '%resource.code.coding.code + " " + %resource.code.text + ": " + %resource.value.toString()' ] - hl7Spec: [ '%{caAoeNteFieldPath}-3' ] - - - name: aoe-note-comment-string - condition: '%resource.value.exists() and %resource.value is string and %commentCondition' - value: [ '%resource.code.coding.code + " " + %resource.code.text + ": " + %resource.value' ] - hl7Spec: [ '%{caAoeNteFieldPath}-3' ] - - - name: aoe-note-comment-cwe - condition: '%resource.value.exists() and %resource.value is CodeableConcept and %commentCondition' - value: [ '%resource.code.coding.code - + " " + %resource.code.text - + ": " + %resource.value.coding.display - + " " + %resource.value.coding.code - + " " + %resource.value.coding.system.getCodingSystemMapping()' ] - hl7Spec: [ '%{caAoeNteFieldPath}-3' ] -``` diff --git a/prime-router/docs/standard-operating-procedures/adding-conformance-profile.md b/prime-router/docs/standard-operating-procedures/adding-conformance-profile.md index 8198868c336..6e5744e5d11 100644 --- a/prime-router/docs/standard-operating-procedures/adding-conformance-profile.md +++ b/prime-router/docs/standard-operating-procedures/adding-conformance-profile.md @@ -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/catchall` and add to your new mapping folder. +3. Copy folder `fhir` from `prime-router/metadata/HL7/v251-elr` 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.) diff --git a/prime-router/docs/universal-pipeline/README.md b/prime-router/docs/universal-pipeline/README.md index f854ccff2d4..2a8e775e2dd 100644 --- a/prime-router/docs/universal-pipeline/README.md +++ b/prime-router/docs/universal-pipeline/README.md @@ -104,8 +104,8 @@ In the Convert case above, `messagesToSend` is a list of `FHIRConvertMessage` ob messagesToSend.add( FhirConvertMessage( report.id, - blobInfo.blobUrl, - BlobUtils.digestToString(blobInfo.digest), + blobInfo.blobUrl, + BlobAccess.digestToString(blobInfo.digest), message.blobSubFolderName, message.topic ) diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CE/CodeableConcept.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CE/CodeableConcept.yml new file mode 100644 index 00000000000..36421f3188a --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CE/CodeableConcept.yml @@ -0,0 +1,112 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + generateList: true + expressionType: nested + vars: + code: String, CE.1 + display: String, CE.2 + system: SYSTEM_URL, CE.3 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CE.1 + display: + type: String + expressionType: HL7Spec + valueOf: CE.2 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CE.3 + extension_ce-coding: + generateList: true + condition: $code NOT_NULL || $display NOT_NULL || $system NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: ce-coding + valueString: + value: coding + extension_ce-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CE.3 + expressionsMap: + url: + type: SYSTEM_URL + value: ce-coding-system + valueString: + value: $coding-system + +coding_alt: + generateList: true + expressionType: nested + vars: + altCode: String, CE.4 + altDisplay: String, CE.5 + altSystem: SYSTEM_URL, CE.6 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CE.4 + display: + type: String + expressionType: HL7Spec + valueOf: CE.5 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CE.6 + extension_ce-coding: + condition: $altCode NOT_NULL || $altDisplay NOT_NULL || $altSystem NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: ce-coding + valueString: + value: alt-coding + extension_ce-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CE.6 + expressionsMap: + url: + type: SYSTEM_URL + value: ce-coding-system + valueString: + value: $coding-system + +extension: + generateList: true + expressionType: nested + expressions: + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNE/CodeableConcept.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNE/CodeableConcept.yml new file mode 100644 index 00000000000..1250b162be6 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNE/CodeableConcept.yml @@ -0,0 +1,175 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + generateList: true + expressionType: nested + vars: + code: String, CNE.1 + display: String, CNE.2 + system: SYSTEM_URL, CNE.3 + version: String, CNE.7 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CNE.1 + display: + type: String + expressionType: HL7Spec + valueOf: CNE.2 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CNE.3 + version: + type: String + expressionType: HL7Spec + valueOf: CNE.7 + extension_CNE-coding: + condition: $code NOT_NULL || $display NOT_NULL || $system NOT_NULL || $version NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: CNE-coding + valueString: + value: coding + extension_CNE-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CNE.3 + expressionsMap: + url: + type: SYSTEM_URL + value: CNE-coding-system + valueString: + value: $coding-system + +coding_alt: + generateList: true + expressionType: nested + vars: + altCode: String, CNE.4 + altDisplay: String, CNE.5 + altSystem: SYSTEM_URL, CNE.6 + altVersion: String, CNE.8 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CNE.4 + display: + type: String + expressionType: HL7Spec + valueOf: CNE.5 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CNE.6 + version: + type: String + expressionType: HL7Spec + valueOf: CNE.8 + extension_CNE-coding: + condition: $altCode NOT_NULL || $altDisplay NOT_NULL || $altSystem NOT_NULL || $altVersion NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: CNE-coding + valueString: + value: alt-coding + extension_CNE-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CNE.6 + expressionsMap: + url: + type: SYSTEM_URL + value: CNE-coding-system + valueString: + value: $coding-system + +coding_secondary-alt: + generateList: true + expressionType: nested + vars: + secondaryAltCode: String, CWE.10 + secondaryAltDisplay: String, CWE.11 + secondaryAltSystem: SYSTEM_URL, CWE.12 + secondaryAltVersion: String, CWE.13 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.10 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.11 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.12 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.13 + extension_cne-coding: + condition: $secondaryAltCode NOT_NULL || $secondaryAltDisplay NOT_NULL || $secondaryAltSystem NOT_NULL || $secondaryAltVersion NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cne-coding + valueString: + value: secondary-alt-coding + extension_cne-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.12 + expressionsMap: + url: + type: SYSTEM_URL + value: cne-coding-system + valueString: + value: $coding-system + +text: + type: STRING + expressionType: HL7Spec + valueOf: CNE.9 + +extension: + generateList: true + expressionType: nested + expressions: + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/CNNExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/CNNExtension.yml new file mode 100644 index 00000000000..9942d500ee9 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/CNNExtension.yml @@ -0,0 +1,70 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + valueOf: cnn-practitioner + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + cnn3: STRING_ALL, CNN.3 + condition: $cnn3 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CNN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.3 + - expressionType: nested + vars: + cnn4: STRING_ALL, CNN.4 + condition: $cnn4 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CNN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.4 + - expressionType: nested + vars: + cnn5: STRING_ALL, CNN.5 + condition: $cnn5 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CNN.5 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.5 + - expressionType: nested + vars: + cnn7: STRING_ALL, CNN.7 + condition: $cnn7 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CNN.7 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.7 + - expressionType: nested + vars: + cnn8: STRING_ALL, CNN.8 + condition: $cnn8 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CNN.8 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.8 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/Practitioner.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/Practitioner.yml new file mode 100644 index 00000000000..ff3e1ac127a --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CNN/Practitioner.yml @@ -0,0 +1,98 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Practitioner + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: nested + expressionsMap: + value: + type: STRING + valueOf: CNN.1 + expressionType: HL7Spec + extension_assigningAuthority: + generateList: true + expressionType: nested + vars: + cnn9: CNN.9 + cnn10: CNN.10 + cnn11: CNN.11 + condition: $cnn9 NOT_NULL || $cnn10 NOT_NULL || $cnn11 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + valueOf: assigning-authority + extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: namespace-id + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.9 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: universal-id + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CNN.10 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: universal-id-type + valueCode: + type: STRING + expressionType: HL7Spec + valueOf: CNN.11 + +name: + expressionType: nested + expressionsMap: + family: + type: STRING + valueOf: CNN.2 + expressionType: HL7Spec + given: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: CNN.3 + type: STRING + - expressionType: HL7Spec + valueOf: CNN.4 + type: STRING + suffix: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: CNN.5 + type: STRING + - expressionType: HL7Spec + valueOf: CNN.7 + type: STRING + prefix: + type: STRING + valueOf: CNN.6 + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: resource + valueOf: datatypes/CNN/CNNExtension diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CQ/Quantity.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CQ/Quantity.yml new file mode 100644 index 00000000000..9237b917fb0 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CQ/Quantity.yml @@ -0,0 +1,28 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: BIG_DECIMAL + expressionType: HL7Spec + valueOf: CQ.1 + +unit: + expressionType: nested + expressions: + - type: STRING + expressionType: HL7Spec + valueOf: CQ.2.2 + +extension: + condition: $cq2 NOT_NULL + generateList: true + expressionType: nested + vars: + cq2: STRING_ALL, CQ.2 + expressionsMap: + url: + type: SYSTEM_URL + value: 'cq-units' + valueCodeableConcept: + valueOf: datatypes/CE/CodeableConcept + expressionType: resource + specs: CQ.2 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Annotation.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Annotation.yml new file mode 100644 index 00000000000..5738d74bbd2 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Annotation.yml @@ -0,0 +1,19 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +text: + type: STRING_ALL + valueOf: CWE + generateList: true + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: 'cwe-annotation' + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: CWE \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/CodeableConcept.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/CodeableConcept.yml new file mode 100644 index 00000000000..76dd3c2546b --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/CodeableConcept.yml @@ -0,0 +1,127 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + generateList: true + expressionType: nested + vars: + code: String, CWE.1 + display: String, CWE.2 + system: SYSTEM_URL, CWE.3 + version: String, CWE.7 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.1 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.2 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.3 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.7 + extension_cwe-coding: + condition: $code NOT_NULL || $display NOT_NULL || $system NOT_NULL || $version NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding + valueString: + value: coding + extension_cwe-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.3 + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding-system + valueString: + value: $coding-system + +coding_alt: + generateList: true + expressionType: nested + vars: + altCode: String, CWE.4 + altDisplay: String, CWE.5 + altSystem: SYSTEM_URL, CWE.6 + altVersion: String, CWE.8 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.4 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.5 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.6 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.8 + extension_cwe-coding: + condition: $altCode NOT_NULL || $altDisplay NOT_NULL || $altSystem NOT_NULL || $altVersion NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding + valueString: + value: alt-coding + extension_cwe-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.6 + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding-system + valueString: + value: $coding-system + +text: + type: STRING + expressionType: HL7Spec + valueOf: CWE.9 + +extension: + generateList: true + expressionType: nested + expressions: + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Organization.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Organization.yml new file mode 100644 index 00000000000..53e69b95630 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CWE/Organization.yml @@ -0,0 +1,60 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: CWE.1 + system: + type: STRING + expressionType: HL7Spec + valueOf: CWE.3 + +name: + type: STRING + expressionType: HL7Spec + valueOf: CWE.2 | CWE.9 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-organization + valueCodeableConcept: + expressionType: resource + valueOf: datatypes/CWE/CodeableConcept + specs: $BASE_VALUE + - generateList: true + expressionType: nested + condition: $cweOrganizationHL7Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $cweOrganizationHL7Field + - generateList: true + expressionType: nested + condition: $cweOrganizationHL7Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $cweOrganizationHL7Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/CXExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/CXExtension.yml new file mode 100644 index 00000000000..9eb5c811fe1 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/CXExtension.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: cx-identifier + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $cx5 NOT_NULL + vars: + cx5: CX.5 + expressionsMap: + url: + type: STRING + value: CX.5 + valueString: + type: STRING + valueOf: $cx5 + expressionType: HL7Spec + - expressionType: nested + vars: + cx9: STRING_ALL, CX.9 + condition: $cx9 NOT_NULL + expressionsMap: + url: + type: STRING + value: CX.9 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: CX.9 + - expressionType: nested + vars: + cx10: STRING_ALL, CX.10 + condition: $cx10 NOT_NULL + expressionsMap: + url: + type: STRING + value: CX.10 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: CX.10 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/Identifier.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/Identifier.yml new file mode 100644 index 00000000000..ec5604f1241 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/Identifier.yml @@ -0,0 +1,222 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Identifier + +value: + type: STRING + valueOf: CX.1 + expressionType: HL7Spec + +# Checking if HD is an Organization or a System by looking at the ID type. +# If ID type is null or ID type is not ISO or UUID, treat as organization. +# Otherwise, treat as system. +assigner_1: + vars: + cx43: String, CX.4.3 + cx4: STRING_ALL, CX.4 + condition: $cx43 NULL && $cx4 NOT_NULL + valueOf: datatypes/HD/Organization + expressionType: reference + specs: CX.4 + +assigner_2: + vars: + cx43: String, CX.4.3 + condition: $cx43 NOT_NULL && $cx43 NOT_EQUALS ISO && $cx43 NOT_EQUALS UUID + valueOf: datatypes/HD/Organization + expressionType: reference + specs: CX.4 + +system: + vars: + cx41: String, CX.4.1 + cx42: String, CX.4.2 + cx43: String, CX.4.3 + condition: $cx43 EQUALS ISO || $cx43 EQUALS UUID + expressionType: nested + expressions: + - condition: $cx41 NOT_NULL + type: STRING + valueOf: $cx41 + - condition: $cx41 NULL && $cx43 EQUALS ISO + constants: + prefix: "urn:oid:" + vars: + systemURI: $prefix + CX.4.2 + type: STRING + valueOf: $systemURI + - condition: $cx41 NULL && $cx43 EQUALS UUID + constants: + prefix: "urn:uuid:" + vars: + systemURI: $prefix + CX.4.2 + type: STRING + valueOf: $systemURI +_system: + vars: + cx41: String, CX.4.1 + cx42: String, CX.4.2 + cx43: String, CX.4.3 + condition: $cx43 EQUALS ISO || $cx43 EQUALS UUID + expressionType: nested + expressionsMap: + extension_1-namespace-id: + generateList: true + expressionType: nested + condition: $cx41 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + type: STRING + valueOf: $cx41 + expressionType: HL7Spec + extension_2-universal-id: + generateList: true + expressionType: nested + condition: $cx42 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + type: STRING + valueOf: $cx42 + expressionType: HL7Spec + extension_3-universal-id-type: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + type: STRING + valueOf: $cx43 + expressionType: HL7Spec + +type: + expressionType: nested + vars: + code: $code | CX.5 + system: $system + condition: $code NOT_NULL || $system NOT_NULL + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: $code + system: + type: STRING + valueOf: $system + text: + type: STRING + condition: $CXIdentifierText NOT_NULL + valueOf: $CXIdentifierText + +period: + vars: + startDate: CX.7 + endDate: CX.8 + condition: $startDate NOT_NULL || $endDate NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(startDate,ZONEID)" + expressionType: JEXL + _start: + expressionType: nested + condition: $startDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $startDate + expressionType: HL7Spec + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(endDate,ZONEID)" + expressionType: JEXL + _end: + expressionType: nested + condition: $endDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $endDate + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: identifier-check-digit + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CX.2 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: naming-system-check-digit + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CX.3 + - expressionType: nested + condition: $cx6 NOT_NULL + vars: + cx6: CX.6 + expressionsMap: + url: + type: SYSTEM_URL + value: assigning-facility + valueReference: + valueOf: datatypes/HD/Organization + expressionType: reference + specs: CX.6 + - expressionType: resource + valueOf: datatypes/CX/CXExtension + - generateList: true + expressionType: nested + condition: $CXIdentifierField NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $CXIdentifierField + - generateList: true + expressionType: nested + condition: $CXIdentifierComponent NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $CXIdentifierComponent diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/RelatedPerson-mother.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/RelatedPerson-mother.yml new file mode 100644 index 00000000000..3d1da98f2f4 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/CX/RelatedPerson-mother.yml @@ -0,0 +1,13 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: RelatedPerson + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: resource + specs: CX + valueOf: datatypes/CX/Identifier \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DLD/Location.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DLD/Location.yml new file mode 100644 index 00000000000..f207f43e245 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DLD/Location.yml @@ -0,0 +1,25 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +type: + type: STRING + valueOf: DLD.1 + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: dld2-effective-date + valueString: + valueOf: DLD.2 + type: STRING + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DR/Period.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DR/Period.yml new file mode 100644 index 00000000000..378bd28002b --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/DR/Period.yml @@ -0,0 +1,51 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +start: + condition: $dateTimeIn NOT_NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: DR.1 +_start: + expressionType: nested + vars: + dr1: DR.1 + condition: $dr1 NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: DR.1 + expressionType: HL7Spec + +end: + condition: $dateTimeIn NOT_NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: DR.2 +_end: + expressionType: nested + condition: $dr2 NOT_NULL + vars: + dr2: DR.2 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: DR.2 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/Attachment.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/Attachment.yml new file mode 100644 index 00000000000..40286edae49 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/Attachment.yml @@ -0,0 +1,36 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: resource + valueOf: datatypes/ED/EDExtension + - expressionType: nested + vars: + ed2: STRING_ALL, ED.2 + ed3: STRING_ALL, ED.3 + condition: $ed3 NULL && $ed2 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: alternate-codes + valueCodeableConcept: + valueOf: datatypes/ID/CodeableConcept + specs: ED.2 + expressionType: resource + + +contentType: + valueOf: ED.3 + type: STRING + expressionType: HL7Spec + +data: + vars: + ed4: STRING, ED.4 + condition: $ed4 EQUALS Base64 + valueOf: ED.5 + type: STRING + expressionType: HL7Spec + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/EDExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/EDExtension.yml new file mode 100644 index 00000000000..6b3e2057fe1 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ED/EDExtension.yml @@ -0,0 +1,53 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: ed-attachment + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: resource + valueOf: datatypes/HD/ExtensionHD + specs: ED.1 + constants: + extensionUrl: ED.1 + isStringUrl: true + - expressionType: nested + vars: + ed2: STRING_ALL, ED.2 + ed3: STRING_ALL, ED.3 + condition: $ed3 NOT_NULL && $ed2 NOT_NULL + expressionsMap: + url: + type: STRING + value: ED.2 + valueCodeableConcept: + valueOf: datatypes/ID/CodeableConcept + specs: ED.2 + expressionType: resource + - expressionType: nested + vars: + ed4: STRING, ED.4 + condition: $ed4 NOT_NULL + expressionsMap: + url: + type: STRING + value: ED.4 + valueString: + valueOf: ED.4 + expressionType: HL7Spec + type: STRING + - expressionType: nested + vars: + ed5: STRING, ED.5 + condition: $ed5 NOT_NULL + expressionsMap: + url: + type: STRING + value: ED.5 + valueString: + valueOf: ED.5 + expressionType: HL7Spec + type: STRING \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner.yml new file mode 100644 index 00000000000..1948f302ead --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner.yml @@ -0,0 +1,50 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + expressionType: HL7Spec + type: STRING + valueOf: EI.1 + +assigner: + valueOf: datatypes/HD/Organization + expressionType: reference + specs: $eiAssigningOrganization + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.2 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.3 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.4 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: ei-assigner-organization-type + valueString: + valueOf: 'organization' \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-Organization.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-Organization.yml new file mode 100644 index 00000000000..7298b64f8c3 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier-Organization.yml @@ -0,0 +1,21 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + expressionType: HL7Spec + type: STRING + valueOf: EI.1 + +assigner: + expressionType: reference + valueOf: datatypes/EI/Organization + specs: $BASE_VALUE + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: ei-assigner-organization-type + valueString: + valueOf: 'default' \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier.yml new file mode 100644 index 00000000000..a130f73960c --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Identifier.yml @@ -0,0 +1,92 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: STRING + valueOf: EI.1 + expressionType: HL7Spec + +type: + condition: $code NOT_NULL || $system NOT_NULL + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: $code + system: + type: STRING + valueOf: $system + +extension_1-assigning-authority: + generateList: true + expressionType: nested + vars: + ei2: EI.2 + ei3: EI.3 + ei4: EI.4 + expressionsMap: + url: + type: SYSTEM_URL + valueOf: assigning-authority + extension_url: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $ei2 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + valueOf: namespace-id + valueString: + type: STRING + expressionType: HL7Spec + valueOf: $ei2 + - expressionType: nested + condition: $ei3 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + valueOf: universal-id + valueString: + type: STRING + expressionType: HL7Spec + valueOf: $ei3 + - expressionType: nested + condition: $ei4 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + valueOf: universal-id-type + valueCode: + type: STRING + expressionType: HL7Spec + valueOf: $ei4 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Organization.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Organization.yml new file mode 100644 index 00000000000..069148e051b --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EI/Organization.yml @@ -0,0 +1,47 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: EI.2 + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: EI.2 + - expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: EI.3 + type: + expressionType: resource + specs: EI.4 + valueOf: datatypes/ID/CodeableConcept + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: "EI.3,EI.4" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/EI/ExtensionEI.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/EI/ExtensionEI.yml new file mode 100644 index 00000000000..90525e16bc8 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/EI/ExtensionEI.yml @@ -0,0 +1,60 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + valueOf: $extensionUrl + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + ei1: STRING, EI.1 + condition: $ei1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: entity-identifier + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.1 + - vars: + ei2: STRING, EI.2 + condition: $ei2 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.2 + - vars: + ei3: STRING, EI.3 + condition: $ei3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.3 + - vars: + ei4: STRING, EI.4 + condition: $ei4 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EI.4 + + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier.yml new file mode 100644 index 00000000000..3360abc1ee8 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier.yml @@ -0,0 +1,81 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: STRING + valueOf: EIP.2.1 + expressionType: HL7Spec + +type: + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "FGN" + system: + type: STRING + valueOf: "http://terminology.hl7.org/CodeSystem/v2-0203" + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.2.2 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.2.3 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.2.4 + - vars: + eip1: STRING_ALL, EIP.1 + extensionUrl: $backupExtension + condition: $eip1 NOT_NULL + expressionType: resource + valueOf: datatypes/EIP/EI/ExtensionEI + specs: EIP.1 + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier.yml new file mode 100644 index 00000000000..73c32876cd4 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier.yml @@ -0,0 +1,82 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: STRING + valueOf: EIP.1.1 + expressionType: HL7Spec + +type: + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "PGN" + system: + type: STRING + valueOf: "http://terminology.hl7.org/CodeSystem/v2-0203" + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.1.2 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.1.3 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: EIP.1.4 + - vars: + eip2: STRING_ALL, EIP.2 + extensionUrl: $backupExtension + condition: $eip2 NOT_NULL + generateList: true + expressionType: resource + valueOf: datatypes/EIP/EI/ExtensionEI + specs: EIP.2 + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/FN/ExtensionHumanName-family.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/FN/ExtensionHumanName-family.yml new file mode 100644 index 00000000000..0216dc917ec --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/FN/ExtensionHumanName-family.yml @@ -0,0 +1,51 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +extension: + generateList: true + expressionType: nested + vars: + fn2: String, FN.2 + fn3: String, FN.3 + fn4: String, FN.4 + fn5: String, FN.5 + expressions: + - expressionType: nested + condition: $fn2 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-own-prefix + valueString: + type: STRING + valueOf: FN.2 + expressionType: HL7Spec + - expressionType: nested + condition: $fn3 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-own-name + valueString: + type: STRING + valueOf: FN.3 + expressionType: HL7Spec + - expressionType: nested + condition: $fn4 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-partner-prefix + valueString: + type: STRING + valueOf: FN.4 + expressionType: HL7Spec + - expressionType: nested + condition: $fn5 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-partner-name + valueString: + type: STRING + valueOf: FN.5 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionAssigningAuthority.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionAssigningAuthority.yml new file mode 100644 index 00000000000..d5fc7cd9d8a --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionAssigningAuthority.yml @@ -0,0 +1,74 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: 'assigning-authority' + +extension_1-namespaceId: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + type: STRING + valueOf: HD.1 + expressionType: HL7Spec + +extension_2-universalId: + generateList: true + condition: $universalIdType EQUALS ISO || $universalIdType EQUALS UUID + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + type: String + valueOf: HD.2 + expressionType: HL7Spec + vars: + universalIdType: String, HD.3 + +extension_3-universalIdType: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueCode: + type: STRING + valueOf: HD.3 + expressionType: HL7Spec + +extension_4-universalIdUnknownType: + condition: $universalIdType NOT_EQUALS ISO && $universalIdType NOT_EQUALS UUID + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-unknown-type + valueCode: + type: STRING + valueOf: HD.2 + expressionType: HL7Spec + vars: + universalIdType: String, HD.3 + +extension_5-universalIdUnknownType: + condition: $universalIdType NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-unknown-type + valueCode: + type: STRING + valueOf: HD.2 + expressionType: HL7Spec + vars: + universalIdType: String, HD.3 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionHD.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionHD.yml new file mode 100644 index 00000000000..931f9f88e8d --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/ExtensionHD.yml @@ -0,0 +1,55 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + expressionType: nested + expressions: + - type: SYSTEM_URL + condition: $isStringUrl NULL + valueOf: $extensionUrl + - type: STRING + condition: $isStringUrl NOT_NULL + valueOf: $extensionUrl + + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + hd1: STRING, HD.1 + condition: $hd1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + type: STRING + valueOf: HD.1 + expressionType: HL7Spec + - vars: + hd2: STRING, HD.2 + condition: $hd2 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + type: STRING + valueOf: HD.2 + expressionType: HL7Spec + - vars: + hd3: STRING, HD.3 + condition: $hd3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + type: STRING + valueOf: HD.3 + expressionType: HL7Spec + + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId.yml new file mode 100644 index 00000000000..b7834cb80d8 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId.yml @@ -0,0 +1,15 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: STRING + expressionType: HL7Spec + valueOf: HD.1 +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: HD.1 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId.yml new file mode 100644 index 00000000000..2d060644c46 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId.yml @@ -0,0 +1,19 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: STRING + expressionType: HL7Spec + valueOf: HD.2 +type: + expressionType: resource + specs: HD.3 + valueOf: datatypes/ID/CodeableConcept +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: "HD.2,HD.3" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Location.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Location.yml new file mode 100644 index 00000000000..3fc98dddbfb --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Location.yml @@ -0,0 +1,74 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +name: + valueOf: HD.1 + type: STRING + expressionType: HL7Spec + +identifier_1: + expressionType: nested + generateList: true + vars: + universalId: String, HD.3 + expressionsMap: + value_1: + condition: $universalId EQUALS ISO || $universalId EQUALS UUID + type: STRING + expressionType: HL7Spec + valueOf: HD.2 + +extension_1-unknownUniversalIdType: + condition: $universalId NOT_EQUALS ISO && $universalId NOT_EQUALS UUID + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-unknown-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: HD.2 + vars: + universalId: STRING, HD.3 + +extension_2-unknownUniversalIdType: + condition: $universalId NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-unknown-type + valueString: + expressionType: HL7Spec + type: STRING + valueOf: HD.2 + vars: + universalId: STRING, HD.3 + +extension_3-universalIdType: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueCode: + expressionType: HL7Spec + type: STRING + valueOf: HD.3 + +physicalType: + valueOf: datatype/CodeableConcept_var + expressionType: resource + constants: + code: si + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Organization.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Organization.yml new file mode 100644 index 00000000000..a1c24c51fce --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/HD/Organization.yml @@ -0,0 +1,91 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier_1: + condition: $hd1 NOT_NULL + vars: + hd1: String, HD.1 + expressionType: nested + generateList: true + expressionsMap: + value_1: + type: STRING + expressionType: HL7Spec + valueOf: HD.1 + extension_1-namespaceId: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: HD.1 + +identifier_2: + condition: $hd2 NOT_NULL + expressionType: nested + generateList: true + vars: + hd3: String, HD.3 + hd2: String, HD.2 + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: HD.2 + type: + valueOf: datatypes/ID/CodeableConceptUniversalid + generateList: true + expressionType: resource + specs: HD.3 + system: + condition: $hd3 EQUALS ISO || $hd3 EQUALS UUID + type: STRING + valueOf: "urn:ietf:rfc:3986" + extension_1-universalId: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: "HD.2,HD.3" + +address: + condition: $organizationCountry NOT_NULL + valueOf: datatypes/XAD/Address + expressionType: resource + generateList: true + vars: + country: $organizationCountry + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $hdOrganizationHL7Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hdOrganizationHL7Field + - expressionType: nested + condition: $hdOrganizationHL7Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hdOrganizationHL7Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConcept.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConcept.yml new file mode 100644 index 00000000000..4b574d46ca6 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConcept.yml @@ -0,0 +1,22 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + condition: $BASE_VALUE NOT_NULL + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + code: + expressionType: HL7Spec + type: STRING + valueOf: $BASE_VALUE + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: codeable-concept-id + valueBoolean: + valueOf: "true" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConceptUniversalid.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConceptUniversalid.yml new file mode 100644 index 00000000000..00490717b2b --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/ID/CodeableConceptUniversalid.yml @@ -0,0 +1,15 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + code: + expressionType: HL7Spec + type: STRING + valueOf: $BASE_VALUE + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v2-0301" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MOC/Extension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MOC/Extension.yml new file mode 100644 index 00000000000..5ef51c9c0d3 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MOC/Extension.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: STRING + valueOf: $mocExtensionName + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + moc1: STRING_ALL, MOC.1 + condition: $moc1 NOT_NULL + expressionsMap: + url: + type: STRING + value: moc-1-1-monetary-amount + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MOC.1.1 + - expressionType: nested + vars: + moc1: STRING_ALL, MOC.1 + condition: $moc1 NOT_NULL + expressionsMap: + url: + type: STRING + value: moc-1-2-monetary-denomination + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MOC.1.2 + - expressionType: nested + vars: + moc2: STRING_ALL, MOC.2 + condition: $moc2 NOT_NULL + expressionsMap: + url: + type: STRING + value: moc-2-charge-code + valueCodeableConcept: + valueOf: datatypes/CE/CodeableConcept + expressionType: resource + specs: MOC.2 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MSG/Coding.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MSG/Coding.yml new file mode 100644 index 00000000000..8199ee3d799 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/MSG/Coding.yml @@ -0,0 +1,24 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +display: + type: STRING + vars: + msg1: MSG.1 + msg2: MSG.2 + msg3: MSG.3 + msgDisplay: MSG.1 + $caret + MSG.2 + $caret + MSG.3 + constants: + caret: "^" + valueOf: $msgDisplay + +code: + type: STRING + expressionType: HL7Spec + valueOf: MSG.2 + +system: + vars: + msg2: MSG.2 + condition: $msg2 NOT_NULL + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v2-0003" \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/HD/Location.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/HD/Location.yml new file mode 100644 index 00000000000..d49f3d48cc1 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/HD/Location.yml @@ -0,0 +1,68 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: nested + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: $BASE_VALUE + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: $BASE_VALUE + +status: + valueOf: $ndlLocationStatus + type: STRING + expressionType: HL7Spec + +mode: + value: 'instance' + type: STRING + +physicalType: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + code: + condition: $physicalTypeCode NOT_EQUALS poc + type: STRING + valueOf: $physicalTypeCode + _code: + condition: $physicalTypeCode EQUALS poc + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + +partOf: + valueOf: datatype/Reference + expressionType: resource + specs: $Location + condition: $refLocation EQUALS $partOfId + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier.value[0].value","String") + + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/IS/Location.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/IS/Location.yml new file mode 100644 index 00000000000..95237101b75 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/IS/Location.yml @@ -0,0 +1,66 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + expressionsMap: + value: + type: STRING + valueOf: IS + expressionType: HL7Spec + +status: + valueOf: $ndlLocationStatus + type: STRING + expressionType: HL7Spec + +mode: + value: 'instance' + type: STRING + +physicalType: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + code: + condition: $physicalTypeCode NOT_EQUALS poc + type: STRING + valueOf: $physicalTypeCode + _code: + condition: $physicalTypeCode EQUALS poc + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + +partOf: + valueOf: datatype/Reference + expressionType: resource + specs: $Location + condition: $refLocation EQUALS $partOfId + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier.value[0].value","String") + + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/NDLExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/NDLExtension.yml new file mode 100644 index 00000000000..9908f03b282 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/NDLExtension.yml @@ -0,0 +1,22 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + valueOf: ndl-practitioner-role + +extension: + vars: + ndl9: NDL.9 + expressionType: nested + generateList: true + expressions: + - expressionType: nested + condition: $ndl9 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: NDL.9 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: NDL.9 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/PractitionerRole.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/PractitionerRole.yml new file mode 100644 index 00000000000..a70671f2b88 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NDL/PractitionerRole.yml @@ -0,0 +1,147 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: PractitionerRole + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +practitioner: + valueOf: datatypes/CNN/Practitioner + expressionType: reference + specs: NDL.1 + +period: + vars: + startDate: NDL.2 + endDate: NDL.3 + condition: $startDate NOT_NULL || $endDate NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(startDate,ZONEID)" + expressionType: JEXL + _start: + expressionType: nested + condition: $startDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $startDate + expressionType: HL7Spec + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(endDate,ZONEID)" + expressionType: JEXL + _end: + expressionType: nested + condition: $endDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $endDate + expressionType: HL7Spec + +location: + generateList: true + expressionType: nested + expressions: + - valueOf: datatypes/NDL/HD/Location + condition: $ndl7 NOT_NULL + expressionType: reference + specs: NDL.7 + vars: + ndlLocationStatus: NDL.8 + ndl7: NDL.7 + constants: + physicalTypeCode: "si" + - valueOf: datatypes/NDL/IS/Location + condition: $ndl10 NOT_NULL + expressionType: reference + specs: NDL.10 + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier[0].value","String") + partOfId: NLD.7.1 + ndlLocationStatus: NDL.8 + ndl10: NDL.10 + constants: + physicalTypeCode: "bu" + - valueOf: datatypes/NDL/IS/Location + condition: $ndl4 NOT_NULL + expressionType: reference + specs: NDL.4 + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier[0].value","String") + partOfId: NLD.10 + ndlLocationStatus: NDL.8 + ndl4: NDL.4 + constants: + physicalTypeCode: "poc" + - valueOf: datatypes/NDL/IS/Location + condition: $ndl11 NOT_NULL + expressionType: reference + specs: NDL.11 + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier[0].value","String") + partOfId: NLD.4 + ndlLocationStatus: NDL.8 + ndl11: NDL.11 + constants: + physicalTypeCode: "lvl" + - valueOf: datatypes/NDL/IS/Location + condition: $ndl5 NOT_NULL + expressionType: reference + specs: NDL.5 + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier[0].value","String") + partOfId: NLD.4 + ndlLocationStatus: NDL.8 + ndl5: NDL.5 + constants: + physicalTypeCode: "ro" + - valueOf: datatypes/NDL/IS/Location + condition: $ndl6 NOT_NULL + expressionType: reference + specs: NDL.6 + vars: + refLocation: $BASE_VALUE, GeneralUtils.extractAttribute(refLocation,"$.identifier[0].value","String") + partOfId: NLD.5 + ndlLocationStatus: NDL.8 + ndl6: NDL.6 + constants: + physicalTypeCode: "bd" + + +extension: + generateList: true + expressionType: nested + condition: $performerParticipationType NOT_NULL + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: event-performerFunction + valueCodeableConcept: + valueOf: datatype/CodeableConcept_var + expressionType: resource + vars: + code: $performerParticipationType + constants: + system: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + - expressionType: resource + valueOf: datatypes/NDL/NDLExtension \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NR/Range.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NR/Range.yml new file mode 100644 index 00000000000..aa68365fc9d --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/NR/Range.yml @@ -0,0 +1,17 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +low: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: NR.1 +high: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: NR.2 + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/Location.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/Location.yml new file mode 100644 index 00000000000..ea6e86567c4 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/Location.yml @@ -0,0 +1,292 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + pl10: STRING_ALL, PL.10 + pl11: STRING_ALL, PL.11 + expressions: + - expressionType: nested + generateList: true + condition: $pl3 NOT_NULL + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.3 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.3 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.2 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.2 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + +physicalType: + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bd" + system: + valueOf: $system + condition: $pl3 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "ro" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + condition: $pl3 NULL && $pl2 NULL && $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl3 NOT_NuLL || $pl2 NOT_NULL || $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl2 NOT_NULL + valueOf: datatypes/PL/LocationBranch1 #PL2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NOT_NULL #PL1 + valueOf: datatypes/PL/LocationBranch2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + valueOf: datatypes/PL/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + valueOf: datatypes/PL/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + valueOf: datatypes/PL/LocationBranch5 + specs: $BASE_VALUE + +status: + expressionType: HL7Spec + valueOf: PL.5 + type: STRING + +mode: + value: "instance" + +description: + type: STRING + expressionType: HL7Spec + valueOf: PL.9 + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: pl6-person-location-type + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PL.6 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch1.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch1.yml new file mode 100644 index 00000000000..f2bbcd73bd3 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch1.yml @@ -0,0 +1,182 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl2 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.2 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.2 + - expressionType: nested + condition: $pl2 NULL && $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl2: STRING, PL.2 + pl1: STRING, PL.1 + pl8: STRING, PL.8 + pl7: STRING, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "ro" + system: + valueOf: $system + condition: $pl2 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + system: + type: STRING + valueOf: $system + condition: $pl2 NULL && $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl2 NOT_NULL || $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl1 NOT_NULL #PL1 + valueOf: datatypes/PL/LocationBranch2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NOT_NULL #PL8 + valueOf: datatypes/PL/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch2.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch2.yml new file mode 100644 index 00000000000..af152d5c8be --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch2.yml @@ -0,0 +1,151 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: nested + condition: $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + condition: $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl8 NOT_NULL #PL8 + valueOf: datatypes/PL/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl8 NULL && $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch3.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch3.yml new file mode 100644 index 00000000000..9803743ebd6 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch3.yml @@ -0,0 +1,110 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch4.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch4.yml new file mode 100644 index 00000000000..a991717d78f --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch4.yml @@ -0,0 +1,82 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl4 NOT_NULL + valueOf: datatypes/PL/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch5.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch5.yml new file mode 100644 index 00000000000..e7a3953d1ab --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PL/LocationBranch5.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + +physicalType: + expressionType: nested + vars: + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl4 NOT_NULL + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PT/Meta.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PT/Meta.yml new file mode 100644 index 00000000000..1d6d14698e3 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/PT/Meta.yml @@ -0,0 +1,37 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +tag: + generateList: true + expressionType: nested + vars: + pt1: STRING, PT.1 + pt2: STRING, PT.2 + condition: $pt1 NOT_NULL || $pt2 NOT_NULL + expressions: + - expressionType: nested + condition: $pt1 NOT_NULL + expressionsMap: + code: + valueOf: PT.1 + expressionType: HL7Spec + type: STRING + system: + value: "http://terminology.hl7.org/CodeSystem/v2-0103" + - expressionType: nested + condition: $pt2 NOT_NULL + expressionsMap: + code: + valueOf: PT.2 + type: STRING + expressionType: HL7Spec + system: + value: "http://terminology.hl7.org/CodeSystem/v2-0207" + +# Currently used to capture MSH.8 +security: + expressionType: nested + generateList: true + expressionsMap: + code: + type: STRING + valueOf: $metaSecurity diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/ExtensionSN.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/ExtensionSN.yml new file mode 100644 index 00000000000..c97ee8bf8be --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/ExtensionSN.yml @@ -0,0 +1,58 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: obx-5-value-sn + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + sn1: STRING, SN.1 + condition: $sn1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.1 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.1 + - vars: + sn2: STRING, SN.2 + condition: $sn2 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.2 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.2 + - vars: + sn3: STRING, SN.3 + condition: $sn3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.3 + - vars: + sn4: STRING, SN.4 + condition: $sn4 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.4 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Quantity.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Quantity.yml new file mode 100644 index 00000000000..1162dab6f0f --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Quantity.yml @@ -0,0 +1,74 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +comparator: + type: STRING + expressionType: HL7Spec + valueOf: SN.1 + +value: + type: STRING + expressionType: HL7Spec + valueOf: SN.2 + +code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWEQuantityUnits.1 + vars: + identifier: CWEQuantityUnits.1 + nameOfCodingSystem: CWEQuantityUnits.3 + +unit: + expressionType: nested + vars: + identifier: CWEQuantityUnits.1 + text: CWEQuantityUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWEQuantityUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWEQuantityUnits.2 + expressionType: HL7Spec + +system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWEQuantityUnits.3 + vars: + identifier: CWEQuantityUnits.1 + nameOfCodingSystem: CWEQuantityUnits.3 + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + sn3: STRING, SN.3 + condition: $sn3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.3 + - vars: + sn4: STRING, SN.4 + condition: $sn4 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.4 + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Range.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Range.yml new file mode 100644 index 00000000000..bf401e617cb --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Range.yml @@ -0,0 +1,106 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +low: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: SN.2 + code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.1 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + unit: + expressionType: nested + vars: + identifier: CWERangeUnits.1 + text: CWERangeUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWERangeUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWERangeUnits.2 + expressionType: HL7Spec + system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.3 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + +high: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: SN.4 + code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.1 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + unit: + expressionType: nested + vars: + identifier: CWERangeUnits.1 + text: CWERangeUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWERangeUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWERangeUnits.2 + expressionType: HL7Spec + system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.3 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + +extension: + expressionType: nested + generateList: true + expressions: + - vars: + sn1: STRING, SN.1 + condition: $sn1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.1 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.1 + - vars: + sn3: STRING, SN.3 + condition: $sn3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.3 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Ratio.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Ratio.yml new file mode 100644 index 00000000000..d68936327d5 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/SN/Ratio.yml @@ -0,0 +1,106 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +numerator: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: SN.2 + code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.1 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + unit: + expressionType: nested + vars: + identifier: CWERangeUnits.1 + text: CWERangeUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWERangeUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWERangeUnits.2 + expressionType: HL7Spec + system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.3 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + +denominator: + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: SN.4 + code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.1 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + unit: + expressionType: nested + vars: + identifier: CWERangeUnits.1 + text: CWERangeUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWERangeUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWERangeUnits.2 + expressionType: HL7Spec + system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWERangeUnits.3 + vars: + identifier: CWERangeUnits.1 + nameOfCodingSystem: CWERangeUnits.3 + +extension: + expressionType: nested + generateList: true + expressions: + - vars: + sn1: STRING, SN.1 + condition: $sn1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.1 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.1 + - vars: + sn3: STRING, SN.3 + condition: $sn3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: SN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SN.3 diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/Address.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/Address.yml new file mode 100644 index 00000000000..1b641e215d3 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/Address.yml @@ -0,0 +1,135 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +line: + expressionType: nested + generateList: true + expressions: + - type: STRING + expressionType: HL7Spec + valueOf: XAD.1.1 + - type: STRING + expressionType: HL7Spec + valueOf: XAD.1.2 + - type: STRING + expressionType: HL7Spec + valueOf: XAD.1.3 + - type: STRING + expressionType: HL7Spec + valueOf: XAD.2 + - type: STRING + expressionType: HL7Spec + valueOf: XAD.19 + +city: + type: STRING + expressionType: HL7Spec + valueOf: XAD.3 + +state: + type: STRING + expressionType: HL7Spec + valueOf: XAD.4 + +postalCode: + type: STRING + expressionType: HL7Spec + valueOf: XAD.5 + +country: + type: STRING + expressionType: HL7Spec + valueOf: $country | XAD.6 + +type: + vars: + xad7: String, XAD.7 + condition: $xad7 EQUALS M || $xad7 EQUALS SH + type: STRING + expressionType: JEXL + valueOf: 'GeneralUtils.getFhirAddressType(xad7)' + +use: + vars: + xad7: String, XAD.7 + condition: $xad7 EQUALS BA || $xad7 EQUALS BI || $xad7 EQUALS C || $xad7 EQUALS B || $xad7 EQUALS H || $xad7 EQUALS O + type: STRING + valueOf: 'GeneralUtils.getFhirAddressUse(xad7)' + expressionType: JEXL + + + +district: + type: STRING + valueOf: XAD.9 + expressionType: HL7Spec + +# XAD.12 is deprecated so the schema favors using XAD.13/14 if either are populated +period: + vars: + xad13: String, XAD.13 + xad14: String, XAD.14 + condition: $xad13 NOT_NULL || $xad14 NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodStart,ZONEID)" + expressionType: JEXL + vars: + periodStart: XAD.13 + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodEnd,ZONEID)" + expressionType: JEXL + vars: + periodEnd: XAD.14 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + xad10: STRING_ALL, XAD.10 + condition: $xad10 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: iso21090-ADXP-censusTract + valueCode: + type: STRING + expressionType: HL7Spec + valueOf: XAD.10 + - vars: + xad7: String, XAD.7 + condition: $xad7 EQUALS HV + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: iso21090-AD-use + valueCode: + type: STRING + valueOf: XAD.7 + expressionType: HL7Spec + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component + - expressionType: resource + valueOf: datatypes/XAD/XADExtension + diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/SADExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/SADExtension.yml new file mode 100644 index 00000000000..fe1872fd7db --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/SADExtension.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: sad-address-line + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + sad1: STRING, SAD.1 + condition: $sad1 NOT_NULL + expressionsMap: + url: + type: STRING + value: SAD.1 + valueString: + type: STRING + valueOf: SAD.1 + expressionType: HL7Spec + - expressionType: nested + vars: + sad2: STRING, SAD.2 + condition: $sad2 NOT_NULL + expressionsMap: + url: + type: STRING + value: SAD.2 + valueString: + type: STRING + valueOf: SAD.2 + expressionType: HL7Spec + - expressionType: nested + vars: + sad3: STRING, SAD.3 + condition: $sad3 NOT_NULL + expressionsMap: + url: + type: STRING + value: SAD.3 + valueString: + type: STRING + valueOf: SAD.3 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/XADExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/XADExtension.yml new file mode 100644 index 00000000000..8944f77d87c --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XAD/XADExtension.yml @@ -0,0 +1,104 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +# This extension stores HL7 fields that are either not mapped to FHIR +# or become ambiguous when mapped +# URL: https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address + +url: + type: SYSTEM_URL + value: xad-address + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: resource + vars: + xad1: STRING_ALL, XAD.1 + condition: $xad1 NOT_NULL + valueOf: datatypes/XAD/SADExtension + specs: XAD.1 + - expressionType: nested + vars: + xad2: STRING_ALL, XAD.2 + condition: $xad2 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.2 + valueString: + type: STRING + valueOf: XAD.2 + expressionType: HL7Spec + - expressionType: nested + vars: + xad6: STRING_ALL, XAD.6 + condition: $xad6 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.6 + valueString: + type: STRING + valueOf: XAD.6 + expressionType: HL7Spec + - expressionType: nested + vars: + xad7: STRING_ALL, XAD.7 + condition: $xad7 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.7 + valueCode: + type: STRING + valueOf: XAD.7 + expressionType: HL7Spec + - expressionType: nested + vars: + xad8: STRING_ALL, XAD.8 + condition: $xad8 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.8 + valueString: + type: STRING + valueOf: XAD.8 + expressionType: HL7Spec + - expressionType: nested + vars: + xad11: STRING_ALL, XAD.11 + condition: $xad11 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.11 + valueCode: + type: STRING + valueOf: XAD.11 + expressionType: HL7Spec + - expressionType: nested + vars: + xad13: STRING, XAD.13 + condition: $xad13 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.13 + valueString: + type: STRING + valueOf: XAD.13 + expressionType: HL7Spec + - expressionType: nested + vars: + xad14: XAD.14 + condition: $xad14 NOT_NULL + expressionsMap: + url: + type: STRING + value: XAD.14 + valueString: + type: STRING + valueOf: XAD.14 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/Practitioner.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/Practitioner.yml new file mode 100644 index 00000000000..908743312c2 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/Practitioner.yml @@ -0,0 +1,228 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Practitioner + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: nested + vars: + xcnhd1: String, XCN.9.1 + xcnhd2: String, XCN.9.2 + xcnhd3: String, XCN.9.3 + xcn9: STRING_ALL, XCN.9 + xcn11: String, XCN.11 + xcn12: String, XCN.12 + xcn13: String, XCN.13 + xcn14: STRING_ALL, XCN.14 + expressionsMap: + value: + type: STRING + valueOf: XCN.1 + expressionType: HL7Spec + # Checking if HD is an Organization or a System by looking at the ID type. + # If ID type is null or ID type is not ISO or UUID, treat as organization. + # Otherwise, treat as system. + assigner_1: + condition: $xcn9 NOT_NULL && $xcnhd3 NULL + valueOf: datatypes/HD/Organization + expressionType: reference + specs: XCN.9 + assigner_2: + condition: $xcn9 NOT_NULL && $xcnhd3 NOT_NULL && $xcnhd3 NOT_EQUALS ISO && $xcnhd3 NOT_EQUALS UUID + valueOf: datatypes/HD/Organization + expressionType: reference + specs: XCN.9 + system: + expressionType: nested + condition: $xcnhd3 EQUALS ISO || $xcnhd3 EQUALS UUID + expressions: + - condition: $xcnhd1 NOT_NULL + expressionType: HL7Spec + type: STRING + valueOf: XCN.9.1 + - condition: $xcnhd1 NULL && $xcnhd3 EQUALS ISO + expressionType: HL7Spec + type: STRING + constants: + prefix: "urn:oid:" + vars: + join: $prefix + $xcnhd2 + valueOf: $join + - condition: $xcnhd1 NULL && $xcnhd3 EQUALS UUID + expressionType: HL7Spec + type: STRING + constants: + prefix: "urn:uuid:" + vars: + join: $prefix + $xcnhd2 + valueOf: $join + type: + condition: $xcn13 NOT_NULL + expressionType: resource + specs: XCN.13 + valueOf: datatypes/ID/CodeableConcept + extension_1-checkDigit: + condition: $xcn11 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: identifier-check-digit + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.11 + extension_2-checkDigitScheme: + condition: $xcn12 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: naming-system-check-digit + valueCode: + valueOf: XCN.12 + type: STRING + expressionType: HL7Spec + extension_3-assigningFacility: + generateList: true + expressionType: nested + condition: $xcn14 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: assigning-facility + valueReference: + valueOf: datatypes/HD/Location + expressionType: reference + specs: XCN.14 + +name: + expressionType: nested + expressionsMap: + family: + type: STRING + valueOf: XCN.2.1 + expressionType: HL7Spec + _family: + expressionType: resource + valueOf: datatypes/FN/ExtensionHumanName-family + specs: XCN.2 + given: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XCN.3 + type: STRING + - expressionType: HL7Spec + valueOf: XCN.4 + type: STRING + suffix: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XCN.5 + type: STRING + - expressionType: HL7Spec + valueOf: XCN.21 + type: STRING + prefix: + type: STRING + valueOf: XCN.6 + expressionType: HL7Spec + use: + type: NAME_USE + valueOf: XCN.10 + expressionType: HL7Spec + # This needs to use variables because the message parses this field using NULLDT since it is deprecated which means that + # the values do not get correctly loaded and will not be mapped over correctly using a spec. + period_1: + vars: + xcn19: String, XCN.19 + xcn20: String, XCN.20 + start: String, XCN.17.1 + end: String, XCN.17.2 + condition: $xcn19 NULL && $xcn20 NULL + expressionType: resource + valueOf: datatypes/DR/Period + # XCN.17 is deprecated so the schema favors using XCN.19/20 if either are populated + period_2: + vars: + xcn19: String, XCN.19 + xcn20: String, XCN.20 + condition: $xcn19 NOT_NULL || $xcn20 NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodStart,ZONEID)" + expressionType: JEXL + vars: + periodStart: XCN.19 + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodEnd,ZONEID)" + expressionType: JEXL + vars: + periodEnd: XCN.20 + extension_AssemblyOrder: + expressionType: nested + generateList: true + vars: + xcn18: String, XCN.18 + condition: $xcn18 NOT_NULL + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-assembly-order + valueCode: + type: STRING + valueOf: XCN.18 + expressionType: HL7Spec + +address: + condition: $XADAddress NOT_NULL + valueOf: datatypes/XAD/Address + expressionType: resource + specs: $XADAddress + generateList: true + +extension: + vars: + xcn9: STRING_ALL, XCN.9 + generateList: true + expressionType: nested + expressions: + - expressionType: resource + condition: $xcn9 NOT_NULL + valueOf: datatypes/HD/ExtensionAssigningAuthority + specs: XCN.9 + - expressionType: resource + valueOf: datatypes/XCN/XCNExtension + - generateList: true + expressionType: nested + condition: $XCNHL7Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $XCNHL7Field + - generateList: true + expressionType: nested + condition: $XCNHL7Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $XCNHL7Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/XCNExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/XCNExtension.yml new file mode 100644 index 00000000000..b56456496df --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XCN/XCNExtension.yml @@ -0,0 +1,177 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: xcn-practitioner + +extension: + expressionType: nested + generateList: true + vars: + xcn3: String, XCN.3 + xcn4: String, XCN.4 + xcn5: String, XCN.5 + xcn8: STRING_ALL, XCN.8 + xcn10: String, XCN.10 + xcn15: String, XCN.12 + xcn16: STRING_ALL, XCN.16 + xcn17: STRING_ALL, XCN.17 + xcn19: String, XCN.19 + xcn20: String, XCN.20 + xcn21: String, XCN.21 + xcn22: STRING_ALL, XCN.22 + xcn23: STRING_ALL, XCN.23 + expressions: + - expressionType: nested + condition: $xcn3 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.3 + - expressionType: nested + condition: $xcn4 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.4 + - expressionType: nested + condition: $xcn5 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.5 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.5 + - expressionType: nested + condition: $xcn8 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.8 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: XCN.8 + - expressionType: nested + condition: $xcn10 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.10 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.10 + - expressionType: nested + condition: $xcn15 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.15 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.15 + - expressionType: nested + condition: $xcn16 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.16 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: XCN.16 + - expressionType: nested + vars: + start: XCN.17.1 + end: XCN.17.2 + condition: $start NOT_NULL || $end NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.17 + extension_1-start: + generateList: true + expressionType: nested + condition: $start NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.17.1 + valueString: + type: STRING + valueOf: $start + expressionType: HL7Spec + extension_2-end: + generateList: true + expressionType: nested + condition: $end NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.17.2 + valueString: + type: STRING + valueOf: $end + expressionType: HL7Spec + - expressionType: nested + condition: $xcn19 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.19 + valueString: + type: STRING + valueOf: $xcn19 + expressionType: HL7Spec + - expressionType: nested + condition: $xcn20 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.20 + valueString: + type: STRING + valueOf: $xcn20 + expressionType: HL7Spec + - expressionType: nested + condition: $xcn21 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XCN.21 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XCN.21 + - expressionType: nested + condition: $xcn22 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.22 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: XCN.22 + - expressionType: nested + condition: $xcn23 NOT_NULL + expressionsMap: + url: + type: STRING + value: XCN.23 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + expressionType: resource + specs: XCN.23 diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/Organization.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/Organization.yml new file mode 100644 index 00000000000..05ca223a0e0 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/Organization.yml @@ -0,0 +1,194 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +name: + type: STRING + valueOf: XON.1 + expressionType: HL7Spec + +identifier: + expressionType: nested + vars: + xon3: XON.3 + xon4: XON.4 + xon5: XON.5 + xon6: XON.6 + xon7: XON.7 + xon8: XON.8 + xon10: String, XON.10 + expressionsMap: + value_1: + condition: $xon10 NULL + type: STRING + expressionType: HL7Spec + valueOf: XON.3 + value_2: + condition: $xon10 NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: XON.10 + type: + condition: $xon7 NOT_NULL + valueOf: datatype/CodeableConcept_var + expressionType: resource + vars: + code: String, XON.7 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + extension_1-checkDigitSchema: + condition: $xon5 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: naming-system-check-digit + valueCode: + valueOf: XON.5 + type: STRING + expressionType: HL7Spec + extension_2-checkDigit: + condition: $xon4 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: identifier-check-digit + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XON.4 + extension_3-assigningAuthority: + condition: $xon6 NOT_NULL + generateList: true + expressionType: resource + valueOf: datatypes/HD/ExtensionAssigningAuthority + specs: XON.6 + extension_4-location: + condition: $xon8 NOT_NULL + generateList: true + expressionType: nested + vars: + xon8: String, XON.8 + expressionsMap: + url: + type: SYSTEM_URL + value: identifier-location + valueReference: + expressionType: reference + valueOf: datatypes/HD/Location + specs: XON.8 + +address: + condition: $XADAddress NOT_NULL + valueOf: datatypes/XAD/Address + expressionType: resource + specs: $XADAddress + +telecom: + expressionType: resource + condition: $XTNTelecom NOT_NULL + valueOf: datatypes/XTN/ContactPoint + generateList: true + specs: $XTNTelecom * + +contact: + expressionType: nested + generateList: true + expressionsMap: + name: + condition: $XPNContactName NOT_NULL + expressionType: resource + generateList: true + specs: $XPNHumanName * + valueOf: datatypes/XPN/HumanName + telecom: + condition: $XPNContactTelecom NOT_NULL + valueOf: datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: $XPNContactTelecom * + address: + condition: $XADContactAddress NOT_NULL + valueOf: datatypes/XAD/Address + generateList: true + expressionType: resource + specs: $XADContactAddress * + +extension: + expressionType: nested + generateList: true + expressions: + - condition: $xon2 NOT_NULL + expressionType: nested + vars: + xon2: XON.2 + expressionsMap: + url: + type: SYSTEM_URL + value: organization-name-type + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XON.2 + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component + - condition: $xon9 NOT_NULL + expressionType: nested + vars: + xon9: String, XON.9 + expressionsMap: + url: + type: SYSTEM_URL + value: name-representation-code + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XON.9 + - expressionType: resource + valueOf: datatypes/XON/XONExtension + - generateList: true + expressionType: nested + condition: $XONHL7Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $XONHL7Field + - generateList: true + expressionType: nested + condition: $XONHL7Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $XONHL7Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/XONExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/XONExtension.yml new file mode 100644 index 00000000000..37c71015f39 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XON/XONExtension.yml @@ -0,0 +1,34 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: xon-organization + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + xon3: STRING_ALL, XON.3 + condition: $xon3 NOT_NULL + expressionsMap: + url: + type: STRING + value: XON.3 + valueString: + expressionType: HL7Spec + type: STRING + valueOf: XON.3 + - expressionType: nested + vars: + xon10: STRING_ALL, XON.10 + condition: $xon10 NOT_NULL + expressionsMap: + url: + type: STRING + value: XON.10 + valueString: + expressionType: HL7Spec + type: STRING + valueOf: XON.10 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/HumanName.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/HumanName.yml new file mode 100644 index 00000000000..9e30b26712e --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/HumanName.yml @@ -0,0 +1,99 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: HumanName + +family: + type: STRING + valueOf: XPN.1.1 + expressionType: HL7Spec +_family: + expressionType: resource + valueOf: datatypes/FN/ExtensionHumanName-family + specs: XPN.1 + +given: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XPN.2 + type: STRING + - expressionType: HL7Spec + valueOf: XPN.3 + type: STRING +suffix: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XPN.4 + type: STRING + - expressionType: HL7Spec + valueOf: XPN.14 + type: STRING +prefix: + type: STRING + valueOf: XPN.5 + expressionType: HL7Spec +use: + type: NAME_USE + valueOf: XPN.7 + expressionType: HL7Spec + +extension_AssemblyOrder: + vars: + xpn11: String, XPN.11 + condition: $xpn11 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-assembly-order + valueCode: + type: STRING + valueOf: XPN.11 + expressionType: HL7Spec + +# XPN.10 is deprecated so the schema favors using XPN.12/13 if either are populated +period_2: + vars: + xpn12: String, XPN.12 + xpn13: String, XPN.13 + condition: $xpn12 NOT_NULL || $xpn13 NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodStart,ZONEID)" + expressionType: JEXL + vars: + periodStart: XPN.12 + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodEnd,ZONEID)" + expressionType: JEXL + vars: + periodEnd: XPN.13 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component + - expressionType: resource + valueOf: datatypes/XPN/XPNExtension \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/XPNExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/XPNExtension.yml new file mode 100644 index 00000000000..be88228b014 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XPN/XPNExtension.yml @@ -0,0 +1,110 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + valueOf: xpn-human-name + +extension: + vars: + xpn2: String, XPN.2 + xpn3: String, XPN.3 + xpn4: String, XPN.4 + xpn7: String, XPN.7 + xpn8: String, XPN.8 + xpn9: STRING_ALL, XPN.9 + xpn12: String, XPN.12 + xpn13: String, XPN.13 + xpn14: String, XPN.14 + expressionType: nested + generateList: true + expressions: + - expressionType: nested + condition: $xpn2 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.2 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.2 + - expressionType: nested + condition: $xpn3 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.3 + - expressionType: nested + condition: $xpn4 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.4 + - expressionType: nested + condition: $xpn7 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.7 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.7 + - expressionType: nested + condition: $xpn8 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.8 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.8 + - expressionType: nested + condition: $xpn9 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.9 + valueCodeableConcept: + valueOf: datatypes/CE/CodeableConcept + expressionType: resource + specs: XPN.9 + - expressionType: nested + condition: $xpn12 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.12 + valueString: + type: STRING + valueOf: $xpn12 + expressionType: HL7Spec + - expressionType: nested + condition: $xpn13 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.13 + valueString: + type: STRING + valueOf: $xpn13 + expressionType: HL7Spec + - expressionType: nested + condition: $xpn14 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.14 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.14 \ No newline at end of file diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/ContactPoint.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/ContactPoint.yml new file mode 100644 index 00000000000..1fa5982ce89 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/ContactPoint.yml @@ -0,0 +1,233 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + expressionType: nested + vars: + telEquipType: String, XTN.3 + commAddress: String, XTN.4 + unformattedTelNum: String, XTN.12 + expressions: + - condition: $telEquipType EQUALS Internet || $telEquipType EQUALS X.400 + valueOf: $commAddress + - condition: $telEquipType NOT_EQUALS Internet && $telEquipType NOT_EQUALS X.400 && $unformattedTelNum NOT_NULL + valueOf: $unformattedTelNum + - condition: $telEquipType NULL && $unformattedTelNum NOT_NULL + valueOf: $unformattedTelNum + +#mapping from HL7 Concept Map: TelecomUseCode +#https://docs.google.com/spreadsheets/d/1EE3a5UIGXLi8wMDr49fWTEVx8QS2GFqYgitE3vLOQTQ/edit#gid=0 +use_1: + condition: $xtnUse EQUALS PRN && $useCode NULL + type: STRING + value: "home" + vars: + xtnUse: String, XTN.2 + +use_2: + condition: $xtnUse EQUALS WPN && $useCode NULL + type: STRING + value: "work" + vars: + xtnUse: String, XTN.2 + +use_3: + condition: $xtnUse EQUALS BPN && $useCode NULL + type: STRING + value: "mobile" + vars: + xtnUse: String, XTN.2 + +use_4: + condition: $useCode NOT_NULL + type: STRING + value: $useCode + +#mapping from HL7 Concept Map: TelecomEquipmentType +#https://docs.google.com/spreadsheets/d/1FhoR5oxEWdHmpR5S0_wYPstdy1lwv7rL-JWJu_DE_Vs/edit#gid=0 +system_1: + # CP maps to "mobile" but that is not a valid option for system + condition: $equipType EQUALS PH || $equipType EQUALS CP + type: STRING + valueOf: "phone" + vars: + equipType: String, XTN.3 + +system_2: + condition: $equipType EQUALS FX + type: STRING + valueOf: "fax" + vars: + equipType: String, XTN.3 + +system_3: + condition: $equipType EQUALS Internet || $equipType EQUALS X.400 + type: STRING + valueOf: "email" + vars: + equipType: String, XTN.3 + +system_4: + condition: $equipType EQUALS BP + type: STRING + valueOf: "pager" + vars: + equipType: String, XTN.3 + +system_5: + condition: $equipType EQUALS MD || $equipType EQUALS SAT || $equipType EQUALS TDD || $equipType EQUALS TTY + type: STRING + valueOf: "other" + vars: + equipType: String, XTN.3 + +system_6: + condition: $telEquipType NULL && $commAddress NOT_NULL + valueOf: "email" + vars: + telEquipType: String, XTN.3 + commAddress: String, XTN.4 + +system_7: + condition: $telEquipType NULL && $commAddress NULL + expressionType: nested + vars: + telEquipType: String, XTN.3 + commAddress: String, XTN.4 + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: "data-absent-reason" + valueCode: + value: unknown + +period: + vars: + startDate: XTN.13 + endDate: XTN.14 + condition: $startDate NOT_NULL || $endDate NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(startDate,ZONEID)" + expressionType: JEXL + _start: + expressionType: nested + condition: $startDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $startDate + expressionType: HL7Spec + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(endDate,ZONEID)" + expressionType: JEXL + _end: + expressionType: nested + condition: $endDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $endDate + expressionType: HL7Spec + +rank: + type: POSITIVEINT + valueOf: XTN.18 + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressions: + - condition: $countryCode NOT_NULL + expressionType: nested + vars: + countryCode: String, XTN.5 + expressionsMap: + url: + type: SYSTEM_URL + value: contactpoint-country + valueString: + value: $countryCode + - condition: $areaCode NOT_NULL + expressionType: nested + vars: + areaCode: String, XTN.6 + expressionsMap: + url: + type: SYSTEM_URL + value: contactpoint-area + valueString: + value: $areaCode + - condition: $telEquipType NOT_EQUALS Internet && $telEquipType NOT_EQUALS X.400 && $contactPointLocal NOT_NULL + expressionType: nested + vars: + telEquipType: String, XTN.3 + contactPointLocal: String, XTN.7 + expressionsMap: + url: + type: SYSTEM_URL + value: contactpoint-local + valueString: + value: $contactPointLocal + - condition: $telEquipType NULL && $contactPointLocal NOT_NULL + expressionType: nested + vars: + telEquipType: String, XTN.3 + contactPointLocal: String, XTN.7 + expressionsMap: + url: + type: SYSTEM_URL + value: contactpoint-local + valueString: + value: $contactPointLocal + - condition: $numExt NOT_NULL + expressionType: nested + vars: + numExt: String, XTN.8 + expressionsMap: + url: + type: SYSTEM_URL + value: contactpoint-extension + valueString: + value: $numExt + - expressionType: resource + valueOf: datatypes/XTN/XTNExtension + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component diff --git a/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/XTNExtension.yml b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/XTNExtension.yml new file mode 100644 index 00000000000..660874eead5 --- /dev/null +++ b/prime-router/metadata/HL7/datatypes/v251/hl7/datatypes/XTN/XTNExtension.yml @@ -0,0 +1,81 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: xtn-contact-point + +extension: + generateList: true + expressionType: nested + expressions: + - condition: $xtn2 NOT_NULL + expressionType: nested + vars: + xtn2: String, XTN.2 + expressionsMap: + url: + type: STRING + value: XTN.2 + valueString: + value: $xtn2 + - condition: $xtn3 NOT_NULL + expressionType: nested + vars: + xtn3: String, XTN.3 + expressionsMap: + url: + type: STRING + value: XTN.3 + valueString: + value: $xtn3 + - condition: $xtn4 NOT_NULL + expressionType: nested + vars: + xtn4: String, XTN.4 + expressionsMap: + url: + type: STRING + value: XTN.4 + valueString: + value: $xtn4 + - condition: $xtn7 NOT_NULL + expressionType: nested + vars: + xtn7: String, XTN.7 + expressionsMap: + url: + type: STRING + value: XTN.7 + valueString: + value: $xtn7 + - condition: $xtn9 NOT_NULL + expressionType: nested + vars: + xtn9: String, XTN.9 + expressionsMap: + url: + type: STRING + value: XTN.9 + valueString: + type: STRING + valueOf: $xtn9 + - condition: $xtn11 NOT_NULL + expressionType: nested + vars: + xtn11: String, XTN.11 + expressionsMap: + url: + type: STRING + value: XTN.11 + valueString: + value: $xtn11 + - condition: $xtn12 NOT_NULL + expressionType: nested + vars: + xtn12: String, XTN.12 + expressionsMap: + url: + type: STRING + value: XTN.12 + valueString: + value: $xtn12 diff --git a/prime-router/metadata/HL7/v251-elr/config.properties b/prime-router/metadata/HL7/v251-elr/config.properties new file mode 100644 index 00000000000..9362725bdf4 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/config.properties @@ -0,0 +1,5 @@ +base.path.resource=./metadata/HL7/v251-elr +supported.hl7.messages=ORU_R01,ORM_O01 +default.zoneid=+00:00 +additional.conceptmap.file= +additional.resources.location=./metadata/HL7/datatypes/v251 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/fhir/resourcemapping.yml b/prime-router/metadata/HL7/v251-elr/fhir/resourcemapping.yml new file mode 100644 index 00000000000..6c73f0434b7 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/fhir/resourcemapping.yml @@ -0,0 +1,23 @@ +Patient: org.hl7.fhir.r4.model.Patient +Encounter: org.hl7.fhir.r4.model.Encounter +Observation: org.hl7.fhir.r4.model.Observation +AllergyIntolerance: org.hl7.fhir.r4.model.AllergyIntolerance +Condition: org.hl7.fhir.r4.model.Condition +Practitioner: org.hl7.fhir.r4.model.Practitioner +PractitionerRole: org.hl7.fhir.r4.model.PractitionerRole +DiagnosticReport: org.hl7.fhir.r4.model.DiagnosticReport +Immunization: org.hl7.fhir.r4.model.Immunization +Organization: org.hl7.fhir.r4.model.Organization +MessageHeader: org.hl7.fhir.r4.model.MessageHeader +Medication: org.hl7.fhir.r4.model.Medication +Specimen: org.hl7.fhir.r4.model.Specimen +Procedure: org.hl7.fhir.r4.model.Procedure +DocumentReference: org.hl7.fhir.r4.model.DocumentReference +ServiceRequest: org.hl7.fhir.r4.model.ServiceRequest +MedicationRequest: org.hl7.fhir.r4.model.MedicationRequest +Device: org.hl7.fhir.r4.model.Device +Coverage: org.hl7.fhir.r4.model.Coverage +RelatedPerson: org.hl7.fhir.r4.model.RelatedPerson +Provenance: org.hl7.fhir.r4.model.Provenance +Location: org.hl7.fhir.r4.model.Location +EpisodeOfCare: org.hl7.fhir.r4.model.EpisodeOfCare \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/codesystem/CodingSystemMapping.yml b/prime-router/metadata/HL7/v251-elr/hl7/codesystem/CodingSystemMapping.yml new file mode 100644 index 00000000000..08270014ad8 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/codesystem/CodingSystemMapping.yml @@ -0,0 +1,4538 @@ +# Coding System for values from https://www.hl7.org/fhir/v2/0396/index.html +--- + +- id: "ACR" + description: "American College of Radiology finding codes" + url: "http://terminology.hl7.org/CodeSystem/ACR" + oid: "urn:oid:2.16.840.1.113883.6.76" +- id: "ART" + description: "WHO Adverse Reaction Terms" + url: "http://terminology.hl7.org/CodeSystem/art" + oid: "urn:oid:2.16.840.1.113883.6.74" +- id: "AS4" + description: "ASTM E1238/ E1467 Universal" + url: "http://terminology.hl7.org/CodeSystem/AS4" + oid: "urn:oid:2.16.840.1.113883.6.30" +- id: "AS4E" + description: "AS4 Neurophysiology Codes" + url: "http://terminology.hl7.org/CodeSystem/AS4E" + oid: "urn:oid:2.16.840.1.113883.6.78" + +- id: "C5" + description: "CPT-5" + url: "http://terminology.hl7.org/CodeSystem/C5" + oid: "urn:oid:2.16.840.1.113883.6.82" +- id: "CAS" + description: "Chemical abstract codes" + url: "http://terminology.hl7.org/CodeSystem/CAS" + oid: "urn:oid:2.16.840.1.113883.6.61" +- id: "CCC" + description: "Clinical Care Classification system" + url: "http://terminology.hl7.org/CodeSystem/CCC" + oid: "urn:oid:2.16.840.1.113883.6.236" +- id: "CD2" + description: "American Dental Association's Current Dental Terminology 2 (CDT-2) codes." + url: "http://terminology.hl7.org/CodeSystem/CD2" + oid: "urn:oid:2.16.840.1.113883.6.13" +- id: "CDCA" + description: "CDC Analyte Codes" + url: "http://terminology.hl7.org/CodeSystem/CDCA" + oid: "urn:oid:2.16.840.1.113883.6.57" +- id: "CDCM" + description: "CDC Methods/Instruments Codes" + url: "http://terminology.hl7.org/CodeSystem/CDCM" + oid: "urn:oid:2.16.840.1.113883.6.58" +- id: "CDS" + description: "CDC Surveillance" + url: "http://terminology.hl7.org/CodeSystem/CDS" + oid: "urn:oid:2.16.840.1.113883.6.79" +- id: "CE" + description: "CEN ECG diagnostic codes" + url: "http://terminology.hl7.org/CodeSystem/CE" + oid: "urn:oid:2.16.840.1.113883.6.80" +- id: "CLP" + description: "CLIP" + url: "http://terminology.hl7.org/CodeSystem/CLP" + oid: "urn:oid:2.16.840.1.113883.6.81" +- id: "CPTM" + description: "CPT Modifier Code" + url: "http://www.ama-assn.org/go/cpt" + oid: "urn:oid:2.16.840.1.113883.6.12" +- id: "CST" + description: "COSTART" + url: "http://terminology.hl7.org/CodeSystem/CST" + oid: "urn:oid:2.16.840.1.113883.6.62" +- id: "CVX" + description: "CDC Vaccine Codes" + url: "http://hl7.org/fhir/sid/cvx" + oid: "urn:oid:2.16.840.1.113883.6.59" +- id: "DCM" + description: "DICOM Controlled Terminology" + url: "http://dicom.nema.org/resources/ontology/DCM" + oid: "urn:oid:1.2.840.10008.2.16.4" +- id: "E" + description: "EUCLIDES" + url: "http://terminology.hl7.org/CodeSystem/euclides" + oid: "urn:oid:2.16.840.1.113883.6.34" +- id: "E5" + description: "Euclides quantity codes" + url: "http://terminology.hl7.org/CodeSystem/E5" + oid: "urn:oid:2.16.840.1.113883.6.35" +- id: "E6" + description: "Euclides Lab method codes" + url: "http://terminology.hl7.org/CodeSystem/E6" + oid: "urn:oid:2.16.840.1.113883.6.36" +- id: "E7" + description: "Euclides Lab equipment codes" + url: "http://terminology.hl7.org/CodeSystem/E7" + oid: "urn:oid:2.16.840.1.113883.6.37" +- id: "ENZC" + description: "Enzyme Codes" + url: "http://terminology.hl7.org/CodeSystem/ENZC" + oid: "urn:oid:2.16.840.1.113883.6.33" +- id: "FDDC" + description: "First DataBank Drug Codes" + url: "http://terminology.hl7.org/CodeSystem/FDDC" + oid: "urn:oid:2.16.840.1.113883.6.64" +- id: "FDDX" + description: "First DataBank Diagnostic Codes" + url: "http://terminology.hl7.org/CodeSystem/FDDX" + oid: "urn:oid:2.16.840.1.113883.6.63" +- id: "FDK" + description: "FDA K10" + url: "http://terminology.hl7.org/CodeSystem/fdk" + oid: "urn:oid:2.16.840.1.113883.6.38" + +- id: "HB" + description: "HIBCC" + url: "http://terminology.hl7.org/CodeSystem/hibccHIN" + oid: "urn:oid:2.16.840.1.113883.6.40" +- id: "HCPCS" + description: "The Healthcare Common Procedure Coding System (HCPCS)" + url: "http://terminology.hl7.org/CodeSystem/HCPCS" + oid: "urn:oid:2.16.840.1.113883.6.14" +- id: "HHC" + description: "Home Health Care" + url: "http://terminology.hl7.org/CodeSystem/hhcc" + oid: "urn:oid:2.16.840.1.113883.6.17" +- id: "hi" + description: "Health Outcomes" + url: "http://terminology.hl7.org/CodeSystem/hi" + oid: "urn:oid:2.16.840.1.113883.6.39" +- id: "HPC" + description: "CMS (formerly HCFA )Procedure Codes (HCPCS)" + url: "http://terminology.hl7.org/CodeSystem/HCPCS" + oid: "urn:oid:2.16.840.1.113883.6.14" +- id: "I10" + description: "ICD-10" + # change from http://hl7.org/fhir/sid/icd-10 to http://hl7.org/fhir/sid/icd-10-cm, assuming US ICD-10-CM system + url: "http://hl7.org/fhir/sid/icd-10-cm" + oid: "urn:oid:2.16.840.1.113883.6.3" +- id: "ICD-10" + description: "ICD-10" + # change from http://hl7.org/fhir/sid/icd-10 to http://hl7.org/fhir/sid/icd-10-cm, assuming US ICD-10-CM system + url: "http://hl7.org/fhir/sid/icd-10-cm" + oid: "urn:oid:2.16.840.1.113883.6.3" +- id: "I10P" + description: "ICD-10 Procedure Codes" + url: "http://www.cms.gov/Medicare/Coding/ICD10" + oid: "urn:oid:2.16.840.1.113883.6.4" +- id: "I9" + description: "ICD9" + url: "http://terminology.hl7.org/CodeSystem/icd9" + oid: "urn:oid:2.16.840.1.113883.6.42" +- id: "ICD-9" + description: "ICD9" + url: "http://terminology.hl7.org/CodeSystem/icd9" + oid: "urn:oid:2.16.840.1.113883.6.42" +- id: "I9C" + description: "ICD-9CM" + url: "http://terminology.hl7.org/CodeSystem/icd9cm" + oid: "urn:oid:2.16.840.1.113883.6.2" +- id: "I9CDX" + description: "ICD-9CM Diagnosis codes" + url: "http://terminology.hl7.org/CodeSystem/ICD-9CM-diagnosiscodes" + oid: "urn:oid:2.16.840.1.113883.6.103" +- id: "I9CP" + description: "ICD-9CM Procedure codes" + url: "http://terminology.hl7.org/CodeSystem/ICD-9CM-procedurecodes" + oid: "urn:oid:2.16.840.1.113883.6.104" +- id: "IBT" + description: "ISBT" + url: "http://terminology.hl7.org/CodeSystem/ib" + oid: "urn:oid:2.16.840.1.113883.6.18" + +- id: "ICD10CA" + description: "ICD-10 Canada" + url: "http://hl7.org/fhir/sid/icd-10-ca" + oid: "urn:oid:2.16.840.1.113883.6.94" +- id: "ICD10GM2007" + description: "ICD 10 Germany v2007" + url: "http://terminology.hl7.org/CodeSystem/dmdICD10" + oid: "urn:oid:2.16.840.1.113883.6.3.3" +- id: "ICD10GM2008" + description: "ICD 10 Germany v2008" + url: "http://terminology.hl7.org/CodeSystem/dmdICD10" + oid: "urn:oid:2.16.840.1.113883.6.3.3" +- id: "ICDO" + description: "International Classification of Diseases for Oncology" + url: "http://terminology.hl7.org/CodeSystem/icd-o" + oid: "urn:oid:2.16.840.1.113883.6.43" +- id: "ICS" + description: "ICCS" + url: "http://terminology.hl7.org/CodeSystem/ics" + oid: "urn:oid:2.16.840.1.113883.6.41" +- id: "ICSD" + description: "International Classification of Sleep Disorders" + url: "http://terminology.hl7.org/CodeSystem/ICSD" + oid: "urn:oid:2.16.840.1.113883.6.45" + +- id: "IUPC" + description: "IUPAC/IFCC Component Codes" + url: "http://terminology.hl7.org/CodeSystem/IUPC" + oid: "urn:oid:2.16.840.1.113883.6.47" +- id: "IUPP" + description: "IUPAC/IFCC Property Codes" + url: "http://terminology.hl7.org/CodeSystem/IUPP" + oid: "urn:oid:2.16.840.1.113883.6.46" + +- id: "JC8" + description: "Japanese Chemistry" + url: "http://terminology.hl7.org/CodeSystem/JC8" + oid: "urn:oid:2.16.840.1.113883.6.48" + +- id: "LN" + description: "Logical Observation Identifier Names and Codes (LOINC)" + url: "http://loinc.org" + oid: "urn:oid:2.16.840.1.113883.6.1" +- id: "L" + description: "Local general code" + url: "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL" +- id: "MDC" + description: "Medical Device Communication" + url: "urn:iso:std:iso:11073:10101" + oid: "urn:oid:2.16.840.1.113883.6.24" +- id: "MDDX" + description: "Medispan Diagnostic Codes" + url: "http://terminology.hl7.org/CodeSystem/MDDX" + oid: "urn:oid:2.16.840.1.113883.6.65" +- id: "MEDC" + description: "Medical Economics Drug Codes" + url: "http://terminology.hl7.org/CodeSystem/MEDC" + oid: "urn:oid:2.16.840.1.113883.6.67" + +- id: "MEDX" + description: "Medical Economics Diagnostic Codes" + url: "http://terminology.hl7.org/CodeSystem/MEDX" + oid: "urn:oid:2.16.840.1.113883.6.66" +- id: "MGPI" + description: "Medispan GPI" + url: "http://terminology.hl7.org/CodeSystem/MGPI" + oid: "urn:oid:2.16.840.1.113883.6.68" +- id: "MVX" + description: "CDC Vaccine Manufacturer Codes" + url: "http://terminology.hl7.org/CodeSystem/MVX" + oid: "urn:oid:2.16.840.1.113883.6.60" +- id: "NDA" + description: "NANDA" + url: "http://www.nanda.org/" + oid: "urn:oid:2.16.840.1.113883.6.20" +- id: "NDC" + description: "National drug codes" + url: "http://hl7.org/fhir/sid/ndc" + oid: "urn:oid:2.16.840.1.113883.6.69" +- id: "NIC" + description: "Nursing Interventions Classification" + url: "https://nursing.uiowa.edu/cncce/nursing-interventions-classification-overview" + oid: "urn:oid:2.16.840.1.113883.6.15" + +- id: "OHA" + description: "Omaha System" + url: "http://terminology.hl7.org/CodeSystem/oms" + oid: "urn:oid:2.16.840.1.113883.6.98" + +- id: "POS" + description: "POS Codes" + url: "http://terminology.hl7.org/CodeSystem/POS" + oid: "urn:oid:2.16.840.1.113883.6.50" + +- id: "SCT" + description: "SNOMED Clinical Terms" + url: "http://snomed.info/sct" + oid: "urn:oid:2.16.840.1.113883.6.96" + +- id: "SDM" + description: "SNOMED-DICOM Microglossary" + url: "http://terminology.hl7.org/CodeSystem/SDM" + oid: "urn:oid:2.16.840.1.113883.6.53" +- id: "SNM" + description: "Systemized Nomenclature in Medicine (SNOMED)" + url: "http://terminology.hl7.org/CodeSystem/snm" + oid: "urn:oid:2.16.840.1.113883.6.5" +- id: "SNM3" + description: "SNOMED International" + url: "http://terminology.hl7.org/CodeSystem/SNM3" + oid: "urn:oid:2.16.840.1.113883.6.51" +- id: "SNT" + description: "SNOMED topology codes (anatomic sites)" + url: "http://terminology.hl7.org/CodeSystem/SNT" + oid: "urn:oid:2.16.840.1.113883.6.52" + +- id: "UC" + description: "UCDS" + url: "http://terminology.hl7.org/CodeSystem/UC" + oid: "urn:oid:2.16.840.1.113883.6.54" +- id: "UCUM" + description: "UCUM code set for units of measure(from Regenstrief)" + url: "http://unitsofmeasure.org" + oid: "urn:oid:2.16.840.1.113883.6.8" +- id: "UMD" + description: "MDNS" + url: "http://terminology.hl7.org/CodeSystem/UMD" + oid: "urn:oid:2.16.840.1.113883.6.75" +- id: "UML" + description: "Unified Medical Language" + url: "http://terminology.hl7.org/CodeSystem/UML" + oid: "urn:oid:2.16.840.1.113883.6.56" +- id: "UPC" + description: "Universal Product Code" + url: "http://terminology.hl7.org/CodeSystem/UPC" + oid: "urn:oid:2.16.840.1.113883.6.55" +- id: "W4" + description: "WHO rec\\# code with ASTM extension" + url: "http://terminology.hl7.org/CodeSystem/W4" + oid: "urn:oid:2.16.840.1.113883.6.72" + +- id: "PHOccupationCDCCensus2010" + description: "Occupation CDC Census 2010" + url: "http://terminology.hl7.org/CodeSystem/PHOccupationCDCCensus2010" + oid: "urn:oid:2.16.840.1.114222.4.5.314" +- id: "v3-ManagedParticipationStatus" + description: "ManagedParticipationStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-ManagedParticipationStatus" + oid: "urn:oid:2.16.840.1.113883.5.1062" +- id: "v2-0280" + description: "referralPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0280" + oid: "urn:oid:2.16.840.1.113883.18.173" +- id: "NHSNProcedureCategory" + description: "NHSN Procedure Category" + url: "http://terminology.hl7.org/CodeSystem/NHSNProcedureCategory" + oid: "urn:oid:2.16.840.1.113883.6.271" +- id: "v2-0003" + description: "eventType" + url: "http://terminology.hl7.org/CodeSystem/v2-0003" + oid: "urn:oid:2.16.840.1.113883.18.4" +- id: "special-values" + description: "SpecialValues" + url: "http://terminology.hl7.org/CodeSystem/special-values" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1049" +- id: "communication-not-done-reason" + description: "CommunicationNotDoneReason" + url: "http://terminology.hl7.org/CodeSystem/communication-not-done-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1077" +- id: "v2-0146" + description: "amountType" + url: "http://terminology.hl7.org/CodeSystem/v2-0146" + oid: "urn:oid:2.16.840.1.113883.18.67" +- id: "v2-0516" + description: "errorSeverity" + url: "http://terminology.hl7.org/CodeSystem/v2-0516" + oid: "urn:oid:2.16.840.1.113883.18.337" +- id: "v2-0238" + description: "eventSeriousness" + url: "http://terminology.hl7.org/CodeSystem/v2-0238" + oid: "urn:oid:2.16.840.1.113883.18.137" +- id: "v2-0392" + description: "matchReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0392" + oid: "urn:oid:2.16.840.1.113883.18.243" +- id: "medicationrequest-course-of-therapy" + description: "MedicationRequest Course of Therapy Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1327" +- id: "audit-event-outcome" + description: "AuditEventOutcome" + url: "http://terminology.hl7.org/CodeSystem/audit-event-outcome" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "v2-0404" + description: "languageProficiency" + url: "http://terminology.hl7.org/CodeSystem/v2-0404" + oid: "urn:oid:2.16.840.1.113883.18.253" +- id: "v2-0384" + description: "substanceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0384" + oid: "urn:oid:2.16.840.1.113883.18.237" +- id: "benefit-type" + description: "Benefit Type Codes" + url: "http://terminology.hl7.org/CodeSystem/benefit-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1176" +- id: "claim-type" + description: "Claim Type Codes" + url: "http://terminology.hl7.org/CodeSystem/claim-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1156" +- id: "catalogType" + description: "CatalogType" + url: "http://terminology.hl7.org/CodeSystem/catalogType" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1288" +- id: "practitioner-role" + description: "Practitioner role" + url: "http://terminology.hl7.org/CodeSystem/practitioner-role" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1132" +- id: "v2-0107" + description: "deferredResponseType" + url: "http://terminology.hl7.org/CodeSystem/v2-0107" + oid: "urn:oid:2.16.840.1.113883.18.44" +- id: "DEEDS210" + description: "DEEDS2.10" + url: "http://terminology.hl7.org/CodeSystem/DEEDS210" + oid: "urn:oid:2.16.840.1.113883.6.102.2.10" +- id: "v2-0557" + description: "payeeType" + url: "http://terminology.hl7.org/CodeSystem/v2-0557" + oid: "urn:oid:2.16.840.1.113883.18.361" +- id: "v2-0279" + description: "allowSubstitution" + url: "http://terminology.hl7.org/CodeSystem/v2-0279" + oid: "urn:oid:2.16.840.1.113883.18.172" +- id: "reaction-event-certainty" + description: "AllergyIntoleranceCertainty" + url: "http://terminology.hl7.org/CodeSystem/reaction-event-certainty" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1276" +- id: "v3-AcknowledgementCondition" + description: "AcknowledgementCondition" + url: "http://terminology.hl7.org/CodeSystem/v3-AcknowledgementCondition" + oid: "urn:oid:2.16.840.1.113883.5.1050" +- id: "v2-0916" + description: "relevantClincialInformation" + url: "http://terminology.hl7.org/CodeSystem/v2-0916" + oid: "urn:oid:2.16.840.1.113883.18.422" +- id: "v2-0445" + description: "identityReliability" + url: "http://terminology.hl7.org/CodeSystem/v2-0445" + oid: "urn:oid:2.16.840.1.113883.18.285" +- id: "v2-0500" + description: "consentDisclosureLevel" + url: "http://terminology.hl7.org/CodeSystem/v2-0500" + oid: "urn:oid:2.16.840.1.113883.18.324" +- id: "v2-0150" + description: "certificationPatientType" + url: "http://terminology.hl7.org/CodeSystem/v2-0150" + oid: "urn:oid:2.16.840.1.113883.18.71" +- id: "X12.3" + description: "X12.3 Data Elementary Dictionary" + url: "http://terminology.hl7.org/CodeSystem/X12.3" + oid: "urn:oid:2.16.840.1.113883.6.255" +- id: "allerg-intol-substance-exp-risk" + description: "AllergyIntoleranceSubstanceExposureRisk" + url: "http://terminology.hl7.org/CodeSystem/allerg-intol-substance-exp-risk" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1275" +- id: "v2-0717" + description: "accessRestrictionValue" + url: "http://terminology.hl7.org/CodeSystem/v2-0717" + oid: "urn:oid:2.16.840.1.113883.18.388" +- id: "diagnosis-role" + description: null + url: "http://terminology.hl7.org/CodeSystem/diagnosis-role" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1054" +- id: "v2-0202" + description: "telecommunicationEquipmentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0202" + oid: "urn:oid:2.16.840.1.113883.18.107" +- id: "sic" + description: "US Census Bureau" + url: "http://terminology.hl7.org/CodeSystem/sic" + oid: "urn:oid:2.16.840.1.113883.6.232" +- id: "dicomMDLTY" + description: "DICOM modality codes" + url: "http://terminology.hl7.org/CodeSystem/dicomMDLTY" + oid: "urn:oid:2.16.840.1.113883.6.31" +- id: "v3-AddressPartType" + description: "AddressPartType" + url: "http://terminology.hl7.org/CodeSystem/v3-AddressPartType" + oid: "urn:oid:2.16.840.1.113883.5.16" +- id: "v3-DataOperation" + description: "DataOperation" + url: "http://terminology.hl7.org/CodeSystem/v3-DataOperation" + oid: "urn:oid:2.16.840.1.113883.5.1123" +- id: "GCDF" + description: "GCDF" + url: "http://terminology.hl7.org/CodeSystem/GCDF" + oid: "urn:oid:2.16.840.1.113883.4.79" +- id: "v2-0255" + description: "durationCategories" + url: "http://terminology.hl7.org/CodeSystem/v2-0255" + oid: "urn:oid:2.16.840.1.113883.18.150" +- id: "v3-ActRelationshipJoin" + description: "ActRelationshipJoin" + url: "http://terminology.hl7.org/CodeSystem/v3-ActRelationshipJoin" + oid: "urn:oid:2.16.840.1.113883.5.12" +- id: "v3-EntityNameUse" + description: "EntityNameUse" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNameUse" + oid: "urn:oid:2.16.840.1.113883.5.45" +- id: "medication-usage-admin-location" + description: "MedicationUsage Administration Location Codes" + url: "http://terminology.hl7.org/CodeSystem/medication-usage-admin-location" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "v2-0469" + description: "packagingStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0469" + oid: "urn:oid:2.16.840.1.113883.18.298" +- id: "v2-0193" + description: "amountClass" + url: "http://terminology.hl7.org/CodeSystem/v2-0193" + oid: "urn:oid:2.16.840.1.113883.18.103" +- id: "location-physical-type" + description: "Location type" + url: "http://terminology.hl7.org/CodeSystem/location-physical-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1108" +- id: "FDBHICCode" + description: "FDB HIC Code" + url: "http://terminology.hl7.org/CodeSystem/FDBHICCode" + oid: "urn:oid:2.16.840.1.113883.3.84" +- id: "v2-0243" + description: "identityMayBeDivulged" + url: "http://terminology.hl7.org/CodeSystem/v2-0243" + oid: "urn:oid:2.16.840.1.113883.18.142" +- id: "v3-VaccineType" + description: "VaccineType" + url: "http://terminology.hl7.org/CodeSystem/v3-VaccineType" + oid: "urn:oid:2.16.840.1.113883.5.145" +- id: "v2-0490" + description: "specimenRejectReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0490" + oid: "urn:oid:2.16.840.1.113883.18.314" +- id: "subscription-channel-type" + description: "SubscriptionChannel Type Codes" + url: "http://terminology.hl7.org/CodeSystem/subscription-channel-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1432" +- id: "v2-0185" + description: "preferredMethodOfContact" + url: "http://terminology.hl7.org/CodeSystem/v2-0185" + oid: "urn:oid:2.16.840.1.113883.18.98" +- id: "v2-0351" + description: "nubc-OccurrenceSpan-cs" + url: "http://terminology.hl7.org/CodeSystem/v2-0351" + oid: "urn:oid:2.16.840.1.113883.6.301.8" +- id: "DEEDS416" + description: "DEEDS416" + url: "http://terminology.hl7.org/CodeSystem/DEEDS416" + oid: "urn:oid:2.16.840.1.113883.6.102.4.16" +- id: "v3-hl7PublishingDomain" + description: "HL7PublishingDomain" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7PublishingDomain" + oid: "urn:oid:2.16.840.1.113883.5.1136" +- id: "v2-0214" + description: "specialProgram" + url: "http://terminology.hl7.org/CodeSystem/v2-0214" + oid: "urn:oid:2.16.840.1.113883.18.118" +- id: "v3-ObservationCategory" + description: "ObservationCategory" + url: "http://terminology.hl7.org/CodeSystem/v3-ObservationCategory" + oid: "urn:oid:2.16.840.1.113883.4.642.1.222" +- id: "v2-0428" + description: "incidentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0428" + oid: "urn:oid:2.16.840.1.113883.18.269" +- id: "dicomqry" + description: "DICOM Query Label" + url: "http://terminology.hl7.org/CodeSystem/dicomqry" + oid: "urn:oid:2.16.840.1.113883.6.32" +- id: "v3-ParameterizedDataType" + description: "ParameterizedDataType" + url: "http://terminology.hl7.org/CodeSystem/v3-ParameterizedDataType" + oid: "urn:oid:2.16.840.1.113883.5.87" +- id: "externalCodeSystems" + description: "HL7 Registered External Coding Systems" + url: "http://terminology.hl7.org/CodeSystem/externalCodeSystems" + oid: "urn:oid:2.16.840.1.113883.6" +- id: "device-status-reason" + description: "FHIRDeviceStatusReason" + url: "http://terminology.hl7.org/CodeSystem/device-status-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1082" +- id: "resource-security-category" + description: "ResourceSecurityCategory" + url: "http://terminology.hl7.org/CodeSystem/resource-security-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1404" +- id: "v2-0263" + description: "levelOfCare" + url: "http://terminology.hl7.org/CodeSystem/v2-0263" + oid: "urn:oid:2.16.840.1.113883.18.158" +- id: "media-category" + description: "Digital Media Category" + url: "http://terminology.hl7.org/CodeSystem/media-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.326" +- id: "W1-W2" + description: "WHO rec# drug codes" + url: "http://terminology.hl7.org/CodeSystem/W1-W2" + oid: "urn:oid:2.16.840.1.113883.6.71" +- id: "v2-0326" + description: "visitIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0326" + oid: "urn:oid:2.16.840.1.113883.18.199" +- id: "v2-0776" + description: "itemStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0776" + oid: "urn:oid:2.16.840.1.113883.18.402" +- id: "v3-brazilianProcedureCodesSUS" + description: "Brazilian Procedure Codes SUS" + url: "http://terminology.hl7.org/CodeSystem/v3-brazilianProcedureCodesSUS" + oid: "urn:oid:2.16.840.1.113883.2.21.10" +- id: "v3-HealthcareProviderTaxonomyHIPAA" + description: "Healthcare Provider Taxonomy HIPAA" + url: "http://terminology.hl7.org/CodeSystem/v3-HealthcareProviderTaxonomyHIPAA" + oid: "urn:oid:2.16.840.1.113883.5.53" +- id: "triggerEventID" + description: "Trigger Event ID" + url: "http://terminology.hl7.org/CodeSystem/triggerEventID" + oid: "urn:oid:2.16.840.1.113883.1.18" +- id: "v2-0234" + description: "reportTiming" + url: "http://terminology.hl7.org/CodeSystem/v2-0234" + oid: "urn:oid:2.16.840.1.113883.18.133" +- id: "v2-0371" + description: "additivePreservative" + url: "http://terminology.hl7.org/CodeSystem/v2-0371" + oid: "urn:oid:2.16.840.1.113883.18.229" +- id: "multum" + description: "Multum Lexicon" + url: "http://terminology.hl7.org/CodeSystem/multum" + oid: "urn:oid:2.16.840.1.113883.6.27" +- id: "v2-0388" + description: "processingType" + url: "http://terminology.hl7.org/CodeSystem/v2-0388" + oid: "urn:oid:2.16.840.1.113883.18.239" +- id: "composite-measure-scoring" + description: "CompositeMeasureScoring" + url: "http://terminology.hl7.org/CodeSystem/composite-measure-scoring" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1235" +- id: "v2-0367" + description: "alertLevel" + url: "http://terminology.hl7.org/CodeSystem/v2-0367" + oid: "urn:oid:2.16.840.1.113883.18.225" +- id: "contractaction" + description: "Contract Action Codes" + url: "http://terminology.hl7.org/CodeSystem/contractaction" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1202" +- id: "v3-nuccProviderCodes" + description: "NUCC Health Care Provider Taxonomy" + url: "http://terminology.hl7.org/CodeSystem/v3-nuccProviderCodes" + oid: "urn:oid:2.16.840.1.113883.6.101" +- id: "service-type" + description: "Service type" + url: "http://terminology.hl7.org/CodeSystem/service-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1145" +- id: "v3-Currency" + description: "Currency" + url: "http://terminology.hl7.org/CodeSystem/v3-Currency" + oid: "urn:oid:2.16.840.1.113883.5.1058" +- id: "ICD-9CM-procedurecodes" + description: "National Center for Health Statistics" + url: "http://terminology.hl7.org/CodeSystem/ICD-9CM-procedurecodes" + oid: "urn:oid:2.16.840.1.113883.6.104" +- id: "v3-hl7ITSType" + description: "HL7ITSType" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7ITSType" + oid: "urn:oid:2.16.840.1.113883.5.1135" +- id: "v3-MdfHmdRowType" + description: "MdfHmdRowType" + url: "http://terminology.hl7.org/CodeSystem/v3-MdfHmdRowType" + oid: "urn:oid:2.16.840.1.113883.5.76" +- id: "v2-0625" + description: "itemStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0625" + oid: "urn:oid:2.16.840.1.113883.18.377" +- id: "v3-RoleClass" + description: "RoleClass" + url: "http://terminology.hl7.org/CodeSystem/v3-RoleClass" + oid: "urn:oid:2.16.840.1.113883.5.110" +- id: "v3-AcknowledgementType" + description: "AcknowledgementType" + url: "http://terminology.hl7.org/CodeSystem/v3-AcknowledgementType" + oid: "urn:oid:2.16.840.1.113883.5.18" +- id: "v2-0275" + description: "documentStorageStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0275" + oid: "urn:oid:2.16.840.1.113883.18.168" +- id: "iso639-3" + description: "ISO 639-3 Language Codes Alpha 3" + url: "http://terminology.hl7.org/CodeSystem/iso639-3" + oid: "urn:oid:1.0.639.3" +- id: "v2-0330" + description: "marketingBasis" + url: "http://terminology.hl7.org/CodeSystem/v2-0330" + oid: "urn:oid:2.16.840.1.113883.18.201" +- id: "medicationrequest-category" + description: "MedicationRequest Category Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationrequest-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1323" +- id: "v2-0127" + description: "allergenType" + url: "http://terminology.hl7.org/CodeSystem/v2-0127" + oid: "urn:oid:2.16.840.1.113883.18.54" +- id: "v3-IdentifierReliability" + description: "IdentifierReliability" + url: "http://terminology.hl7.org/CodeSystem/v3-IdentifierReliability" + oid: "urn:oid:2.16.840.1.113883.5.1117" +- id: "v2-0062" + description: "eventReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0062" + oid: "urn:oid:2.16.840.1.113883.18.23" +- id: "v2-0432" + description: "admissionLevelOfCare" + url: "http://terminology.hl7.org/CodeSystem/v2-0432" + oid: "urn:oid:2.16.840.1.113883.18.273" +- id: "epsg-ca" + description: "European Petroleum Survey Group Geodetic Parameter Dataset Coordinate Axis" + url: "http://terminology.hl7.org/CodeSystem/epsg-ca" + oid: "urn:oid:2.16.840.1.113883.6.279" +- id: "expansion-parameter-source" + description: "ExpansionParameterSource" + url: "http://terminology.hl7.org/CodeSystem/expansion-parameter-source" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1279" +- id: "v2-0520" + description: "messageWaitingPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0520" + oid: "urn:oid:2.16.840.1.113883.18.340" +- id: "v2-0170" + description: "derivedSpecimen" + url: "http://terminology.hl7.org/CodeSystem/v2-0170" + oid: "urn:oid:2.16.840.1.113883.18.88" +- id: "appointment-cancellation-reason" + description: "Appointment cancellation reason" + url: "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1382" +- id: "v2-0936" + description: "observationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0936" + oid: "urn:oid:2.16.840.1.113883.18.439" +- id: "testscript-profile-destination-types" + description: "Test script profile destination type" + url: "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1197" +- id: "v2-0465" + description: "name-addressRepresentation" + url: "http://terminology.hl7.org/CodeSystem/v2-0465" + oid: "urn:oid:2.16.840.1.113883.18.295" +- id: "v3-PersonDisabilityType" + description: "PersonDisabilityType" + url: "http://terminology.hl7.org/CodeSystem/v3-PersonDisabilityType" + oid: "urn:oid:2.16.840.1.113883.5.93" +- id: "icd9" + description: "ICD9" + url: "http://terminology.hl7.org/CodeSystem/icd9" + oid: "urn:oid:2.16.840.1.113883.6.42" +- id: "v2-0166" + description: "rxComponentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0166" + oid: "urn:oid:2.16.840.1.113883.18.84" +- id: "v2-0536" + description: "certificateStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0536" + oid: "urn:oid:2.16.840.1.113883.18.350" +- id: "v2-0473" + description: "formularyStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0473" + oid: "urn:oid:2.16.840.1.113883.18.301" +- id: "v2-0189" + description: "ethnicGroup" + url: "http://terminology.hl7.org/CodeSystem/v2-0189" + oid: "urn:oid:2.16.840.1.113883.18.100" +- id: "HL70189" + description: "ethnicGroup" + url: "http://terminology.hl7.org/CodeSystem/v2-0189" + oid: "urn:oid:2.16.840.1.113883.18.100" +- id: "v2-0920" + description: "preferredSpecimen-AttributeStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0920" + oid: "urn:oid:2.16.840.1.113883.18.426" +- id: "benefit-unit" + description: "Unit Type Codes" + url: "http://terminology.hl7.org/CodeSystem/benefit-unit" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1178" +- id: "DEEDS508" + description: "DEEDS508" + url: "http://terminology.hl7.org/CodeSystem/DEEDS508" + oid: "urn:oid:2.16.840.1.113883.6.102.5.8" +- id: "v2-0561" + description: "product-servicesClarification" + url: "http://terminology.hl7.org/CodeSystem/v2-0561" + oid: "urn:oid:2.16.840.1.113883.18.364" +- id: "v2-0131" + description: "contactRole2" + url: "http://terminology.hl7.org/CodeSystem/v2-0131" + oid: "urn:oid:2.16.840.1.113883.18.58" +- id: "v3-HL7ContextConductionStyle" + description: "HL7ContextConductionStyle" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7ContextConductionStyle" + oid: "urn:oid:2.16.840.1.113883.5.1129" +- id: "NHSNSSIAnatomicSite" + description: "NHSN SSI Anatomic Site" + url: "http://terminology.hl7.org/CodeSystem/NHSNSSIAnatomicSite" + oid: "urn:oid:2.16.840.1.113883.6.272" +- id: "v2-0424" + description: "gestationCategory" + url: "http://terminology.hl7.org/CodeSystem/v2-0424" + oid: "urn:oid:2.16.840.1.113883.18.265" +- id: "v3-TelecommunicationAddressUse" + description: "TelecommunicationAddressUse" + url: "http://terminology.hl7.org/CodeSystem/v3-TelecommunicationAddressUse" + oid: "urn:oid:2.16.840.1.113883.5.1011" +- id: "v2-0074" + description: "diagnosticServiceSectionId" + url: "http://terminology.hl7.org/CodeSystem/v2-0074" + oid: "urn:oid:2.16.840.1.113883.18.29" +- id: "whoARTfl" + description: "WHO Adverse Reaction Terms foreign language translations" + url: "http://terminology.hl7.org/CodeSystem/whoARTfl" + oid: "urn:oid:2.16.840.1.113883.6.230" +- id: "v3-loinc" + description: "Logical Observation Identifiers, Names and Codes (LOINC)" + url: "http://loinc.org" + oid: "urn:oid:2.16.840.1.113883.6.1" +- id: "research-study-reason-stopped" + description: "ResearchStudyReasonStopped" + url: "http://terminology.hl7.org/CodeSystem/research-study-reason-stopped" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1249" +- id: "v2-0560" + description: "Quantity Units" + url: "http://terminology.hl7.org/CodeSystem/v2-0560" + oid: "urn:oid:2.16.840.1.113883.18.455" +- id: "v2-0130" + description: "visitUserCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0130" + oid: "urn:oid:2.16.840.1.113883.18.56" +- id: "v3-ConceptProperty" + description: "HL7 Value Set and Coded Concept Property Codes" + url: "http://terminology.hl7.org/CodeSystem/v3-ConceptProperty" + oid: "urn:oid:2.16.840.1.113883.5.1087" +- id: "nciVersionOfNDF-RT" + description: "NCI Version of NDF-RT" + url: "http://terminology.hl7.org/CodeSystem/nciVersionOfNDF-RT" + oid: "urn:oid:2.16.840.1.113883.3.26.1.5" +- id: "v3-iso4217-HL7" + description: "ISO 4217 Currency code, HL7 use" + url: "http://terminology.hl7.org/CodeSystem/v3-iso4217-HL7" + oid: "urn:oid:2.16.840.1.113883.6.9" +- id: "v2-0425" + description: "newbornType" + url: "http://terminology.hl7.org/CodeSystem/v2-0425" + oid: "urn:oid:2.16.840.1.113883.18.266" +- id: "MDRSPA" + description: "MedDRA Spanish" + url: "http://terminology.hl7.org/CodeSystem/MDRSPA" + oid: "urn:oid:2.16.840.1.113883.6.163.6" +- id: "nmds" + description: "Nursing Minimum Data Set" + url: "http://terminology.hl7.org/CodeSystem/nmds" + oid: "urn:oid:2.16.840.1.113883.6.87" +- id: "v3-ActRelationshipType" + description: "ActRelationshipType" + url: "http://terminology.hl7.org/CodeSystem/v3-ActRelationshipType" + oid: "urn:oid:2.16.840.1.113883.5.1002" +- id: "v3-QueryRequestLimit" + description: "QueryRequestLimit" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryRequestLimit" + oid: "urn:oid:2.16.840.1.113883.5.1112" +- id: "v3-sctemp" + description: "pan-Canadian Temporary Codes" + url: "https://fhir.infoway-inforoute.ca/CodeSystem/sctemp" + oid: "urn:oid:2.16.840.1.113883.2.20.5.2" +- id: "v2-0167" + description: "substitutionStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0167" + oid: "urn:oid:2.16.840.1.113883.18.85" +- id: "v2-0472" + description: "tqConjunctionId" + url: "http://terminology.hl7.org/CodeSystem/v2-0472" + oid: "urn:oid:2.16.840.1.113883.18.300" +- id: "v2-0921" + description: "certificationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0921" + oid: "urn:oid:2.16.840.1.113883.18.427" +- id: "coverage-class" + description: "Coverage Class Codes" + url: "http://terminology.hl7.org/CodeSystem/coverage-class" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1147" +- id: "v2-0258" + description: "relationshipModifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0258" + oid: "urn:oid:2.16.840.1.113883.18.153" +- id: "mth-icpc2-icd10-7B" + description: "ICPC2-ICD10 Thesaurus, 7-bit" + url: "http://terminology.hl7.org/CodeSystem/mth-icpc2-icd10-7B" + oid: "urn:oid:2.16.840.1.113883.6.142.2" +- id: "NHSNHipReplacement" + description: "NHSN Hip Replacement" + url: "http://terminology.hl7.org/CodeSystem/NHSNHipReplacement" + oid: "urn:oid:2.16.840.1.113883.6.263" +- id: "v2-0937" + description: "observationSubtype" + url: "http://terminology.hl7.org/CodeSystem/v2-0937" + oid: "urn:oid:2.16.840.1.113883.18.440" +- id: "v3-AmericanIndianAlaskaNativeLanguages" + description: "AmericanIndianAlaskaNativeLanguages" + url: "http://terminology.hl7.org/CodeSystem/v3-AmericanIndianAlaskaNativeLanguages" + oid: "urn:oid:2.16.840.1.113883.5.1054" +- id: "v2-0034" + description: "siteAdministered" + url: "http://terminology.hl7.org/CodeSystem/v2-0034" + oid: "urn:oid:2.16.840.1.113883.18.17" +- id: "measure-scoring" + description: "MeasureScoring" + url: "http://terminology.hl7.org/CodeSystem/measure-scoring" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1232" +- id: "audit-event-type" + description: "Audit Event ID" + url: "http://terminology.hl7.org/CodeSystem/audit-event-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1136" +- id: "adjudication" + description: "Adjudication Value Codes" + url: "http://terminology.hl7.org/CodeSystem/adjudication" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1171" +- id: "v2-0126" + description: "quantityLimitedRequest" + url: "http://terminology.hl7.org/CodeSystem/v2-0126" + oid: "urn:oid:2.16.840.1.113883.18.53" +- id: "v3-QueryPriority" + description: "QueryPriority" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryPriority" + oid: "urn:oid:2.16.840.1.113883.5.102" +- id: "v2-0063" + description: "relationship" + url: "http://terminology.hl7.org/CodeSystem/v2-0063" + oid: "urn:oid:2.16.840.1.113883.18.24" +- id: "v2-0433" + description: "precaution" + url: "http://terminology.hl7.org/CodeSystem/v2-0433" + oid: "urn:oid:2.16.840.1.113883.18.274" +- id: "v3-CalendarCycle" + description: "Calendar Cycle Codes" + url: "http://terminology.hl7.org/CodeSystem/v3-CalendarCycle" + oid: "urn:oid:2.16.840.1.113883.5.9" +- id: "v2-0761" + description: "drgProcedureDeterminationStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0761" + oid: "urn:oid:2.16.840.1.113883.18.400" +- id: "iso639-2" + description: "ISO 639-2: Codes for the representation of names of languages -- Part 2:\ + \ Alpha-3 code" + url: "http://terminology.hl7.org/CodeSystem/iso639-2" + oid: "urn:oid:1.0.639.2" +- id: "v2-0331" + description: "facilityType" + url: "http://terminology.hl7.org/CodeSystem/v2-0331" + oid: "urn:oid:2.16.840.1.113883.18.202" +- id: "SCDHEC-GISSpatialAccuracyTiers" + description: "SCDHEC GIS Spatial Accuracy Tiers" + url: "http://terminology.hl7.org/CodeSystem/SCDHEC-GISSpatialAccuracyTiers" + oid: "urn:oid:2.16.840.1.113883.6.241" +- id: "v3-URLScheme" + description: "Universal Resource Locator Scheme" + url: "http://terminology.hl7.org/CodeSystem/v3-URLScheme" + oid: "urn:oid:2.16.840.1.113883.5.143" +- id: "v2-0223" + description: "livingDependency2" + url: "http://terminology.hl7.org/CodeSystem/v2-0223" + oid: "urn:oid:2.16.840.1.113883.18.124" +- id: "codesystem-altcode-kind" + description: "AlternativeCodeKind" + url: "http://terminology.hl7.org/CodeSystem/codesystem-altcode-kind" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1284" +- id: "service-provision-conditions" + description: "ServiceProvisionConditions" + url: "http://terminology.hl7.org/CodeSystem/service-provision-conditions" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1143" +- id: "v2-0389" + description: "analyteRepeatStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0389" + oid: "urn:oid:2.16.840.1.113883.18.240" +- id: "v2-0366" + description: "local-remoteControlState" + url: "http://terminology.hl7.org/CodeSystem/v2-0366" + oid: "urn:oid:2.16.840.1.113883.18.224" +- id: "v3-icpc2E" + description: "International Classification of Primary Care, second edition (1998)" + url: "http://hl7.org/fhir/sid/icpc-2" + oid: "urn:oid:2.16.840.1.113883.6.139" +- id: "v3-ActRelationshipCheckpoint" + description: "ActRelationshipCheckpoint" + url: "http://terminology.hl7.org/CodeSystem/v3-ActRelationshipCheckpoint" + oid: "urn:oid:2.16.840.1.113883.5.10" +- id: "guide-parameter-code" + description: "GuideParameterCode" + url: "http://terminology.hl7.org/CodeSystem/guide-parameter-code" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1421" +- id: "v3-GenderStatus" + description: "GenderStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-GenderStatus" + oid: "urn:oid:2.16.840.1.113883.5.51" +- id: "discharge-disposition" + description: "Discharge disposition" + url: "http://terminology.hl7.org/CodeSystem/discharge-disposition" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1093" +- id: "whoPOR" + description: "WHO Adverse Reaction Terms Portuguese" + url: "http://terminology.hl7.org/CodeSystem/whoPOR" + oid: "urn:oid:2.16.840.1.113883.6.230.3" +- id: "v2-0235" + description: "reportSource" + url: "http://terminology.hl7.org/CodeSystem/v2-0235" + oid: "urn:oid:2.16.840.1.113883.18.134" +- id: "extra-security-role-type" + description: null + url: "http://terminology.hl7.org/CodeSystem/extra-security-role-type" + oid: null +- id: "v2-0370" + description: "containerStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0370" + oid: "urn:oid:2.16.840.1.113883.18.228" +- id: "v2-0409" + description: "applicationChangeType" + url: "http://terminology.hl7.org/CodeSystem/v2-0409" + oid: "urn:oid:2.16.840.1.113883.18.255" +- id: "plan-definition-type" + description: "PlanDefinitionType" + url: "http://terminology.hl7.org/CodeSystem/plan-definition-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1245" +- id: "v3-EntityHandling" + description: "EntityHandling" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityHandling" + oid: "urn:oid:2.16.840.1.113883.5.42" +- id: "usage-context-type" + description: "UsageContextType" + url: "http://terminology.hl7.org/CodeSystem/usage-context-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1068" +- id: "v2-0262" + description: "privacyLevel" + url: "http://terminology.hl7.org/CodeSystem/v2-0262" + oid: "urn:oid:2.16.840.1.113883.18.157" +- id: "container-cap" + description: "ContainerCap" + url: "http://terminology.hl7.org/CodeSystem/container-cap" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1258" +- id: "icd10" + description: "ICD-10" + # change from http://hl7.org/fhir/sid/icd-10 to http://hl7.org/fhir/sid/icd-10-cm, assuming US ICD-10-CM system + url: "http://hl7.org/fhir/sid/icd-10-cm" + oid: "urn:oid:2.16.840.1.113883.6.3" +- id: "soc" + description: "Standard Occupation Code" + url: "http://terminology.hl7.org/CodeSystem/soc" + oid: "urn:oid:2.16.840.1.113883.6.243" +- id: "question-max-occurs" + description: "MaxOccurs" + url: "http://terminology.hl7.org/CodeSystem/question-max-occurs" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1272" +- id: "v2-0429" + description: "productionClass" + url: "http://terminology.hl7.org/CodeSystem/v2-0429" + oid: "urn:oid:2.16.840.1.113883.18.270" +- id: "forms-codes" + description: "Form Codes" + url: "http://terminology.hl7.org/CodeSystem/forms-codes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1052" +- id: "icpc2-icd10-DUT" + description: "ICPC2-ICD10ENG Thesaurus, Dutch Translation" + url: "http://terminology.hl7.org/CodeSystem/icpc2-icd10-DUT" + oid: "urn:oid:2.16.840.1.113883.6.142.1" +- id: "v2-0350" + description: "nubc-OccurrenceCode-cs" + url: "http://terminology.hl7.org/CodeSystem/v2-0350" + oid: "urn:oid:2.16.840.1.113883.6.301.7" +- id: "v3-Country" + description: "Country" + url: "http://terminology.hl7.org/CodeSystem/v3-Country" + oid: "urn:oid:2.16.840.1.113883.5.28" +- id: "v3-TimingEvent" + description: "TimingEvent" + url: "http://terminology.hl7.org/CodeSystem/v3-TimingEvent" + oid: "urn:oid:2.16.840.1.113883.5.139" +- id: "v3-MapRelationship" + description: "MapRelationship" + url: "http://terminology.hl7.org/CodeSystem/v3-MapRelationship" + oid: "urn:oid:2.16.840.1.113883.5.67" +- id: "v2-0215" + description: "publicity" + url: "http://terminology.hl7.org/CodeSystem/v2-0215" + oid: "urn:oid:2.16.840.1.113883.18.119" +- id: "v2-0491" + description: "specimenQuality" + url: "http://terminology.hl7.org/CodeSystem/v2-0491" + oid: "urn:oid:2.16.840.1.113883.18.315" +- id: "v2-0868" + description: "telecommunicationExpirationReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0868" + oid: "urn:oid:2.16.840.1.113883.18.409" +- id: "payment-type" + description: "Payment Type Codes" + url: "http://terminology.hl7.org/CodeSystem/payment-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1186" +- id: "MDRAE" + description: "MedDRA Am Engl" + url: "http://terminology.hl7.org/CodeSystem/MDRAE" + oid: "urn:oid:2.16.840.1.113883.6.163.1" +- id: "risk-probability" + description: "Risk Probability" + url: "http://terminology.hl7.org/CodeSystem/risk-probability" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1133" +- id: "v2-0757" + description: "drgStatusRespirationMinutes" + url: "http://terminology.hl7.org/CodeSystem/v2-0757" + oid: "urn:oid:2.16.840.1.113883.18.398" +- id: "v2-0242" + description: "primaryObserverQualification" + url: "http://terminology.hl7.org/CodeSystem/v2-0242" + oid: "urn:oid:2.16.840.1.113883.18.141" +- id: "MDRFRE" + description: "MedDRA French" + url: "http://terminology.hl7.org/CodeSystem/MDRFRE" + oid: "urn:oid:2.16.840.1.113883.6.163.3" +- id: "v2-0487" + description: "specimenType" + url: "http://terminology.hl7.org/CodeSystem/v2-0487" + oid: "urn:oid:2.16.840.1.113883.18.311" +- id: "v3-WC" + description: "WHO ATC" + url: "http://www.whocc.no/atc" + oid: "urn:oid:2.16.840.1.113883.6.73" +- id: "v2-0038" + description: "orderStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0038" + oid: "urn:oid:2.16.840.1.113883.18.18" +- id: "v2-0468" + description: "paymentAdjustmentInformation" + url: "http://terminology.hl7.org/CodeSystem/v2-0468" + oid: "urn:oid:2.16.840.1.113883.18.297" +- id: "v3-PaymentTerms" + description: "PaymentTerms" + url: "http://terminology.hl7.org/CodeSystem/v3-PaymentTerms" + oid: "urn:oid:2.16.840.1.113883.5.91" +- id: "v2-0311" + description: "jobStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0311" + oid: "urn:oid:2.16.840.1.113883.18.189" +- id: "v3-CodeSystem" + description: "CodeSystem" + url: "http://terminology.hl7.org/CodeSystem/v3-CodeSystem" + oid: "urn:oid:2.16.840.1.113883.5.22" +- id: "diet" + description: "Diet" + url: "http://terminology.hl7.org/CodeSystem/diet" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1091" +- id: "admit-source" + description: "Admit source" + url: "http://terminology.hl7.org/CodeSystem/admit-source" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1092" +- id: "v2-0254" + description: "kindOfQuantity" + url: "http://terminology.hl7.org/CodeSystem/v2-0254" + oid: "urn:oid:2.16.840.1.113883.18.149" +- id: "v3-EncounterReferralSource" + description: "EncounterReferralSource" + url: "http://terminology.hl7.org/CodeSystem/v3-EncounterReferralSource" + oid: "urn:oid:2.16.840.1.113883.5.39" +- id: "v2-0080" + description: "natureOfAbnormalTesting" + url: "http://terminology.hl7.org/CodeSystem/v2-0080" + oid: "urn:oid:2.16.840.1.113883.18.32" +- id: "v3-RoleCode" + description: "RoleCode" + url: "http://terminology.hl7.org/CodeSystem/v3-RoleCode" + oid: "urn:oid:2.16.840.1.113883.5.111" +- id: "service-referral-method" + description: "ReferralMethod" + url: "http://terminology.hl7.org/CodeSystem/service-referral-method" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1142" +- id: "goal-category" + description: "Goal category" + url: "http://terminology.hl7.org/CodeSystem/goal-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1097" +- id: "v2-0203" + description: "identifierType" + url: "http://terminology.hl7.org/CodeSystem/v2-0203" + oid: "urn:oid:2.16.840.1.113883.18.108" +- id: "v2-0653" + description: "dateFormat" + url: "http://terminology.hl7.org/CodeSystem/v2-0653" + oid: "urn:oid:2.16.840.1.113883.18.381" +- id: "v3-QueryParameterValue" + description: "QueryParameterValue" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryParameterValue" + oid: "urn:oid:2.16.840.1.113883.5.1096" +- id: "medicationrequest-admin-location" + description: "Medication request administration location codes" + url: "http://terminology.hl7.org/CodeSystem/medicationrequest-admin-location" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "v2-0917" + description: "bolusType" + url: "http://terminology.hl7.org/CodeSystem/v2-0917" + oid: "urn:oid:2.16.840.1.113883.18.423" +- id: "v2-0444" + description: "nameAssemblyOrder" + url: "http://terminology.hl7.org/CodeSystem/v2-0444" + oid: "urn:oid:2.16.840.1.113883.18.284" +- id: "v2-0501" + description: "consentNon-disclosureReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0501" + oid: "urn:oid:2.16.840.1.113883.18.325" +- id: "v2-0278" + description: "fillerStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0278" + oid: "urn:oid:2.16.840.1.113883.18.171" +- id: "v3-TableCellVerticalAlign" + description: "TableCellVerticalAlign" + url: "http://terminology.hl7.org/CodeSystem/v3-TableCellVerticalAlign" + oid: "urn:oid:2.16.840.1.113883.5.133" +- id: "dose-rate-type" + description: "DoseAndRateType" + url: "http://terminology.hl7.org/CodeSystem/dose-rate-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1069" +- id: "v2-0940" + description: "limitationTypeCode" + url: "http://terminology.hl7.org/CodeSystem/v2-0940" + oid: "urn:oid:2.16.840.1.113883.18.443" +- id: "v2-4000" + description: "name-addressRepresentation" + url: "http://terminology.hl7.org/CodeSystem/v2-4000" + oid: "urn:oid:2.16.840.1.113883.18.436" +- id: "icpc-FIN" + description: "International Classification of Primary Care 1993 Finnish" + url: "http://terminology.hl7.org/CodeSystem/icpc-FIN" + oid: "urn:oid:2.16.840.1.113883.6.138.4" +- id: "v2-0106" + description: "queryResponseFormat" + url: "http://terminology.hl7.org/CodeSystem/v2-0106" + oid: "urn:oid:2.16.840.1.113883.18.43" +- id: "v2-0556" + description: "benefitGroup" + url: "http://terminology.hl7.org/CodeSystem/v2-0556" + oid: "urn:oid:2.16.840.1.113883.18.360" +- id: "naics" + description: "North American Industry Classification System" + url: "http://terminology.hl7.org/CodeSystem/naics" + oid: "urn:oid:2.16.840.1.113883.6.85" +- id: "recommendation-strength" + description: "StrengthOfRecommendationRating" + url: "http://terminology.hl7.org/CodeSystem/recommendation-strength" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1268" +- id: "v3-LanguageAbilityProficiency" + description: "LanguageAbilityProficiency" + url: "http://terminology.hl7.org/CodeSystem/v3-LanguageAbilityProficiency" + oid: "urn:oid:2.16.840.1.113883.5.61" +- id: "icpc2E-DUT" + description: "ICPC2E, Dutch Translation" + url: "http://terminology.hl7.org/CodeSystem/icpc2E-DUT" + oid: "urn:oid:2.16.840.1.113883.6.139.2" +- id: "v2-0540" + description: "inactiveReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0540" + oid: "urn:oid:2.16.840.1.113883.18.352" +- id: "v3-cpt-4" + description: "CPT-4" + url: "http://www.ama-assn.org/go/cpt" + oid: "urn:oid:2.16.840.1.113883.6.12" +- id: "v3-ucum" + description: "Unified Code for Units of Measure (UCUM)" + url: "http://unitsofmeasure.org" + oid: "urn:oid:2.16.840.1.113883.6.8" +- id: "ex-paymenttype" + description: "Example Payment Type Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-paymenttype" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1181" +- id: "substance-category" + description: "Substance Category Codes" + url: "http://terminology.hl7.org/CodeSystem/substance-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1138" +- id: "v2-0239" + description: "eventExpected" + url: "http://terminology.hl7.org/CodeSystem/v2-0239" + oid: "urn:oid:2.16.840.1.113883.18.138" +- id: "v2-0669" + description: "loadStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0669" + oid: "urn:oid:2.16.840.1.113883.18.385" +- id: "v3-ActReason" + description: "ActReason" + url: "http://terminology.hl7.org/CodeSystem/v3-ActReason" + oid: "urn:oid:2.16.840.1.113883.5.8" +- id: "v2-0393" + description: "matchAlgorithms" + url: "http://terminology.hl7.org/CodeSystem/v2-0393" + oid: "urn:oid:2.16.840.1.113883.18.244" +- id: "parameter-group" + description: "DeviceDefinitionParameterGroup" + url: "http://terminology.hl7.org/CodeSystem/parameter-group" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1264" +- id: "v3-hc-DIN" + description: "Health Canada Drug Id Number" + url: "http://www.canada.ca/en/health-canada/services/drugs-health-products/drug-products/drug-product-database-3" + oid: "urn:oid:2.16.840.1.113883.5.1105" +- id: "v2-0002" + description: "maritalStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0002" + oid: "urn:oid:2.16.840.1.113883.18.179" +- id: "v3-dbSNP" + description: "Genetic Sequence polymorphism database" + url: "http://www.ncbi.nlm.nih.gov/projects/SNP" + oid: "urn:oid:2.16.840.1.113883.6.284" +- id: "v2-0147" + description: "policyType" + url: "http://terminology.hl7.org/CodeSystem/v2-0147" + oid: "urn:oid:2.16.840.1.113883.18.68" +- id: "v2-0517" + description: "informInstructions" + url: "http://terminology.hl7.org/CodeSystem/v2-0517" + oid: "urn:oid:2.16.840.1.113883.18.338" +- id: "consentaction" + description: "Consent Action Codes" + url: "http://terminology.hl7.org/CodeSystem/consentaction" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1227" +- id: "v2-0281" + description: "referralType" + url: "http://terminology.hl7.org/CodeSystem/v2-0281" + oid: "urn:oid:2.16.840.1.113883.18.174" +- id: "v2-0009" + description: "ambulatoryStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0009" + oid: "urn:oid:2.16.840.1.113883.18.11" +- id: "flag-category" + description: "Flag Category" + url: "http://terminology.hl7.org/CodeSystem/flag-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1071" +- id: "v3-CommunicationFunctionType" + description: "CommunicationFunctionType" + url: "http://terminology.hl7.org/CodeSystem/v3-CommunicationFunctionType" + oid: "urn:oid:2.16.840.1.113883.5.1056" +- id: "v2-0265" + description: "specialtyType" + url: "http://terminology.hl7.org/CodeSystem/v2-0265" + oid: "urn:oid:2.16.840.1.113883.18.159" +- id: "contractsubtypecodes" + description: "Contract Subtype Codes" + url: "http://terminology.hl7.org/CodeSystem/contractsubtypecodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1198" +- id: "v2-0818" + description: "package" + url: "http://terminology.hl7.org/CodeSystem/v2-0818" + oid: "urn:oid:2.16.840.1.113883.18.407" +- id: "v3-TransmissionRelationshipTypeCode" + description: "TransmissionRelationshipTypeCode" + url: "http://terminology.hl7.org/CodeSystem/v3-TransmissionRelationshipTypeCode" + oid: "urn:oid:2.16.840.1.113883.5.1111" +- id: "v2-0398" + description: "continuationStyle" + url: "http://terminology.hl7.org/CodeSystem/v2-0398" + oid: "urn:oid:2.16.840.1.113883.18.249" +- id: "v2-0232" + description: "insuranceCompanyContactReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0232" + oid: "urn:oid:2.16.840.1.113883.18.132" +- id: "v3-EntityNameUseR2" + description: "EntityNameUseR2" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNameUseR2" + oid: "urn:oid:2.16.840.1.113883.5.1120" +- id: "v2-0377" + description: "environmentalFactors" + url: "http://terminology.hl7.org/CodeSystem/v2-0377" + oid: "urn:oid:2.16.840.1.113883.18.235" +- id: "v2-0418" + description: "procedurePriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0418" + oid: "urn:oid:2.16.840.1.113883.18.260" +- id: "v2-0048" + description: "whatSubjectFilter" + url: "http://terminology.hl7.org/CodeSystem/v2-0048" + oid: "urn:oid:2.16.840.1.113883.18.20" +- id: "USCOC" + description: "US Census Occupation Code" + url: "http://terminology.hl7.org/CodeSystem/USCOC" + oid: "urn:oid:2.16.840.1.113883.6.240" +- id: "consentverification" + description: "Consent Vefication Codes" + url: "http://terminology.hl7.org/CodeSystem/consentverification" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" + +- id: "v3-ActUSPrivacyLaw" + description: "ActUSPrivacyLaw" + url: "http://terminology.hl7.org/CodeSystem/v3-ActUSPrivacyLaw" + oid: "urn:oid:2.16.840.1.113883.5.1138" +- id: "v3-Ethnicity" + description: "Ethnicity" + url: "http://terminology.hl7.org/CodeSystem/v3-Ethnicity" + oid: "urn:oid:2.16.840.1.113883.5.50" +- id: "v2-0224" + description: "transportArranged" + url: "http://terminology.hl7.org/CodeSystem/v2-0224" + oid: "urn:oid:2.16.840.1.113883.18.125" +- id: "v2-0731" + description: "drgDiagnosisDeterminationStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0731" + oid: "urn:oid:2.16.840.1.113883.18.392" +- id: "v3-CodeSystemType" + description: "HL7 Code System Type" + url: "http://terminology.hl7.org/CodeSystem/v3-CodeSystemType" + oid: "urn:oid:2.16.840.1.113883.5.1085" +- id: "v3-ActCode" + description: "ActCode" + url: "http://terminology.hl7.org/CodeSystem/v3-ActCode" + oid: "urn:oid:2.16.840.1.113883.5.4" +- id: "v2-0273" + description: "documentAvailabilityStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0273" + oid: "urn:oid:2.16.840.1.113883.18.167" +- id: "icpc-FRE" + description: "International Classification of Primary Care 1993 French" + url: "http://terminology.hl7.org/CodeSystem/icpc-FRE" + oid: "urn:oid:2.16.840.1.113883.6.138.5" +- id: "claim-exception" + description: "Exception Codes" + url: "http://terminology.hl7.org/CodeSystem/claim-exception" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1162" +- id: "immunization-recommendation-status" + description: "Immunization Recommendation Status Codes" + url: "http://terminology.hl7.org/CodeSystem/immunization-recommendation-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1104" +- id: "v2-0336" + description: "referralReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0336" + oid: "urn:oid:2.16.840.1.113883.18.206" +- id: "v2-0121" + description: "responseFlag" + url: "http://terminology.hl7.org/CodeSystem/v2-0121" + oid: "urn:oid:2.16.840.1.113883.18.49" +- id: "med-admin-perform-function" + description: "MedicationAdministration Performer Function Codes" + url: "http://terminology.hl7.org/CodeSystem/med-admin-perform-function" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1112" +- id: "v2-0571" + description: "invoiceProcessingResultsStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0571" + oid: "urn:oid:2.16.840.1.113883.18.371" +- id: "v3-HL7StandardVersionCode" + description: "HL7StandardVersionCode" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7StandardVersionCode" + oid: "urn:oid:2.16.840.1.113883.5.1097" +- id: "characteristic-method" + description: "CharacteristicMethod" + url: "http://terminology.hl7.org/CodeSystem/characteristic-method" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1453" +- id: "v2-0434" + description: "patientCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0434" + oid: "urn:oid:2.16.840.1.113883.18.275" +- id: "v2-0208" + description: "queryResponseStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0208" + oid: "urn:oid:2.16.840.1.113883.18.113" +- id: "medicationknowledge-status" + description: "MedicationKnowledge Status Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationknowledge-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1336" +- id: "v3-GTSAbbreviation" + description: "GTSAbbreviation" + url: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation" + oid: "urn:oid:2.16.840.1.113883.5.1022" +- id: "basic-resource-type" + description: "Basic Resource Types" + url: "http://terminology.hl7.org/CodeSystem/basic-resource-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1072" +- id: "v3-RoleLinkType" + description: "RoleLinkType" + url: "http://terminology.hl7.org/CodeSystem/v3-RoleLinkType" + oid: "urn:oid:2.16.840.1.113883.5.107" +- id: "v2-0033" + description: "route" + url: "http://terminology.hl7.org/CodeSystem/v2-0033" + oid: "urn:oid:2.16.840.1.113883.18.16" +- id: "consentpolicycodes" + description: "Consent PolicyRule Codes" + url: "http://terminology.hl7.org/CodeSystem/consentpolicycodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1229" +- id: "v3-ExposureMode" + description: "ExposureMode" + url: "http://terminology.hl7.org/CodeSystem/v3-ExposureMode" + oid: "urn:oid:2.16.840.1.113883.5.1113" +- id: "v3-ada-snodent" + description: "Systematized Nomenclature of Dentistry (SNODENT)" + url: "http://www.ada.org/snodent" + oid: "urn:oid:2.16.840.1.113883.3.3150" +- id: "v3-hgvs" + description: "Human Genome Variation Society nomenclature" + url: "http://varnomen.hgvs.org" + oid: "urn:oid:2.16.840.1.113883.6.282" +- id: "v2-0160" + description: "trayType" + url: "http://terminology.hl7.org/CodeSystem/v2-0160" + oid: "urn:oid:2.16.840.1.113883.18.78" +- id: "v2-0530" + description: "organization-Agency-Department" + url: "http://terminology.hl7.org/CodeSystem/v2-0530" + oid: "urn:oid:2.16.840.1.113883.18.346" +- id: "v2-0926" + description: "phlebotomyStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0926" + oid: "urn:oid:2.16.840.1.113883.18.432" +- id: "participant-type" + description: "Participant type" + url: "http://terminology.hl7.org/CodeSystem/participant-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1089" +- id: "v2-0475" + description: "chargeTypeReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0475" + oid: "urn:oid:2.16.840.1.113883.18.303" +- id: "v3-ModifyIndicator" + description: "ModifyIndicator" + url: "http://terminology.hl7.org/CodeSystem/v3-ModifyIndicator" + oid: "urn:oid:2.16.840.1.113883.5.81" +- id: "paymentstatus" + description: "Payment Status Codes" + url: "http://terminology.hl7.org/CodeSystem/paymentstatus" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1187" +- id: "v2-0834" + description: "mimeTypes" + url: "http://terminology.hl7.org/CodeSystem/v2-0834" + oid: "urn:oid:2.16.840.1.113883.18.408" +- id: "v2-0137" + description: "mailClaimParty" + url: "http://terminology.hl7.org/CodeSystem/v2-0137" + oid: "urn:oid:2.16.840.1.113883.18.61" +- id: "v2-0422" + description: "triageType" + url: "http://terminology.hl7.org/CodeSystem/v2-0422" + oid: "urn:oid:2.16.840.1.113883.18.263" +- id: "v3-ConceptGenerality" + description: "ConceptGenerality" + url: "http://terminology.hl7.org/CodeSystem/v3-ConceptGenerality" + oid: "urn:oid:2.16.840.1.113883.5.24" +- id: "v2-0971" + description: "onlineVerificationResultErrorCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0971" + oid: "urn:oid:2.16.840.1.113883.18.454" +- id: "NHSNOccasionOfDetection" + description: "NHSN Occasion Of Detection" + url: "http://terminology.hl7.org/CodeSystem/NHSNOccasionOfDetection" + oid: "urn:oid:2.16.840.1.113883.6.273" +- id: "v2-0269" + description: "chargeOnIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0269" + oid: "urn:oid:2.16.840.1.113883.18.162" +- id: "v2-0793" + description: "rulingAct" + url: "http://terminology.hl7.org/CodeSystem/v2-0793" + oid: "urn:oid:2.16.840.1.113883.18.405" +- id: "measure-population" + description: "MeasurePopulationType" + url: "http://terminology.hl7.org/CodeSystem/measure-population" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1231" +- id: "v2-0286" + description: "providerRole" + url: "http://terminology.hl7.org/CodeSystem/v2-0286" + oid: "urn:oid:2.16.840.1.113883.18.178" +- id: "whoGER" + description: "WHO Adverse Reaction Terms German" + url: "http://terminology.hl7.org/CodeSystem/whoGER" + oid: "urn:oid:2.16.840.1.113883.6.230.2" +- id: "v2-0906" + description: "actpriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0906" + oid: "urn:oid:2.16.840.1.113883.18.417" +- id: "program" + description: "Program" + url: "http://terminology.hl7.org/CodeSystem/program" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1384" +- id: "HL70005" + description: "PH_RaceAndEthnicity_CDC" + url: "http://terminology.hl7.org/CodeSystem/v3-Race" + oid: "urn:oid:2.16.840.1.113883.6.238" +- id: "v2-0005" + description: "PH_RaceAndEthnicity_CDC" + url: "http://terminology.hl7.org/CodeSystem/v2-0005" + oid: "urn:oid:2.16.840.1.113883.6.238" +- id: "adjudication-error" + description: "Adjudication Error Codes" + url: "http://terminology.hl7.org/CodeSystem/adjudication-error" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1053" +- id: "v3-MDFAttributeType" + description: "MDFAttributeType" + url: "http://terminology.hl7.org/CodeSystem/v3-MDFAttributeType" + oid: "urn:oid:2.16.840.1.113883.5.74" +- id: "v2-0140" + description: "militaryService" + url: "http://terminology.hl7.org/CodeSystem/v2-0140" + oid: "urn:oid:2.16.840.1.113883.18.62" +- id: "v2-0510" + description: "bloodProductDispenseStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0510" + oid: "urn:oid:2.16.840.1.113883.18.333" +- id: "v3-SubstitutionCondition" + description: "SubstitutionCondition" + url: "http://terminology.hl7.org/CodeSystem/v3-SubstitutionCondition" + oid: "urn:oid:2.16.840.1.113883.5.1071" +- id: "v3-iso3166-2" + description: "ISO 3166 Part 2 Country Subdivision Codes" + url: "urn:iso:std:iso:3166:-2" + oid: "urn:oid:1.0.3166.2" +- id: "conceptdomains" + description: "Concept Domains" + url: "http://terminology.hl7.org/CodeSystem/conceptdomains" + oid: null +- id: "v2-0394" + description: "responseModality" + url: "http://terminology.hl7.org/CodeSystem/v2-0394" + oid: "urn:oid:2.16.840.1.113883.18.245" +- id: "medicationdispense-performer-function" + description: "MedicationDispense Performer Function Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationdispense-performer-function" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1319" +- id: "v2-0402" + description: "schoolType" + url: "http://terminology.hl7.org/CodeSystem/v2-0402" + oid: "urn:oid:2.16.840.1.113883.18.251" +- id: "v2-0052" + description: "diagnosisType" + url: "http://terminology.hl7.org/CodeSystem/v2-0052" + oid: "urn:oid:2.16.840.1.113883.18.21" +- id: "v2-0951" + description: "reasonForStudy" + url: "http://terminology.hl7.org/CodeSystem/v2-0951" + oid: "urn:oid:2.16.840.1.113883.18.451" +- id: "v2-0547" + description: "jurisdictionalBreadth" + url: "http://terminology.hl7.org/CodeSystem/v2-0547" + oid: "urn:oid:2.16.840.1.113883.18.354" +- id: "v2-0228" + description: "diagnosisClassification" + url: "http://terminology.hl7.org/CodeSystem/v2-0228" + oid: "urn:oid:2.16.840.1.113883.18.128" +- id: "ex-payee-resource-type" + description: "ClaimPayeeResourceType" + url: "http://terminology.hl7.org/CodeSystem/ex-payee-resource-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1164" +- id: "v3-scpqual" + description: "pan-Canadian Provider Qualification Types" + url: "https://fhir.infoway-inforoute.ca/CodeSystem/scpqual" + oid: "urn:oid:2.16.840.1.113883.2.20.5.4" +- id: "contract-content-derivative" + description: "Contract Content Derivation Codes" + url: "http://terminology.hl7.org/CodeSystem/contract-content-derivative" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1204" +- id: "v3-EntityNamePartType" + description: "EntityNamePartType" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartType" + oid: "urn:oid:2.16.840.1.113883.5.44" +- id: "icpc2-icd10-THSRS" + description: "ICPC2-ICD10 Thesaurus" + url: "http://terminology.hl7.org/CodeSystem/icpc2-icd10-THSRS" + oid: "urn:oid:2.16.840.1.113883.6.142" +- id: "icpc-ITA" + description: "International Classification of Primary Care 1993 Italian" + url: "http://terminology.hl7.org/CodeSystem/icpc-ITA" + oid: "urn:oid:2.16.840.1.113883.6.138.9" +- id: "icpc-SPA" + description: "International Classification of Primary Care 1993 Spanish" + url: "http://terminology.hl7.org/CodeSystem/icpc-SPA" + oid: "urn:oid:2.16.840.1.113883.6.138.12" +- id: "icpc-ENG" + description: "International Classification of Primary Care 1993 (English)" + url: "http://terminology.hl7.org/CodeSystem/icpc-ENG" + oid: "urn:oid:2.16.840.1.113883.6.138.14" +- id: "definition-topic" + description: "DefinitionTopic" + url: "http://terminology.hl7.org/CodeSystem/definition-topic" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1244" +- id: "v2-0290" + description: "mimeBase64EncodingCharacters" + url: "http://terminology.hl7.org/CodeSystem/v2-0290" + oid: "urn:oid:2.16.840.1.113883.18.180" +- id: "v3-CodingRationale" + description: "CodingRationale" + url: "http://terminology.hl7.org/CodeSystem/v3-CodingRationale" + oid: "urn:oid:2.16.840.1.113883.5.1074" +- id: "v2-0443" + description: "providerRole" + url: "http://terminology.hl7.org/CodeSystem/v2-0443" + oid: "urn:oid:2.16.840.1.113883.18.283" +- id: "v3-ProcessingID" + description: "ProcessingID" + url: "http://terminology.hl7.org/CodeSystem/v3-ProcessingID" + oid: "urn:oid:2.16.840.1.113883.5.100" +- id: "v2-0506" + description: "serviceRequestRelationship" + url: "http://terminology.hl7.org/CodeSystem/v2-0506" + oid: "urn:oid:2.16.840.1.113883.18.330" +- id: "v2-0156" + description: "whichDate-timeQualifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0156" + oid: "urn:oid:2.16.840.1.113883.18.74" +- id: "history-absent-reason" + description: "FamilyHistoryAbsentReason" + url: "http://terminology.hl7.org/CodeSystem/history-absent-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1094" +- id: "v3-EntityNamePartQualifier" + description: "EntityNamePartQualifier" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifier" + oid: "urn:oid:2.16.840.1.113883.5.43" + +- id: "icd10PCS" + description: "ICD-10 Procedure Codes" + url: "http://www.cms.gov/Medicare/Coding/ICD10" + oid: "urn:oid:2.16.840.1.113883.6.4" +- id: "v2-0204" + description: "organizationalNameType" + url: "http://terminology.hl7.org/CodeSystem/v2-0204" + oid: "urn:oid:2.16.840.1.113883.18.109" +- id: "adverse-event-severity" + description: "AdverseEventSeverity" + url: "http://terminology.hl7.org/CodeSystem/adverse-event-severity" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1256" +- id: "v3-ActClass" + description: "ActClass" + url: "http://terminology.hl7.org/CodeSystem/v3-ActClass" + oid: "urn:oid:2.16.840.1.113883.5.6" +- id: "v2-0438" + description: "allergyClinicalStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0438" + oid: "urn:oid:2.16.840.1.113883.18.279" +- id: "v3-refSeq" + description: "Gene Reference Sequence Collection" + url: "http://www.ncbi.nlm.nih.gov/refseq" + oid: "urn:oid:2.16.840.1.113883.6.280" +- id: "modifiers" + description: "Modifier type Codes" + url: "http://terminology.hl7.org/CodeSystem/modifiers" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1151" +- id: "v2-0316" + description: "organDonorCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0316" + oid: "urn:oid:2.16.840.1.113883.18.192" +- id: "v2-0253" + description: "indirectExposureMechanism" + url: "http://terminology.hl7.org/CodeSystem/v2-0253" + oid: "urn:oid:2.16.840.1.113883.18.148" +- id: "v2-0480" + description: "pharmacyOrderTypes" + url: "http://terminology.hl7.org/CodeSystem/v2-0480" + oid: "urn:oid:2.16.840.1.113883.18.306" +- id: "implantStatus" + description: "Implant Status" + url: "http://terminology.hl7.org/CodeSystem/implantStatus" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1283" +- id: "v3-DocumentStorage" + description: "DocumentStorage" + url: "http://terminology.hl7.org/CodeSystem/v3-DocumentStorage" + oid: "urn:oid:2.16.840.1.113883.5.34" +- id: "v2-0615" + description: "userAuthenticationCredentialType" + url: "http://terminology.hl7.org/CodeSystem/v2-0615" + oid: "urn:oid:2.16.840.1.113883.18.373" +- id: "v2-0496" + description: "consentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0496" + oid: "urn:oid:2.16.840.1.113883.18.320" +- id: "v2-0183" + description: "active-inactive" + url: "http://terminology.hl7.org/CodeSystem/v2-0183" + oid: "urn:oid:2.16.840.1.113883.18.97" +- id: "match-grade" + description: "MatchGrade" + url: "http://terminology.hl7.org/CodeSystem/match-grade" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1289" +- id: "list-order" + description: "List Order Codes" + url: "http://terminology.hl7.org/CodeSystem/list-order" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1107" +- id: "v3-ProcessingMode" + description: "ProcessingMode" + url: "http://terminology.hl7.org/CodeSystem/v3-ProcessingMode" + oid: "urn:oid:2.16.840.1.113883.5.101" +- id: "icpc2E-P-AUS" + description: "ICPC2P 1998 Plus Austral Mod" + url: "http://terminology.hl7.org/CodeSystem/icpc2E-P-AUS" + oid: "urn:oid:2.16.840.1.113883.6.140.2" +- id: "v2-0357" + description: "messageErrorCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0357" + oid: "urn:oid:2.16.840.1.113883.18.217" +- id: "v2-0642" + description: "reorderTheory" + url: "http://terminology.hl7.org/CodeSystem/v2-0642" + oid: "urn:oid:2.16.840.1.113883.18.379" +- id: "icd10CM" + description: "International Classification of Diseases, 10th Revision, Clinical Modification\ + \ (ICD-10-CM)" + url: "http://hl7.org/fhir/sid/icd-10-cm" + oid: "urn:oid:2.16.840.1.113883.6.90" +- id: "ICD-10-CM" + description: "International Classification of Diseases, 10th Revision, Clinical Modification\ + \ (ICD-10-CM)" + url: "http://hl7.org/fhir/sid/icd-10-cm" + oid: "urn:oid:2.16.840.1.113883.6.90" +- id: "observation-category" + description: "Observation Category Codes" + url: "http://terminology.hl7.org/CodeSystem/observation-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1125" +- id: "v2-0091" + description: "queryPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0091" + oid: "urn:oid:2.16.840.1.113883.18.35" +- id: "testscript-profile-origin-types" + description: "Test script profile origin type" + url: "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1196" +- id: "v3-AddressUse" + description: "AddressUse" + url: "http://terminology.hl7.org/CodeSystem/v3-AddressUse" + oid: "urn:oid:2.16.840.1.113883.5.1119" +- id: "immunization-subpotent-reason" + description: "Immunization Subpotent Reason" + url: "http://terminology.hl7.org/CodeSystem/immunization-subpotent-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1098" +- id: "measure-improvement-notation" + description: "MeasureImprovementNotation" + url: "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1395" +- id: "v2-0356" + description: "alternateCharacterSetHandlingScheme" + url: "http://terminology.hl7.org/CodeSystem/v2-0356" + oid: "urn:oid:2.16.840.1.113883.18.216" +- id: "v2-0213" + description: "purgeStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0213" + oid: "urn:oid:2.16.840.1.113883.18.117" +- id: "v2-0497" + description: "consentMode" + url: "http://terminology.hl7.org/CodeSystem/v2-0497" + oid: "urn:oid:2.16.840.1.113883.18.321" +- id: "v2-0478" + description: "formularyStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0478" + oid: "urn:oid:2.16.840.1.113883.18.305" +- id: "v2-0881" + description: "roleExecutingPhysician" + url: "http://terminology.hl7.org/CodeSystem/v2-0881" + oid: "urn:oid:2.16.840.1.113883.18.411" +- id: "v2-0301" + description: "universalIdType" + url: "http://terminology.hl7.org/CodeSystem/v2-0301" + oid: "urn:oid:2.16.840.1.113883.18.186" +- id: "applicability" + description: "Benefit cost applicability" + url: "http://terminology.hl7.org/CodeSystem/applicability" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "audit-entity-type" + description: "Audit event entity type" + url: "http://terminology.hl7.org/CodeSystem/audit-entity-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1134" +- id: "v3-ResponseMode" + description: "ResponseMode" + url: "http://terminology.hl7.org/CodeSystem/v3-ResponseMode" + oid: "urn:oid:2.16.840.1.113883.5.1126" +- id: "research-study-objective-type" + description: "ResearchStudyObjectiveType" + url: "http://terminology.hl7.org/CodeSystem/research-study-objective-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1248" +- id: "v3-AcknowledgementDetailType" + description: "AcknowledgementDetailType" + url: "http://terminology.hl7.org/CodeSystem/v3-AcknowledgementDetailType" + oid: "urn:oid:2.16.840.1.113883.5.1082" +- id: "operation-outcome" + description: "Operation Outcome Codes" + url: "http://terminology.hl7.org/CodeSystem/operation-outcome" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1127" +- id: "v3-QueryStatusCode" + description: "QueryStatusCode" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryStatusCode" + oid: "urn:oid:2.16.840.1.113883.5.103" +- id: "v2-0317" + description: "annotations" + url: "http://terminology.hl7.org/CodeSystem/v2-0317" + oid: "urn:oid:2.16.840.1.113883.18.193" +- id: "expansion-processing-rule" + description: "ExpansionProcessingRule" + url: "http://terminology.hl7.org/CodeSystem/expansion-processing-rule" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1281" +- id: "v2-0252" + description: "causalityObservations" + url: "http://terminology.hl7.org/CodeSystem/v2-0252" + oid: "urn:oid:2.16.840.1.113883.18.147" +- id: "mdr" + description: "MedDRA" + url: "http://terminology.hl7.org/CodeSystem/mdr" + oid: "urn:oid:2.16.840.1.113883.6.163" +- id: "v3-ActRelationshipSubset" + description: "ActRelationshipSubset" + url: "http://terminology.hl7.org/CodeSystem/v3-ActRelationshipSubset" + oid: "urn:oid:2.16.840.1.113883.5.1099" +- id: "VHA" + description: "US Department of Veterans Affairs" + url: "http://terminology.hl7.org/CodeSystem/VHA" + oid: "urn:oid:2.16.840.1.113883.6.233" +- id: "v3-hl7ApprovalStatus" + description: "HL7ApprovalStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7ApprovalStatus" + oid: "urn:oid:2.16.840.1.113883.5.1130" +- id: "v2-0069" + description: "hospitalService" + url: "http://terminology.hl7.org/CodeSystem/v2-0069" + oid: "urn:oid:2.16.840.1.113883.18.27" +- id: "DEEDS407" + description: "DEEDS407" + url: "http://terminology.hl7.org/CodeSystem/DEEDS407" + oid: "urn:oid:2.16.840.1.113883.6.102.4.7" +- id: "hl7TermMaintInfra" + description: "HL7 Terminology Maintenance Infrastructure Vocabulary" + url: "http://terminology.hl7.org/CodeSystem/hl7TermMaintInfra" + oid: null +- id: "hsloc" + description: "Healthcare Service Location" + url: "http://terminology.hl7.org/CodeSystem/hsloc" + oid: "urn:oid:2.16.840.1.113883.6.259" +- id: "v3-PostalAddressUse" + description: "PostalAddressUse" + url: "http://terminology.hl7.org/CodeSystem/v3-PostalAddressUse" + oid: "urn:oid:2.16.840.1.113883.5.1012" +- id: "v2-0205" + description: "priceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0205" + oid: "urn:oid:2.16.840.1.113883.18.110" +- id: "contactentity-type" + description: "Contact entity type" + url: "http://terminology.hl7.org/CodeSystem/contactentity-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1129" +- id: "v2-0442" + description: "locationServiceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0442" + oid: "urn:oid:2.16.840.1.113883.18.282" +- id: "v2-0012" + description: "stockLocation" + url: "http://terminology.hl7.org/CodeSystem/v2-0012" + oid: "urn:oid:2.16.840.1.113883.18.12" +- id: "study-type" + description: "StatisticStudyType" + url: "http://terminology.hl7.org/CodeSystem/study-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1350" +- id: "v3-EncounterAccident" + description: "EncounterAccident" + url: "http://terminology.hl7.org/CodeSystem/v3-EncounterAccident" + oid: "urn:oid:2.16.840.1.113883.5.36" +- id: "umls" + description: "Unified Medical Language System" + url: "http://terminology.hl7.org/CodeSystem/umls" + oid: "urn:oid:2.16.840.1.113883.6.86" +- id: "v2-0507" + description: "observationResultHandling" + url: "http://terminology.hl7.org/CodeSystem/v2-0507" + oid: "urn:oid:2.16.840.1.113883.18.331" +- id: "v2-0157" + description: "whichDate-timeStatusQualifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0157" + oid: "urn:oid:2.16.840.1.113883.18.75" +- id: "adverse-event-category" + description: "AdverseEventCategory" + url: "http://terminology.hl7.org/CodeSystem/adverse-event-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1251" +- id: "v2-0291" + description: "subtypeOfReferencedData" + url: "http://terminology.hl7.org/CodeSystem/v2-0291" + oid: "urn:oid:2.16.840.1.113883.18.181" +- id: "composition-altcode-kind" + description: "AlternativeCodeKind" + url: "http://terminology.hl7.org/CodeSystem/composition-altcode-kind" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1406" +- id: "v3-TargetAwareness" + description: "TargetAwareness" + url: "http://terminology.hl7.org/CodeSystem/v3-TargetAwareness" + oid: "urn:oid:2.16.840.1.113883.5.137" +- id: "v3-ActExposureLevelCode" + description: "ActExposureLevelCode" + url: "http://terminology.hl7.org/CodeSystem/v3-ActExposureLevelCode" + oid: "urn:oid:2.16.840.1.113883.5.1114" +- id: "list-example-use-codes" + description: "Example Use Codes for List" + url: "http://terminology.hl7.org/CodeSystem/list-example-use-codes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1105" +- id: "v2-0946" + description: "supplierType" + url: "http://terminology.hl7.org/CodeSystem/v2-0946" + oid: "urn:oid:2.16.840.1.113883.18.446" +- id: "v2-0415" + description: "drgTransferType" + url: "http://terminology.hl7.org/CodeSystem/v2-0415" + oid: "urn:oid:2.16.840.1.113883.18.257" +- id: "v2-0100" + description: "invocationEvent" + url: "http://terminology.hl7.org/CodeSystem/v2-0100" + oid: "urn:oid:2.16.840.1.113883.18.38" +- id: "v3-fda-FFRN" + description: "Food and Drug Administration Food Facility Registration Numbers" + url: "http://terminology.hl7.org/CodeSystem/v3-fda-FFRN" + oid: "urn:oid:2.16.840.1.113883.3.24.6.1" +- id: "v2-0550" + description: "bodyParts" + url: "http://terminology.hl7.org/CodeSystem/v2-0550" + oid: "urn:oid:2.16.840.1.113883.18.356" +- id: "ex-serviceplace" + description: "Example Service Place Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-serviceplace" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1157" +- id: "measure-data-usage" + description: "MeasureDataUsage" + url: "http://terminology.hl7.org/CodeSystem/measure-data-usage" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1234" +- id: "NHSNInfectionType" + description: "NHSN Infection Type" + url: "http://terminology.hl7.org/CodeSystem/NHSNInfectionType" + oid: "urn:oid:2.16.840.1.113883.6.268" +- id: "v2-0383" + description: "substanceStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0383" + oid: "urn:oid:2.16.840.1.113883.18.236" +- id: "medication-admin-location" + description: "MedicationAdministration Location Codes" + url: "http://terminology.hl7.org/CodeSystem/medication-admin-location" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "condition-category" + description: "Condition Category Codes" + url: "http://terminology.hl7.org/CodeSystem/condition-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1073" +- id: "v2-0403" + description: "languageAbility" + url: "http://terminology.hl7.org/CodeSystem/v2-0403" + oid: "urn:oid:2.16.840.1.113883.18.252" +- id: "v3-hl7PublishingSection" + description: "HL7PublishingSection" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7PublishingSection" + oid: "urn:oid:2.16.840.1.113883.5.1133" +- id: "v2-0950" + description: "orderStatusModifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0950" + oid: "urn:oid:2.16.840.1.113883.18.450" +- id: "ex-USCLS" + description: "USCLS Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-USCLS" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1153" +- id: "reason-medication-given" + description: "Reason Medication Given Codes" + url: "http://terminology.hl7.org/CodeSystem/reason-medication-given" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1110" +- id: "v2-0116" + description: "bedStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0116" + oid: "urn:oid:2.16.840.1.113883.18.47" +- id: "epsg-crs" + description: "European Petroleum Survey Group Geodetic Parameter Dataset Coordinate Reference\ + \ System" + url: "http://terminology.hl7.org/CodeSystem/epsg-crs" + oid: "urn:oid:2.16.840.1.113883.6.278" +- id: "coverage-copay-type" + description: "Coverage Copay Type Codes" + url: "http://terminology.hl7.org/CodeSystem/coverage-copay-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1149" +- id: "v2-0395" + description: "modifyIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0395" + oid: "urn:oid:2.16.840.1.113883.18.246" +- id: "v2-0907" + description: "confidentiality" + url: "http://terminology.hl7.org/CodeSystem/v2-0907" + oid: "urn:oid:2.16.840.1.113883.18.418" +- id: "immunization-evaluation-dose-status" + description: "Immunization Evaluation Dose Status codes" + url: "http://terminology.hl7.org/CodeSystem/immunization-evaluation-dose-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1102" +- id: "v3-Dentition" + description: "Dentition" + url: "http://terminology.hl7.org/CodeSystem/v3-Dentition" + oid: "urn:oid:2.16.840.1.113883.5.1080" +- id: "v2-0004" + description: "patientClass" + url: "http://terminology.hl7.org/CodeSystem/v2-0004" + oid: "urn:oid:2.16.840.1.113883.18.5" +- id: "v2-0511" + description: "bpObservationStatusCodesInterpretation" + url: "http://terminology.hl7.org/CodeSystem/v2-0511" + oid: "urn:oid:2.16.840.1.113883.18.334" +- id: "v3-EntityDeterminer" + description: "EntityDeterminer" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityDeterminer" + oid: "urn:oid:2.16.840.1.113883.5.30" +- id: "v2-0268" + description: "override" + url: "http://terminology.hl7.org/CodeSystem/v2-0268" + oid: "urn:oid:2.16.840.1.113883.18.161" +- id: "push-type-available" + description: "Push-type-available" + url: "http://terminology.hl7.org/CodeSystem/push-type-available" + oid: "urn:oid:2.16.840.1.113883.4.642.1.899" +- id: "v3-EditStatus" + description: "EditStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-EditStatus" + oid: "urn:oid:2.16.840.1.113883.5.35" +- id: "v3-ActSite" + description: "ActSite" + url: "http://terminology.hl7.org/CodeSystem/v3-ActSite" + oid: "urn:oid:2.16.840.1.113883.5.1052" +- id: "v2-0287" + description: "problem-goalAction" + url: "http://terminology.hl7.org/CodeSystem/v2-0287" + oid: "urn:oid:2.16.840.1.113883.18.3" +- id: "v3-TableCellScope" + description: "TableCellScope" + url: "http://terminology.hl7.org/CodeSystem/v3-TableCellScope" + oid: "urn:oid:2.16.840.1.113883.5.132" +- id: "ib" + description: "ISBT" + url: "http://terminology.hl7.org/CodeSystem/ib" + oid: "urn:oid:2.16.840.1.113883.6.18" +- id: "primary-source-type" + description: "Primary-source-type" + url: "http://terminology.hl7.org/CodeSystem/primary-source-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.893" +- id: "v3-Charset" + description: "Charset" + url: "http://terminology.hl7.org/CodeSystem/v3-Charset" + oid: "urn:oid:2.16.840.1.113883.5.21" +- id: "v2-0566" + description: "bloodUnitType" + url: "http://terminology.hl7.org/CodeSystem/v2-0566" + oid: "urn:oid:2.16.840.1.113883.18.368" +- id: "v2-0423" + description: "caseCategory" + url: "http://terminology.hl7.org/CodeSystem/v2-0423" + oid: "urn:oid:2.16.840.1.113883.18.264" +- id: "validation-type" + description: "Validation-type" + url: "http://terminology.hl7.org/CodeSystem/validation-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.887" +- id: "icd9cm" + description: "ICD-9CM" + url: "http://terminology.hl7.org/CodeSystem/icd9cm" + oid: "urn:oid:2.16.840.1.113883.6.2" +- id: "v2-0970" + description: "onlineVerificationResult" + url: "http://terminology.hl7.org/CodeSystem/v2-0970" + oid: "urn:oid:2.16.840.1.113883.18.453" +- id: "condition-state" + description: "ConditionState" + url: "http://terminology.hl7.org/CodeSystem/condition-state" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1287" +- id: "communication-topic" + description: "CommunicationTopic" + url: "http://terminology.hl7.org/CodeSystem/communication-topic" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1078" +- id: "v3-ISO3166-3retired" + description: "ISO 3166 Numeric country Codes" + url: "http://terminology.hl7.org/CodeSystem/v3-ISO3166-3retired" + oid: "urn:oid:2.16.3" +- id: "v2-0618" + description: "protection" + url: "http://terminology.hl7.org/CodeSystem/v2-0618" + oid: "urn:oid:2.16.840.1.113883.18.376" +- id: "v2-0248" + description: "productSource" + url: "http://terminology.hl7.org/CodeSystem/v2-0248" + oid: "urn:oid:2.16.840.1.113883.18.144" +- id: "v2-0161" + description: "allowSubstitution" + url: "http://terminology.hl7.org/CodeSystem/v2-0161" + oid: "urn:oid:2.16.840.1.113883.18.79" +- id: "v2-0927" + description: "armStick" + url: "http://terminology.hl7.org/CodeSystem/v2-0927" + oid: "urn:oid:2.16.840.1.113883.18.433" +- id: "ahfs" + description: "AHFS Pharmacologic-Therapeutic Classification" + url: "http://terminology.hl7.org/CodeSystem/ahfs" + oid: "urn:oid:2.16.840.1.113883.6.234" +- id: "name-assembly-order" + description: "HumanNameAssemblyOrder" + url: "http://terminology.hl7.org/CodeSystem/name-assembly-order" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1266" +- id: "v3-HL7ConformanceInclusion" + description: "HL7ConformanceInclusion" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7ConformanceInclusion" + oid: "urn:oid:2.16.840.1.113883.5.55" +- id: "v2-0474" + description: "organizationUnitType" + url: "http://terminology.hl7.org/CodeSystem/v2-0474" + oid: "urn:oid:2.16.840.1.113883.18.302" +- id: "MSH" + description: "MeSH" + url: "http://terminology.hl7.org/CodeSystem/MSH" + oid: "urn:oid:2.16.840.1.113883.6.177" +- id: "v3-snomed-CT" + description: "SNOMED\_CT International Edition" + url: "http://snomed.info/sct" + oid: "urn:oid:2.16.840.1.113883.6.96" +- id: "v3-EntityRisk" + description: "EntityRisk" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityRisk" + oid: "urn:oid:2.16.840.1.113883.5.46" +- id: "DEEDS519" + description: "DEEDS519" + url: "http://terminology.hl7.org/CodeSystem/DEEDS519" + oid: "urn:oid:2.16.840.1.113883.6.102.5.19" +- id: "v2-0527" + description: "calendarAlignment" + url: "http://terminology.hl7.org/CodeSystem/v2-0527" + oid: "urn:oid:2.16.840.1.113883.18.343" +- id: "v2-0177" + description: "confidentialityCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0177" + oid: "urn:oid:2.16.840.1.113883.18.92" +- id: "medicationknowledge-package-type" + description: "MedicationKnowledge Package Type Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationknowledge-package-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1340" +- id: "v2-0659" + description: "lotControl" + url: "http://terminology.hl7.org/CodeSystem/v2-0659" + oid: "urn:oid:2.16.840.1.113883.18.383" +- id: "v2-0209" + description: "relationalOperator" + url: "http://terminology.hl7.org/CodeSystem/v2-0209" + oid: "urn:oid:2.16.840.1.113883.18.114" +- id: "v3-HL7UpdateMode" + description: "HL7UpdateMode" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7UpdateMode" + oid: "urn:oid:2.16.840.1.113883.5.57" +- id: "v2-0570" + description: "paymentMethod" + url: "http://terminology.hl7.org/CodeSystem/v2-0570" + oid: "urn:oid:2.16.840.1.113883.18.370" +- id: "v2-0065" + description: "specimenAction" + url: "http://terminology.hl7.org/CodeSystem/v2-0065" + oid: "urn:oid:2.16.840.1.113883.18.25" +- id: "v2-0435" + description: "advanceDirective" + url: "http://terminology.hl7.org/CodeSystem/v2-0435" + oid: "urn:oid:2.16.840.1.113883.18.276" +- id: "v2-0272" + description: "documentConfidentialityStatus2" + url: "http://terminology.hl7.org/CodeSystem/v2-0272" + oid: "urn:oid:2.16.840.1.113883.18.166" +- id: "v2-0337" + description: "certificationStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0337" + oid: "urn:oid:2.16.840.1.113883.18.207" +- id: "icpc-HUN" + description: "International Classification of Primary Care 1993 Hungarian" + url: "http://terminology.hl7.org/CodeSystem/icpc-HUN" + oid: "urn:oid:2.16.840.1.113883.6.138.8" +- id: "v2-0225" + description: "escortRequired" + url: "http://terminology.hl7.org/CodeSystem/v2-0225" + oid: "urn:oid:2.16.840.1.113883.18.126" +- id: "v2-0360" + description: "degreeLicenseCertificate" + url: "http://terminology.hl7.org/CodeSystem/v2-0360" + oid: "urn:oid:2.16.840.1.113883.18.220" +- id: "v3-ndc" + description: "National drug codes" + url: "http://hl7.org/fhir/sid/ndc" + oid: "urn:oid:2.16.840.1.113883.6.69" +- id: "DEEDS427" + description: "DEEDS427" + url: "http://terminology.hl7.org/CodeSystem/DEEDS427" + oid: "urn:oid:2.16.840.1.113883.6.102.4.27" +- id: "immunization-funding-source" + description: "Immunization Funding Source" + url: "http://terminology.hl7.org/CodeSystem/immunization-funding-source" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1100" +- id: "v3-lrg" + description: "Locus Reference Genomic Sequences (LRG)" + url: "http://www.lrg-sequence.org" + oid: "urn:oid:2.16.840.1.113883.6.283" +- id: "synthesis-type" + description: "StatisticSynthesisType" + url: "http://terminology.hl7.org/CodeSystem/synthesis-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1348" +- id: "v3-MdfRmimRowType" + description: "MdfRmimRowType" + url: "http://terminology.hl7.org/CodeSystem/v3-MdfRmimRowType" + oid: "urn:oid:2.16.840.1.113883.5.77" +- id: "opinions" + description: "Online Product Identification Number Index of Nova Scotia" + url: "http://terminology.hl7.org/CodeSystem/opinions" + oid: "urn:oid:2.16.840.1.113883.5.1102" +- id: "v3-SetOperator" + description: "SetOperator" + url: "http://terminology.hl7.org/CodeSystem/v3-SetOperator" + oid: "urn:oid:2.16.840.1.113883.5.1069" +- id: "ex-providerqualification" + description: "Example Provider Qualification Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-providerqualification" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1160" +- id: "atc" + description: "American Type Culture Collection" + url: "http://www.whocc.no/atc" + oid: "urn:oid:2.16.840.1.113883.6.77" +- id: "v3-ActMood" + description: "ActMood" + url: "http://terminology.hl7.org/CodeSystem/v3-ActMood" + oid: "urn:oid:2.16.840.1.113883.5.1001" +- id: "v3-EntityStatus" + description: "EntityStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityStatus" + oid: "urn:oid:2.16.840.1.113883.5.1061" +- id: "ex-diagnosisrelatedgroup" + description: "Example Diagnosis Related Group Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-diagnosisrelatedgroup" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1166" +- id: "v3-ResponseLevel" + description: "ResponseLevel" + url: "http://terminology.hl7.org/CodeSystem/v3-ResponseLevel" + oid: "urn:oid:2.16.840.1.113883.5.108" +- id: "v2-0376" + description: "specialHandling" + url: "http://terminology.hl7.org/CodeSystem/v2-0376" + oid: "urn:oid:2.16.840.1.113883.18.234" +- id: "v3-mime" + description: "MIME" + url: "http://www.iana.org/assignments/media-types" + oid: "urn:oid:2.16.840.1.113883.6.10" +- id: "rcV2" + description: "The Read Codes Version 2" + url: "http://terminology.hl7.org/CodeSystem/rcV2" + oid: "urn:oid:2.16.840.1.113883.6.29" +- id: "v3-hl7VoteResolution" + description: "HL7VoteResolution" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7VoteResolution" + oid: "urn:oid:2.16.840.1.113883.5.1131" +- id: "v2-0634" + description: "itemImportance" + url: "http://terminology.hl7.org/CodeSystem/v2-0634" + oid: "urn:oid:2.16.840.1.113883.18.378" +- id: "v2-0321" + description: "dispenseMethod" + url: "http://terminology.hl7.org/CodeSystem/v2-0321" + oid: "urn:oid:2.16.840.1.113883.18.194" +- id: "v3-hc-npn" + description: "Health Canada Natural Product Number" + url: "http://hl7.org/fhir/sid/ca-hc-npn" + oid: "urn:oid:2.16.840.1.113883.5.1107" +- id: "v2-0008" + description: "acknowledgmentCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0008" + oid: "urn:oid:2.16.840.1.113883.18.10" +- id: "v2-0359" + description: "diagnosisPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0359" + oid: "urn:oid:2.16.840.1.113883.18.218" +- id: "v3-fda-FCE" + description: "Food and Drug Administration Food Canning Establishments" + url: "http://terminology.hl7.org/CodeSystem/v3-fda-FCE" + oid: "urn:oid:2.16.840.1.113883.3.24.6.2" +- id: "statistic-type" + description: "StatisticStatisticType" + url: "http://terminology.hl7.org/CodeSystem/statistic-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1411" +- id: "v2-0070" + description: "specimenSourceCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0070" + oid: "urn:oid:2.16.840.1.113883.18.28" +- id: "v3-orderableDrugForm" + description: "Orderable Drug Form" + url: "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" + oid: "urn:oid:2.16.840.1.113883.5.85" +- id: "v2-0565" + description: "providerAdjustmentReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0565" + oid: "urn:oid:2.16.840.1.113883.18.367" +- id: "PHIndustryCDCCensus2010" + description: "Industry CDC Census 2010" + url: "http://terminology.hl7.org/CodeSystem/PHIndustryCDCCensus2010" + oid: "urn:oid:2.16.840.1.114222.4.5.315" +- id: "v2-0135" + description: "assignmentOfBenefits" + url: "http://terminology.hl7.org/CodeSystem/v2-0135" + oid: "urn:oid:2.16.840.1.113883.18.60" +- id: "coverage-selfpay" + description: "Coverage SelfPay Codes" + url: "http://terminology.hl7.org/CodeSystem/coverage-selfpay" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1148" +- id: "immunization-program-eligibility" + description: "Immunization Program Eligibility" + url: "http://terminology.hl7.org/CodeSystem/immunization-program-eligibility" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1099" +- id: "v2-0027" + description: "priority" + url: "http://terminology.hl7.org/CodeSystem/v2-0027" + oid: "urn:oid:2.16.840.1.113883.18.15" +- id: "v3-VocabularyDomainQualifier" + description: "VocabularyDomainQualifier" + url: "http://terminology.hl7.org/CodeSystem/v3-VocabularyDomainQualifier" + oid: "urn:oid:2.16.840.1.113883.5.147" +- id: "v2-0477" + description: "controlledSubstanceSchedule" + url: "http://terminology.hl7.org/CodeSystem/v2-0477" + oid: "urn:oid:2.16.840.1.113883.18.304" +- id: "v3-LocalMarkupIgnore" + description: "LocalMarkupIgnore" + url: "http://terminology.hl7.org/CodeSystem/v3-LocalMarkupIgnore" + oid: "urn:oid:2.16.840.1.113883.5.65" +- id: "v2-0924" + description: "cumulativeDosageLimitUom" + url: "http://terminology.hl7.org/CodeSystem/v2-0924" + oid: "urn:oid:2.16.840.1.113883.18.430" +- id: "HL70162" + description: "routeOfAdministration" + url: "http://terminology.hl7.org/CodeSystem/v2-0162" + oid: "urn:oid:2.16.840.1.113883.18.80" +- id: "v2-0162" + description: "routeOfAdministration" + url: "http://terminology.hl7.org/CodeSystem/v2-0162" + oid: "urn:oid:2.16.840.1.113883.18.80" +- id: "v3-ContentProcessingMode" + description: "ContentProcessingMode" + url: "http://terminology.hl7.org/CodeSystem/v3-ContentProcessingMode" + oid: "urn:oid:2.16.840.1.113883.5.1110" +- id: "v2-0498" + description: "consentStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0498" + oid: "urn:oid:2.16.840.1.113883.18.322" +- id: "v2-0532" + description: "expandedYes-NoIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0532" + oid: "urn:oid:2.16.840.1.113883.18.347" +- id: "rejection-criteria" + description: "RejectionCriterion" + url: "http://terminology.hl7.org/CodeSystem/rejection-criteria" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1260" +- id: "v3-ConceptCodeRelationship" + description: "Possible Concept Code Relationships" + url: "http://terminology.hl7.org/CodeSystem/v3-ConceptCodeRelationship" + oid: "urn:oid:2.16.840.1.113883.5.1088" +- id: "contract-data-meaning" + description: "ContractDataMeaning" + url: "http://terminology.hl7.org/CodeSystem/contract-data-meaning" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1205" +- id: "communication-category" + description: "CommunicationCategory" + url: "http://terminology.hl7.org/CodeSystem/communication-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1076" +- id: "v2-0524" + description: "sequenceCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0524" + oid: "urn:oid:2.16.840.1.113883.18.342" +- id: "v2-0174" + description: "natureOfServiceTestObservation" + url: "http://terminology.hl7.org/CodeSystem/v2-0174" + oid: "urn:oid:2.16.840.1.113883.18.90" +- id: "DEEDS408" + description: "DEEDS408" + url: "http://terminology.hl7.org/CodeSystem/DEEDS408" + oid: "urn:oid:2.16.840.1.113883.6.102.4.8" +- id: "supplyrequest-reason" + description: "SupplyRequestReason" + url: "http://terminology.hl7.org/CodeSystem/supplyrequest-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1193" +- id: "v2-0066" + description: "employmentStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0066" + oid: "urn:oid:2.16.840.1.113883.18.26" +- id: "v2-0436" + description: "sensitivityToCausativeAgent" + url: "http://terminology.hl7.org/CodeSystem/v2-0436" + oid: "urn:oid:2.16.840.1.113883.18.277" +- id: "v2-0123" + description: "resultStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0123" + oid: "urn:oid:2.16.840.1.113883.18.51" +- id: "v2-0334" + description: "disabilityInformationRelationship" + url: "http://terminology.hl7.org/CodeSystem/v2-0334" + oid: "urn:oid:2.16.840.1.113883.18.204" +- id: "GTIN" + description: "GTIN Global Trade Item Number" + url: "https://www.gs1.org/gtin" + oid: "urn:oid:1.3.160" +- id: "v3-ParticipationFunction" + description: "ParticipationFunction" + url: "http://terminology.hl7.org/CodeSystem/v3-ParticipationFunction" + oid: "urn:oid:2.16.840.1.113883.5.88" +- id: "v3-TableRules" + description: "TableRules" + url: "http://terminology.hl7.org/CodeSystem/v3-TableRules" + oid: "urn:oid:2.16.840.1.113883.5.136" +- id: "v2-0271" + description: "documentCompletionStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0271" + oid: "urn:oid:2.16.840.1.113883.18.164" +- id: "iso639-1ret" + description: "ISO 639-1 Alpha-2 Language Codes" + url: "http://terminology.hl7.org/CodeSystem/iso639-1ret" + oid: "urn:oid:2.16.840.1.113883.6.99" +- id: "v2-0158" + description: "date-timeSelectionQualifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0158" + oid: "urn:oid:2.16.840.1.113883.18.76" +- id: "v2-0508" + description: "bloodProductProcessingRequirements" + url: "http://terminology.hl7.org/CodeSystem/v2-0508" + oid: "urn:oid:2.16.840.1.113883.18.332" +- id: "allergyintolerance-clinical" + description: "AllergyIntolerance Clinical Status Codes" + url: "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1373" +- id: "v3-DCM" + description: "DICOM Controlled Terminology" + url: "http://dicom.nema.org/medical/dicom" + oid: "urn:oid:1.2.840.10008.2.16.4" +- id: "DEEDS424" + description: "DEEDS424" + url: "http://terminology.hl7.org/CodeSystem/DEEDS424" + oid: "urn:oid:2.16.840.1.113883.6.102.4.24" +- id: "MDREX" + description: "MedDRA expanded" + url: "http://terminology.hl7.org/CodeSystem/MDREX" + oid: "urn:oid:2.16.840.1.113883.6.164" +- id: "definition-status" + description: "DefinitionStatus" + url: "http://terminology.hl7.org/CodeSystem/definition-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1070" +- id: "read-Codes" + description: "Read Classification" + url: "http://terminology.hl7.org/CodeSystem/read-Codes" + oid: "urn:oid:2.16.840.1.113883.6.6" +- id: "v2-0949" + description: "orderControlCodeReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0949" + oid: "urn:oid:2.16.840.1.113883.18.449" + +- id: "v2-0375" + description: "artificialBlood" + url: "http://terminology.hl7.org/CodeSystem/v2-0375" + oid: "urn:oid:2.16.840.1.113883.18.233" +- id: "v2-0230" + description: "procedureFunctionalType" + url: "http://terminology.hl7.org/CodeSystem/v2-0230" + oid: "urn:oid:2.16.840.1.113883.18.130" +- id: "rcFB" + description: "The Read Codes Four Byte Set:" + url: "http://terminology.hl7.org/CodeSystem/rcFB" + oid: "urn:oid:2.16.840.1.113883.6.28" +- id: "v2-0119" + description: "orderControlCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0119" + oid: "urn:oid:2.16.840.1.113883.18.48" +- id: "v3-AcknowledgementDetailCode" + description: "AcknowledgementDetailCode" + url: "http://terminology.hl7.org/CodeSystem/v3-AcknowledgementDetailCode" + oid: "urn:oid:2.16.840.1.113883.5.1100" +- id: "v2-0322" + description: "completionStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0322" + oid: "urn:oid:2.16.840.1.113883.18.195" +- id: "v2-0267" + description: "daysOfTheWeek" + url: "http://terminology.hl7.org/CodeSystem/v2-0267" + oid: "urn:oid:2.16.840.1.113883.18.160" +- id: "object-role" + description: "AuditEventEntityRole" + url: "http://terminology.hl7.org/CodeSystem/object-role" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1135" +- id: "v3-CompressionAlgorithm" + description: "CompressionAlgorithm" + url: "http://terminology.hl7.org/CodeSystem/v3-CompressionAlgorithm" + oid: "urn:oid:2.16.840.1.113883.5.1009" +- id: "directness" + description: "EvidenceDirectness" + url: "http://terminology.hl7.org/CodeSystem/directness" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1459" +- id: "DEEDS" + description: "DEEDS vocabularies" + url: "http://terminology.hl7.org/CodeSystem/DEEDS" + oid: "urn:oid:2.16.840.1.113883.6.102" +- id: "v3-Calendar" + description: "Calendar" + url: "http://terminology.hl7.org/CodeSystem/v3-Calendar" + oid: "urn:oid:2.16.840.1.113883.5.1055" +- id: "v2-0569" + description: "adjustmentAction" + url: "http://terminology.hl7.org/CodeSystem/v2-0569" + oid: "urn:oid:2.16.840.1.113883.18.369" +- id: "v3-EncounterSpecialCourtesy" + description: "EncounterSpecialCourtesy" + url: "http://terminology.hl7.org/CodeSystem/v3-EncounterSpecialCourtesy" + oid: "urn:oid:2.16.840.1.113883.5.40" +- id: "episodeofcare-type" + description: "Episode of care type" + url: "http://terminology.hl7.org/CodeSystem/episodeofcare-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1189" +- id: "v2-0210" + description: "relationalConjunction" + url: "http://terminology.hl7.org/CodeSystem/v2-0210" + oid: "urn:oid:2.16.840.1.113883.18.115" +- id: "DEEDS412" + description: "DEEDS412" + url: "http://terminology.hl7.org/CodeSystem/DEEDS412" + oid: "urn:oid:2.16.840.1.113883.6.102.4.12" +- id: "v2-0355" + description: "primaryKeyValueType" + url: "http://terminology.hl7.org/CodeSystem/v2-0355" + oid: "urn:oid:2.16.840.1.113883.18.215" +- id: "v2-0882" + description: "medicalRoleExecutingPhysician" + url: "http://terminology.hl7.org/CodeSystem/v2-0882" + oid: "urn:oid:2.16.840.1.113883.18.412" +- id: "choice-list-orientation" + description: "ChoiceListOrientation" + url: "http://terminology.hl7.org/CodeSystem/choice-list-orientation" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1273" +- id: "v2-0181" + description: "mfnRecord-levelErrorReturn" + url: "http://terminology.hl7.org/CodeSystem/v2-0181" + oid: "urn:oid:2.16.840.1.113883.18.96" +- id: "icpc-DUT" + description: "International Classification of Primary Care 1993 Dutch" + url: "http://terminology.hl7.org/CodeSystem/icpc-DUT" + oid: "urn:oid:2.16.840.1.113883.6.138.3" +- id: "v2-0494" + description: "specimenChildRole" + url: "http://terminology.hl7.org/CodeSystem/v2-0494" + oid: "urn:oid:2.16.840.1.113883.18.318" +- id: "v2-0247" + description: "statusOfEvaluation" + url: "http://terminology.hl7.org/CodeSystem/v2-0247" + oid: "urn:oid:2.16.840.1.113883.18.143" +- id: "goal-priority" + description: "Goal priority" + url: "http://terminology.hl7.org/CodeSystem/goal-priority" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1096" +- id: "v2-0617" + description: "addressUsage" + url: "http://terminology.hl7.org/CodeSystem/v2-0617" + oid: "urn:oid:2.16.840.1.113883.18.375" +- id: "v3-ActStatus" + description: "ActStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-ActStatus" + oid: "urn:oid:2.16.840.1.113883.5.14" +- id: "state-change-reason" + description: "StateChangeReason" + url: "http://terminology.hl7.org/CodeSystem/state-change-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "observation-statistics" + description: "StatisticsCode" + url: "http://terminology.hl7.org/CodeSystem/observation-statistics" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1126" +- id: "v2-0894" + description: "sideOfBody" + url: "http://terminology.hl7.org/CodeSystem/v2-0894" + oid: "urn:oid:2.16.840.1.113883.18.413" +- id: "DCL" + description: "DICOM Class Label" + url: "http://terminology.hl7.org/CodeSystem/DCL" + oid: "urn:oid:2.16.840.1.113883.6.83" +- id: "v2-0178" + description: "file-levelEvent" + url: "http://terminology.hl7.org/CodeSystem/v2-0178" + oid: "urn:oid:2.16.840.1.113883.18.93" +- id: "v2-0482" + description: "orderType" + url: "http://terminology.hl7.org/CodeSystem/v2-0482" + oid: "urn:oid:2.16.840.1.113883.18.307" +- id: "MDRGER" + description: "MedDRA German" + url: "http://terminology.hl7.org/CodeSystem/MDRGER" + oid: "urn:oid:2.16.840.1.113883.6.163.4" +- id: "v2-0528" + description: "eventRelatedPeriod" + url: "http://terminology.hl7.org/CodeSystem/v2-0528" + oid: "urn:oid:2.16.840.1.113883.18.344" +- id: "v2-0251" + description: "actionTakenInResponseToTheEvent" + url: "http://terminology.hl7.org/CodeSystem/v2-0251" + oid: "urn:oid:2.16.840.1.113883.18.146" +- id: "ex-benefitcategory" + description: "Benefit Category Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-benefitcategory" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1175" +- id: "ICD10dut" + description: "ICD10, Dutch Translation" + url: "http://hl7.org/fhir/sid/icd-10-nl" + oid: "urn:oid:2.16.840.1.113883.6.3.2" +- id: "v2-0085" + description: "observationResultStatusCodesInterpretation" + url: "http://terminology.hl7.org/CodeSystem/v2-0085" + oid: "urn:oid:2.16.840.1.113883.18.34" +- id: "v2-0206" + description: "segmentAction" + url: "http://terminology.hl7.org/CodeSystem/v2-0206" + oid: "urn:oid:2.16.840.1.113883.18.111" +- id: "contract-type" + description: "Contract Type Codes" + url: "http://terminology.hl7.org/CodeSystem/contract-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1330" +- id: "MDREA" + description: "MedDRA Am Engl expanded" + url: "http://terminology.hl7.org/CodeSystem/MDREA" + oid: "urn:oid:2.16.840.1.113883.6.164.1" +- id: "NHSNKneeReplacement" + description: "NHSN KneeR eplacement" + url: "http://terminology.hl7.org/CodeSystem/NHSNKneeReplacement" + oid: "urn:oid:2.16.840.1.113883.6.264" +- id: "PHOccupationalDataForHealthODH" + description: "Occupational Data for Health (ODH)" + url: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH" + oid: "urn:oid:2.16.840.1.114222.4.5.327" +- id: "payment-adjustment-reason" + description: "Payment Adjustment Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/payment-adjustment-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1173" +- id: "v2-0504" + description: "sequenceCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0504" + oid: "urn:oid:2.16.840.1.113883.18.328" +- id: "v3-hc-AIGC" + description: "Active Ingredient Group Code" + url: "http://www.canada.ca/en/health-canada/services/drugs-health-products/drug-products/drug-product-database-2" + oid: "urn:oid:2.16.840.1.113883.5.1104" +- id: "v2-0912" + description: "participation" + url: "http://terminology.hl7.org/CodeSystem/v2-0912" + oid: "urn:oid:2.16.840.1.113883.18.420" +- id: "v2-0441" + description: "immunizationRegistryStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0441" + oid: "urn:oid:2.16.840.1.113883.18.281" +- id: "hl7-work-group" + description: "HL7Workgroup" + url: "http://terminology.hl7.org/CodeSystem/hl7-work-group" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1277" +- id: "contracttermtypecodes" + description: "Contract Term Type Codes" + url: "http://terminology.hl7.org/CodeSystem/contracttermtypecodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1199" +- id: "NHSNSpinalFusionLevel" + description: "NHSN Spinal Fusion Level" + url: "http://terminology.hl7.org/CodeSystem/NHSNSpinalFusionLevel" + oid: "urn:oid:2.16.840.1.113883.6.269" +- id: "v3-AdministrativeGender" + description: "AdministrativeGender" + url: "http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender" + oid: "urn:oid:2.16.840.1.113883.5.1" +- id: "v2-0292" + description: "PH_VaccinesAdministered" + url: "http://terminology.hl7.org/ValueSet/v2-0292" + oid: "urn:oid:2.16.840.1.114222.4.11.934" +- id: "endpoint-payload-type" + description: "Endpoint Payload Type" + url: "http://terminology.hl7.org/CodeSystem/endpoint-payload-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1139" +- id: "contractsignertypecodes" + description: "Contract Signer Type Codes" + url: "http://terminology.hl7.org/CodeSystem/contractsignertypecodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1201" + +- id: "v2-0103" + description: "processingId" + url: "http://terminology.hl7.org/CodeSystem/v2-0103" + oid: "urn:oid:2.16.840.1.113883.18.40" +- id: "v2-0553" + description: "invoiceControl" + url: "http://terminology.hl7.org/CodeSystem/v2-0553" + oid: "urn:oid:2.16.840.1.113883.18.357" +- id: "utg-concept-properties" + description: "UTG Specific Concept Properties" + url: "http://terminology.hl7.org/CodeSystem/utg-concept-properties" + oid: null +- id: "NHSNSummaryData" + description: "NHSN Summary Data" + url: "http://terminology.hl7.org/CodeSystem/NHSNSummaryData" + oid: "urn:oid:2.16.840.1.113883.6.270" +- id: "v2-0416" + description: "procedureDrgType" + url: "http://terminology.hl7.org/CodeSystem/v2-0416" + oid: "urn:oid:2.16.840.1.113883.18.258" +- id: "cpnum" + description: "Gold Standard's Clinical Pharmacology Monograph Number" + url: "http://terminology.hl7.org/CodeSystem/cpnum" + oid: "urn:oid:2.16.840.1.113883.4.81" +- id: "v2-0945" + description: "auto-DilutionType" + url: "http://terminology.hl7.org/CodeSystem/v2-0945" + oid: "urn:oid:2.16.840.1.113883.18.445" +- id: "v3-RelationshipConjunction" + description: "RelationshipConjunction" + url: "http://terminology.hl7.org/CodeSystem/v3-RelationshipConjunction" + oid: "urn:oid:2.16.840.1.113883.5.106" +- id: "validation-status" + description: "Validation-status" + url: "http://terminology.hl7.org/CodeSystem/validation-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.895" +- id: "v3-ProbabilityDistributionType" + description: "ProbabilityDistributionType" + url: "http://terminology.hl7.org/CodeSystem/v3-ProbabilityDistributionType" + oid: "urn:oid:2.16.840.1.113883.5.1020" +- id: "subscriber-relationship" + description: "SubscriberPolicyholder Relationship Codes" + url: "http://terminology.hl7.org/CodeSystem/subscriber-relationship" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1386" +- id: "v3-MaterialType" + description: "MaterialType" + url: "http://terminology.hl7.org/CodeSystem/v3-MaterialType" + oid: "urn:oid:2.16.840.1.113883.5.73" +- id: "v3-TableFrame" + description: "TableFrame" + url: "http://terminology.hl7.org/CodeSystem/v3-TableFrame" + oid: "urn:oid:2.16.840.1.113883.5.134" +- id: "icpc-POR" + description: "International Classification of Primary Care 1993 Portuguese" + url: "http://terminology.hl7.org/CodeSystem/icpc-POR" + oid: "urn:oid:2.16.840.1.113883.6.138.11" +- id: "iso3166-1edition2alpha2" + description: "ISO 3166 Part 1 Country Codes, 2nd Edition, Alpha-2" + url: "http://terminology.hl7.org/CodeSystem/iso3166-1edition2alpha2" + oid: "urn:oid:1.0.3166.1.2.2" +- id: "ex-programcode" + description: "Example Program Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-programcode" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1161" + +- id: "v2-0396" + description: "codingSystem" + url: "http://terminology.hl7.org/CodeSystem/v2-0396" + oid: "urn:oid:2.16.840.1.113883.18.247" +- id: "measure-type" + description: "MeasureType" + url: "http://terminology.hl7.org/CodeSystem/measure-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1233" +- id: "subscription-tag" + description: "SubscriptionTag" + url: "http://terminology.hl7.org/CodeSystem/subscription-tag" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1141" +- id: "v3-TelecommunicationCapabilities" + description: "TelecommunicationCapabilities" + url: "http://terminology.hl7.org/CodeSystem/v3-TelecommunicationCapabilities" + oid: "urn:oid:2.16.840.1.113883.5.1118" +- id: "v2-0142" + description: "militaryStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0142" + oid: "urn:oid:2.16.840.1.113883.18.64" +- id: "v2-0007" + description: "admissionType" + url: "http://terminology.hl7.org/CodeSystem/v2-0007" + oid: "urn:oid:2.16.840.1.113883.18.9" +- id: "v3-icpc" + description: "International Classification of Primary Care, 1993 edition" + url: "http://hl7.org/fhir/sid/icpc-1" + oid: "urn:oid:2.16.840.1.113883.6.138" +- id: "v2-0457" + description: "overallClaimDisposition" + url: "http://terminology.hl7.org/CodeSystem/v2-0457" + oid: "urn:oid:2.16.840.1.113883.18.292" +- id: "v3-RoleStatus" + description: "RoleStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-RoleStatus" + oid: "urn:oid:2.16.840.1.113883.5.1068" +- id: "v2-0904" + description: "securityCheckScheme" + url: "http://terminology.hl7.org/CodeSystem/v2-0904" + oid: "urn:oid:2.16.840.1.113883.18.415" +- id: "v2-0284" + description: "referralCategory" + url: "http://terminology.hl7.org/CodeSystem/v2-0284" + oid: "urn:oid:2.16.840.1.113883.18.177" +- id: "action-type" + description: "ActionType" + url: "http://terminology.hl7.org/CodeSystem/action-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1246" +- id: "questionnaire-usage-mode" + description: "QuestionnaireItemUsageMode" + url: "http://terminology.hl7.org/CodeSystem/questionnaire-usage-mode" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1274" +- id: "v2-0790" + description: "approvingRegulatoryAgency" + url: "http://terminology.hl7.org/CodeSystem/v2-0790" + oid: "urn:oid:2.16.840.1.113883.18.404" +- id: "v3-LivingArrangement" + description: "LivingArrangement" + url: "http://terminology.hl7.org/CodeSystem/v3-LivingArrangement" + oid: "urn:oid:2.16.840.1.113883.5.63" +- id: "v2-0513" + description: "bloodProductTransfusion-dispositionStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0513" + oid: "urn:oid:2.16.840.1.113883.18.335" +- id: "attribute-estimate-type" + description: "StatisticAttribute Estimate Type" + url: "http://terminology.hl7.org/CodeSystem/attribute-estimate-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1413" +- id: "v2-0006" + description: "religion2" + url: "http://terminology.hl7.org/CodeSystem/v2-0006" + oid: "urn:oid:2.16.840.1.113883.18.8" +- id: "v2-0456" + description: "nubc-ServiceLineRevenue-cs" + url: "http://terminology.hl7.org/CodeSystem/v2-0456" + oid: "urn:oid:2.16.840.1.113883.6.301.3" +- id: "missingtoothreason" + description: "Missing Tooth Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/missingtoothreason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1150" +- id: "organization-type" + description: "Organization type" + url: "http://terminology.hl7.org/CodeSystem/organization-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1128" +- id: "v2-0905" + description: "shipmentStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0905" + oid: "urn:oid:2.16.840.1.113883.18.416" +- id: "iso3166-1edition2alpha3" + description: "ISO 3166 Part 1 Country Codes, 2nd Edition, Alpha-3" + url: "http://terminology.hl7.org/CodeSystem/iso3166-1edition2alpha3" + oid: "urn:oid:1.0.3166.1.2.3" +- id: "NCIT" + description: "NCI Thesaurus" + url: "http://ncithesaurus-stage.nci.nih.gov" + oid: "urn:oid:2.16.840.1.113883.3.26.1.1" +- id: "v3-nciThesaurus" + description: "NCI Thesaurus" + url: "http://ncithesaurus-stage.nci.nih.gov" + oid: "urn:oid:2.16.840.1.113883.3.26.1.1" +- id: "v3-MessageWaitingPriority" + description: "MessageWaitingPriority" + url: "http://terminology.hl7.org/CodeSystem/v3-MessageWaitingPriority" + oid: "urn:oid:2.16.840.1.113883.5.1083" +- id: "v2-0682" + description: "deviceStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0682" + oid: "urn:oid:2.16.840.1.113883.18.386" +- id: "research-subject-state" + description: "ResearchSubjectState" + url: "http://terminology.hl7.org/CodeSystem/research-subject-state" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "v2-0728" + description: "cclValue" + url: "http://terminology.hl7.org/CodeSystem/v2-0728" + oid: "urn:oid:2.16.840.1.113883.18.391" +- id: "v2-0397" + description: "sequencing" + url: "http://terminology.hl7.org/CodeSystem/v2-0397" + oid: "urn:oid:2.16.840.1.113883.18.248" +- id: "subscription-status-at-event" + description: "SubscriptionStatusAtEvent" + url: "http://terminology.hl7.org/CodeSystem/subscription-status-at-event" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1465" +- id: "research-study-phase" + description: "ResearchStudyPhase" + url: "http://terminology.hl7.org/CodeSystem/research-study-phase" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1247" +- id: "v2-0544" + description: "containerCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0544" + oid: "urn:oid:2.16.840.1.113883.18.353" +- id: "v3-LocalRemoteControlState" + description: "LocalRemoteControlState" + url: "http://terminology.hl7.org/CodeSystem/v3-LocalRemoteControlState" + oid: "urn:oid:2.16.840.1.113883.5.66" +- id: "ex-diagnosis-on-admission" + description: "Example Diagnosis on Admission Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-diagnosis-on-admission" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1170" +- id: "v2-0401" + description: "governmentReimbursementProgram" + url: "http://terminology.hl7.org/CodeSystem/v2-0401" + oid: "urn:oid:2.16.840.1.113883.18.250" +- id: "encounter-type" + description: "Encounter type" + url: "http://terminology.hl7.org/CodeSystem/encounter-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1088" +- id: "icnp" + description: "International Classification for Nursing Practice" + url: "http://terminology.hl7.org/CodeSystem/icnp" + oid: "urn:oid:2.16.840.1.113883.6.97" +- id: "euclides" + description: "EUCLIDES" + url: "http://terminology.hl7.org/CodeSystem/euclides" + oid: "urn:oid:2.16.840.1.113883.6.34" +- id: "csaid" + description: "CAN/CSA-Z795-96" + url: "http://terminology.hl7.org/CodeSystem/csaid" + oid: "urn:oid:2.16.840.1.113883.6.235" +- id: "v3-ContainerSeparator" + description: "ContainerSeparator" + url: "http://terminology.hl7.org/CodeSystem/v3-ContainerSeparator" + oid: "urn:oid:2.16.840.1.113883.5.27" +- id: "ex-revenue-center" + description: "Example Revenue Center Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-revenue-center" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1168" +- id: "v3-ParticipationMode" + description: "ParticipationMode" + url: "http://terminology.hl7.org/CodeSystem/v3-ParticipationMode" + oid: "urn:oid:2.16.840.1.113883.5.1064" +- id: "mthicpc2E-AE" + description: "ICPC2E Am Engl (Metathesaurus)" + url: "http://terminology.hl7.org/CodeSystem/mthicpc2E-AE" + oid: "urn:oid:2.16.840.1.113883.6.139.3" +- id: "endpoint-connection-type" + description: "Endpoint Connection Type" + url: "http://terminology.hl7.org/CodeSystem/endpoint-connection-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1140" +- id: "v2-0102" + description: "delayedAcknowledgmentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0102" + oid: "urn:oid:2.16.840.1.113883.18.39" +- id: "fipspub92" + description: "FIPS_SOC" + url: "http://terminology.hl7.org/CodeSystem/fipspub92" + oid: "urn:oid:2.16.840.1.113883.6.91" +- id: "v3-ActInvoiceElementModifier" + description: "ActInvoiceElementModifier" + url: "http://terminology.hl7.org/CodeSystem/v3-ActInvoiceElementModifier" + oid: "urn:oid:2.16.840.1.113883.5.1051" +- id: "v2-0417" + description: "tissueType" + url: "http://terminology.hl7.org/CodeSystem/v2-0417" + oid: "urn:oid:2.16.840.1.113883.18.259" +- id: "verificationresult-communication-method" + description: "VerificationResult Communication Method" + url: "http://terminology.hl7.org/CodeSystem/verificationresult-communication-method" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1402" +- id: "v2-0339" + description: "advancedBeneficiaryNotice" + url: "http://terminology.hl7.org/CodeSystem/v2-0339" + oid: "urn:oid:2.16.840.1.113883.18.209" +- id: "hhcc" + description: "Home Health Care" + url: "http://terminology.hl7.org/CodeSystem/hhcc" + oid: "urn:oid:2.16.840.1.113883.6.17" +- id: "icpc2E-P" + description: "ICPC2E 1998 Plus" + url: "http://terminology.hl7.org/CodeSystem/icpc2E-P" + oid: "urn:oid:2.16.840.1.113883.6.140" +- id: "v2-0505" + description: "cyclicEntryExitIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0505" + oid: "urn:oid:2.16.840.1.113883.18.329" +- id: "v2-0155" + description: "accept-applicationAcknowledgmentConditions" + url: "http://terminology.hl7.org/CodeSystem/v2-0155" + oid: "urn:oid:2.16.840.1.113883.18.73" +- id: "v2-0440" + description: "dataTypes" + url: "http://terminology.hl7.org/CodeSystem/v2-0440" + oid: "urn:oid:2.16.840.1.113883.18.280" + +- id: "v2-0207" + description: "processingMode" + url: "http://terminology.hl7.org/CodeSystem/v2-0207" + oid: "urn:oid:2.16.840.1.113883.18.112" +- id: "v2-0657" + description: "deviceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0657" + oid: "urn:oid:2.16.840.1.113883.18.382" +- id: "IC2" + description: "ICHPPC-2" + url: "http://terminology.hl7.org/CodeSystem/IC2" + oid: "urn:oid:2.16.840.1.113883.6.44" +- id: "DEEDS405" + description: "DEEDS405" + url: "http://terminology.hl7.org/CodeSystem/DEEDS405" + oid: "urn:oid:2.16.840.1.113883.6.102.4.5" +- id: "coverageeligibilityresponse-ex-auth-support" + description: "CoverageEligibilityResponse Auth Support Codes" + url: "http://terminology.hl7.org/CodeSystem/coverageeligibilityresponse-ex-auth-support" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1394" +- id: "v3-OrganizationNameType" + description: "OrganizationNameType" + url: "http://terminology.hl7.org/CodeSystem/v3-OrganizationNameType" + oid: "urn:oid:2.16.840.1.113883.5.1016" +- id: "v2-0250" + description: "relatednessAssessment" + url: "http://terminology.hl7.org/CodeSystem/v2-0250" + oid: "urn:oid:2.16.840.1.113883.18.145" +- id: "v2-0315" + description: "livingWillCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0315" + oid: "urn:oid:2.16.840.1.113883.18.190" +- id: "v3-hl7PublishingSubSection" + description: "HL7PublishingSubSection" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7PublishingSubSection" + oid: "urn:oid:2.16.840.1.113883.5.1134" +- id: "v2-0895" + description: "nubc-PresentOnAdmission-cs" + url: "http://terminology.hl7.org/CodeSystem/v2-0895" + oid: "urn:oid:2.16.840.1.113883.6.301.11" +- id: "v2-0179" + description: "responseLevel" + url: "http://terminology.hl7.org/CodeSystem/v2-0179" + oid: "urn:oid:2.16.840.1.113883.18.94" +- id: "v2-0483" + description: "authorizationMode" + url: "http://terminology.hl7.org/CodeSystem/v2-0483" + oid: "urn:oid:2.16.840.1.113883.18.308" +- id: "v2-0529" + description: "precision" + url: "http://terminology.hl7.org/CodeSystem/v2-0529" + oid: "urn:oid:2.16.840.1.113883.18.345" +- id: "v3-MaterialForm" + description: "MaterialForm" + url: "http://terminology.hl7.org/CodeSystem/v3-MaterialForm" + oid: "urn:oid:2.16.840.1.113883.5.1127" +- id: "definition-use" + description: "Structure Definition Use Codes / Keywords" + url: "http://terminology.hl7.org/CodeSystem/definition-use" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1191" +- id: "v2-0616" + description: "addressExpirationReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0616" + oid: "urn:oid:2.16.840.1.113883.18.374" +- id: "v3-PeriodicIntervalOfTimeAbbreviation" + description: "PeriodicIntervalOfTimeAbbreviation" + url: "http://terminology.hl7.org/CodeSystem/v3-PeriodicIntervalOfTimeAbbreviation" + oid: "urn:oid:2.16.840.1.113883.5.1021" +- id: "certainty-subcomponent-type" + description: "StatisticCertaintySubcomponentType" + url: "http://terminology.hl7.org/CodeSystem/certainty-subcomponent-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1360" +- id: "v2-0180" + description: "masterfileActionCode" + url: "http://terminology.hl7.org/CodeSystem/v2-0180" + oid: "urn:oid:2.16.840.1.113883.18.95" +- id: "v2-0495" + description: "bodySiteModifier" + url: "http://terminology.hl7.org/CodeSystem/v2-0495" + oid: "urn:oid:2.16.840.1.113883.18.319" +- id: "v2-0211" + description: "alternateCharacterSets" + url: "http://terminology.hl7.org/CodeSystem/v2-0211" + oid: "urn:oid:2.16.840.1.113883.18.116" +- id: "v2-0354" + description: "messageStructure" + url: "http://terminology.hl7.org/CodeSystem/v2-0354" + oid: "urn:oid:2.16.840.1.113883.18.214" +- id: "v3-hgnc" + description: "HUGO Gene Nomenclature" + url: "http://www.genenames.org" + oid: "urn:oid:2.16.840.1.113883.6.281" +- id: "v2-0092" + description: "re-admissionIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0092" + oid: "urn:oid:2.16.840.1.113883.18.36" +- id: "url" + description: "URL" + url: "http://terminology.hl7.org/CodeSystem/url" + oid: "urn:oid:2.16.840.1.113883.6.11" +- id: "nubc-UB92" + description: "National Uniform Billing Council, UB 92" + url: "http://terminology.hl7.org/CodeSystem/nubc-UB92" + oid: "urn:oid:2.16.840.1.113883.6.21" +- id: "adverse-event-seriousness" + description: "AdverseEventSeriousness" + url: "http://terminology.hl7.org/CodeSystem/adverse-event-seriousness" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1253" +- id: "v2-0909" + description: "patientResultsReleaseCategorizationScheme" + url: "http://terminology.hl7.org/CodeSystem/v2-0909" + oid: "urn:oid:2.16.840.1.113883.18.419" +- id: "v2-0323" + description: "actionCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0323" + oid: "urn:oid:2.16.840.1.113883.18.196" +- id: "icpc2E-P-AE" + description: "ICPC2E 1998 Plus Am Engl" + url: "http://terminology.hl7.org/CodeSystem/icpc2E-P-AE" + oid: "urn:oid:2.16.840.1.113883.6.140.1" +- id: "v3-Race" + description: "Race" + url: "http://terminology.hl7.org/CodeSystem/v3-Race" + oid: "urn:oid:2.16.840.1.113883.5.104" +- id: "v3-Sequencing" + description: "Sequencing" + url: "http://terminology.hl7.org/CodeSystem/v3-Sequencing" + oid: "urn:oid:2.16.840.1.113883.5.113" +- id: "MTHMDRSPA" + description: "MTH MedDRA Spanish" + url: "http://terminology.hl7.org/CodeSystem/MTHMDRSPA" + oid: "urn:oid:2.16.840.1.113883.6.165" +- id: "v2-0548" + description: "signatorysRelationshipToSubject" + url: "http://terminology.hl7.org/CodeSystem/v2-0548" + oid: "urn:oid:2.16.840.1.113883.18.355" +- id: "benefit-network" + description: "Network Type Codes" + url: "http://terminology.hl7.org/CodeSystem/benefit-network" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1177" +- id: "v2-0374" + description: "systemInducedContaminants" + url: "http://terminology.hl7.org/CodeSystem/v2-0374" + oid: "urn:oid:2.16.840.1.113883.18.232" +- id: "consentcategorycodes" + description: "Consent Category Codes" + url: "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1226" +- id: "v3-SpecimenType" + description: "SpecimenType" + url: "http://terminology.hl7.org/CodeSystem/v3-SpecimenType" + oid: "urn:oid:2.16.840.1.113883.5.129" +- id: "v3-ContainerCap" + description: "ContainerCap" + url: "http://terminology.hl7.org/CodeSystem/v3-ContainerCap" + oid: "urn:oid:2.16.840.1.113883.5.26" +- id: "v2-0231" + description: "studentStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0231" + oid: "urn:oid:2.16.840.1.113883.18.131" +- id: "metabolicSyndrome" + description: "METABOLIC SYNDROME" + url: "http://terminology.hl7.org/CodeSystem/metabolicSyndrome" + oid: "urn:oid:2.16.840.1.113883.6.249" +- id: "v3-ISO3166-1retired" + description: "ISO 3166 2 Character Country Codes" + url: "http://terminology.hl7.org/CodeSystem/v3-ISO3166-1retired" + oid: "urn:oid:2.16.1" +- id: "supply-item-type" + description: "Supply Item Type" + url: "http://terminology.hl7.org/CodeSystem/supply-item-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1194" +- id: "GMDN" + description: "Global Medical Device Nomenclature" + url: "http://terminology.hl7.org/CodeSystem/GMDN" + oid: "urn:oid:2.16.840.1.113883.6.276" +- id: "failure-action" + description: "Failure-action" + url: "http://terminology.hl7.org/CodeSystem/failure-action" + oid: "urn:oid:2.16.840.1.113883.4.642.1.891" +- id: "v2-0948" + description: "v2CS-relationshipType" + url: "http://terminology.hl7.org/CodeSystem/v2-0948" + oid: "urn:oid:2.16.840.1.113883.18.448" +- id: "cdcNHSN" + description: "CDC - National Healthcare Safety Network (NHSN) code system" + url: "http://terminology.hl7.org/CodeSystem/cdcNHSN" + oid: "urn:oid:2.16.840.1.113883.6.277" +- id: "variant-state" + description: "sequenceStatus" + url: "http://terminology.hl7.org/CodeSystem/variant-state" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1085" +- id: "HL70227" + description: "PH_ManufacturersOfVaccinesMVX_CDC_NIP" + url: "http://terminology.hl7.org/CodeSystem/v2-0227" + oid: "urn:oid:2.16.840.1.113883.12.227" +- id: "v2-0227" + description: "PH_ManufacturersOfVaccinesMVX_CDC_NIP" + url: "http://terminology.hl7.org/CodeSystem/v2-0227" + oid: "urn:oid:2.16.840.1.113883.12.227" +- id: "encounter-subject-status" + description: "Encounter subject status" + url: "http://terminology.hl7.org/CodeSystem/encounter-subject-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1420" +- id: "v3-NullFlavor" + description: "NullFlavor" + url: "http://terminology.hl7.org/CodeSystem/v3-NullFlavor" + oid: "urn:oid:2.16.840.1.113883.5.1008" +- id: "v2-0159" + description: "dietCodeSpecificationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0159" + oid: "urn:oid:2.16.840.1.113883.18.77" +- id: "v3-hc-AIGN" + description: "Active Ingredient Group Number" + url: "http://www.canada.ca/en/health-canada/services/drugs-health-products/drug-products/drug-product-database-4" + oid: "urn:oid:2.16.840.1.113883.5.1106" +- id: "dicom-audit-lifecycle" + description: null + url: "http://terminology.hl7.org/CodeSystem/dicom-audit-lifecycle" + oid: null +- id: "ex-claimsubtype" + description: "Example Claim SubType Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-claimsubtype" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1158" +- id: "activity-definition-category" + description: "ActivityDefinitionCategory" + url: "http://terminology.hl7.org/CodeSystem/activity-definition-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1243" +- id: "v2-0335" + description: "repeatPattern" + url: "http://terminology.hl7.org/CodeSystem/v2-0335" + oid: "urn:oid:2.16.840.1.113883.18.205" +- id: "medicationrequest-status-reason" + description: "MedicationRequest Status Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationrequest-status-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1325" +- id: "icd-o-3" + description: "International Classification of Diseases for Oncology, version 3." + url: "http://terminology.hl7.org/CodeSystem/icd-o-3" + oid: "urn:oid:2.16.840.1.113883.6.43.1" +- id: "v2-0270" + description: "documentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0270" + oid: "urn:oid:2.16.840.1.113883.18.163" +- id: "v2-0437" + description: "alertDevice" + url: "http://terminology.hl7.org/CodeSystem/v2-0437" + oid: "urn:oid:2.16.840.1.113883.18.278" +- id: "conformance-expectation" + description: "ConformanceExpectation" + url: "http://terminology.hl7.org/CodeSystem/conformance-expectation" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1271" +- id: "v3-EmployeeJobClass" + description: "EmployeeJobClass" + url: "http://terminology.hl7.org/CodeSystem/v3-EmployeeJobClass" + oid: "urn:oid:2.16.840.1.113883.5.1059" +- id: "v2-0122" + description: "chargeType" + url: "http://terminology.hl7.org/CodeSystem/v2-0122" + oid: "urn:oid:2.16.840.1.113883.18.50" +- id: "v2-0572" + description: "taxStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0572" + oid: "urn:oid:2.16.840.1.113883.18.372" +- id: "entformula-additive" + description: "Enteral Formula Additive Type Code" + url: "http://terminology.hl7.org/CodeSystem/entformula-additive" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1123" +- id: "adverse-event-causality-method" + description: "AdverseEventCausalityMethod" + url: "http://terminology.hl7.org/CodeSystem/adverse-event-causality-method" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1255" +- id: "v2-0933" + description: "intendedProcedureType" + url: "http://terminology.hl7.org/CodeSystem/v2-0933" + oid: "urn:oid:2.16.840.1.113883.18.434" +- id: "icpc-SWE" + description: "International Classification of Primary Care 1993 Swedish" + url: "http://terminology.hl7.org/CodeSystem/icpc-SWE" + oid: "urn:oid:2.16.840.1.113883.6.138.13" +- id: "message-reasons-encounter" + description: "Example Message Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/message-reasons-encounter" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1122" +- id: "v2-0175" + description: "masterFileIdentifierCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0175" + oid: "urn:oid:2.16.840.1.113883.18.91" +- id: "goal-acceptance-status" + description: "GoalAcceptanceStatus" + url: "http://terminology.hl7.org/CodeSystem/goal-acceptance-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1270" +- id: "v2-0749" + description: "drgGroupingStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0749" + oid: "urn:oid:2.16.840.1.113883.18.396" +- id: "v2-0925" + description: "phlebotomyIssue" + url: "http://terminology.hl7.org/CodeSystem/v2-0925" + oid: "urn:oid:2.16.840.1.113883.18.431" +- id: "HL70163" + description: "bodySite" + url: "http://terminology.hl7.org/CodeSystem/v2-0163" + oid: "urn:oid:2.16.840.1.113883.18.81" +- id: "v2-0163" + description: "bodySite" + url: "http://terminology.hl7.org/CodeSystem/v2-0163" + oid: "urn:oid:2.16.840.1.113883.18.81" +- id: "v2-0499" + description: "consentBypassReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0499" + oid: "urn:oid:2.16.840.1.113883.18.323" +- id: "medicationknowledge-characteristic" + description: "MedicationKnowledge Characteristic Codes" + url: "http://terminology.hl7.org/CodeSystem/medicationknowledge-characteristic" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1338" +- id: "NHSNVocabulary" + description: "NHSN HAI Vocabulary" + url: "http://terminology.hl7.org/CodeSystem/NHSNVocabulary" + oid: "urn:oid:2.16.840.1.113883.6.274" + +- id: "v2-0421" + description: "severityOfIllness" + url: "http://terminology.hl7.org/CodeSystem/v2-0421" + oid: "urn:oid:2.16.840.1.113883.18.262" +- id: "v2-0564" + description: "adjustmentCategory" + url: "http://terminology.hl7.org/CodeSystem/v2-0564" + oid: "urn:oid:2.16.840.1.113883.18.366" +- id: "camncvs" + description: "CAMNCVS" + url: "http://terminology.hl7.org/CodeSystem/camncvs" + oid: "urn:oid:2.16.840.1.113883.6.19" +- id: "GCRT" + description: "GCRT" + url: "http://terminology.hl7.org/CodeSystem/GCRT" + oid: "urn:oid:2.16.840.1.113883.4.80" +- id: "v3-EntityNamePartTypeR2" + description: "EntityNamePartTypeR2" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartTypeR2" + oid: "urn:oid:2.16.840.1.113883.5.1121" +- id: "v3-EntityCode" + description: "EntityCode" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityCode" + oid: "urn:oid:2.16.840.1.113883.5.1060" +- id: "v2-0216" + description: "patientStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0216" + oid: "urn:oid:2.16.840.1.113883.18.120" +- id: "testscript-operation-codes" + description: "Test script operation code" + url: "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1195" +- id: "v2-0353" + description: "cweStatuses" + url: "http://terminology.hl7.org/CodeSystem/v2-0353" + oid: "urn:oid:2.16.840.1.113883.18.213" +- id: "DEEDS414" + description: "DEEDS414" + url: "http://terminology.hl7.org/CodeSystem/DEEDS414" + oid: "urn:oid:2.16.840.1.113883.6.102.4.14" +- id: "EPSG-GeodeticParameterDataset" + description: "EPSG Geodetic Parameter Dataset" + url: "http://terminology.hl7.org/CodeSystem/EPSG-GeodeticParameterDataset" + oid: "urn:oid:2.16.840.1.113883.6.242" +- id: "v2-0187" + description: "providerBilling" + url: "http://terminology.hl7.org/CodeSystem/v2-0187" + oid: "urn:oid:2.16.840.1.113883.18.99" + +- id: "adverse-event-causality-assess" + description: "AdverseEventCausalityAssessment" + url: "http://terminology.hl7.org/CodeSystem/adverse-event-causality-assess" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1254" +- id: "v2-0538" + description: "institutionRelationshipType" + url: "http://terminology.hl7.org/CodeSystem/v2-0538" + oid: "urn:oid:2.16.840.1.113883.18.351" +- id: "v2-0168" + description: "processingPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0168" + oid: "urn:oid:2.16.840.1.113883.18.86" +- id: "NHSNBSIRiskFactors" + description: "NHSN BSI Risk Factors" + url: "http://terminology.hl7.org/CodeSystem/NHSNBSIRiskFactors" + oid: "urn:oid:2.16.840.1.113883.6.266" +- id: "v2-0492" + description: "specimenAppropriateness" + url: "http://terminology.hl7.org/CodeSystem/v2-0492" + oid: "urn:oid:2.16.840.1.113883.18.316" +- id: "v3-scptype" + description: "pan-Canadian Provider Types" + url: "https://fhir.infoway-inforoute.ca/CodeSystem/scptype" + oid: "urn:oid:2.16.840.1.113883.2.20.5.3" +- id: "v3-ParticipationSignature" + description: "ParticipationSignature" + url: "http://terminology.hl7.org/CodeSystem/v3-ParticipationSignature" + oid: "urn:oid:2.16.840.1.113883.5.89" +- id: "v2-0241" + description: "patientOutcome" + url: "http://terminology.hl7.org/CodeSystem/v2-0241" + oid: "urn:oid:2.16.840.1.113883.18.140" +- id: "DEEDS506" + description: "DEEDS506" + url: "http://terminology.hl7.org/CodeSystem/DEEDS506" + oid: "urn:oid:2.16.840.1.113883.6.102.5.6" +- id: "smart-capabilities" + description: "SmartCapabilities" + url: "http://terminology.hl7.org/CodeSystem/smart-capabilities" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1265" +- id: "CDARUS" + description: "CDA_RUS" + url: "http://terminology.hl7.org/CodeSystem/CDARUS" + oid: "urn:oid:2.16.840.1.113883.6.239" +- id: "IETF1766" + description: "IETF RFC 1766" + url: "http://terminology.hl7.org/CodeSystem/IETF1766" + oid: "urn:oid:2.16.840.1.113883.6.84" +- id: "v2-0938" + description: "collectionEvent" + url: "http://terminology.hl7.org/CodeSystem/v2-0938" + oid: "urn:oid:2.16.840.1.113883.18.441" +- id: "v3-ContextControl" + description: "ContextControl" + url: "http://terminology.hl7.org/CodeSystem/v3-ContextControl" + oid: "urn:oid:2.16.840.1.113883.5.1057" +- id: "hibccHIN" + description: "HIBCC" + url: "http://terminology.hl7.org/CodeSystem/hibccHIN" + oid: "urn:oid:2.16.840.1.113883.6.40" +- id: "v2-0191" + description: "typeOfReferencedData" + url: "http://terminology.hl7.org/CodeSystem/v2-0191" + oid: "urn:oid:2.16.840.1.113883.18.102" +- id: "v2-0484" + description: "dispenseType" + url: "http://terminology.hl7.org/CodeSystem/v2-0484" + oid: "urn:oid:2.16.840.1.113883.18.309" +- id: "v3-ParticipationType" + description: "ParticipationType" + url: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + oid: "urn:oid:2.16.840.1.113883.5.90" +- id: "resource-type-link" + description: "PayeeResourceType" + url: "http://terminology.hl7.org/CodeSystem/resource-type-link" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1180" +- id: "ex-relatedclaimrelationship" + description: "Example Related Claim Relationship Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-relatedclaimrelationship" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1159" +- id: "v2-0257" + description: "natureOfChallenge" + url: "http://terminology.hl7.org/CodeSystem/v2-0257" + oid: "urn:oid:2.16.840.1.113883.18.152" +- id: "research-study-prim-purp-type" + description: "ResearchStudyPrimaryPurposeType" + url: "http://terminology.hl7.org/CodeSystem/research-study-prim-purp-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1250" +- id: "v2-0742" + description: "drgStatusFinancialCalculation" + url: "http://terminology.hl7.org/CodeSystem/v2-0742" + oid: "urn:oid:2.16.840.1.113883.18.395" +- id: "v3-ActPriority" + description: "ActPriority" + url: "http://terminology.hl7.org/CodeSystem/v3-ActPriority" + oid: "urn:oid:2.16.840.1.113883.5.7" +- id: "v3-ResponseModality" + description: "ResponseModality" + url: "http://terminology.hl7.org/CodeSystem/v3-ResponseModality" + oid: "urn:oid:2.16.840.1.113883.5.109" +- id: "claimcareteamrole" + description: "Claim Care Team Role Codes" + url: "http://terminology.hl7.org/CodeSystem/claimcareteamrole" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1165" +- id: "v2-0083" + description: "outlierType" + url: "http://terminology.hl7.org/CodeSystem/v2-0083" + oid: "urn:oid:2.16.840.1.113883.18.33" +- id: "v3-EducationLevel" + description: "Education Level" + url: "http://terminology.hl7.org/CodeSystem/v3-EducationLevel" + oid: "urn:oid:2.16.840.1.113883.5.1077" +- id: "v2-0200" + description: "nameType2" + url: "http://terminology.hl7.org/CodeSystem/v2-0200" + oid: "urn:oid:2.16.840.1.113883.18.105" +- id: "DEEDS402" + description: "DEEDS402" + url: "http://terminology.hl7.org/CodeSystem/DEEDS402" + oid: "urn:oid:2.16.840.1.113883.6.102.4.2" +- id: "contractactorrole" + description: "Contract Actor Role Codes" + url: "http://terminology.hl7.org/CodeSystem/contractactorrole" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1203" +- id: "v2-0502" + description: "non-subjectConsenterReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0502" + oid: "urn:oid:2.16.840.1.113883.18.326" +- id: "v3-mediaType" + description: "Media Type" + url: "http://terminology.hl7.org/CodeSystem/v3-mediaType" + oid: "urn:oid:2.16.840.1.113883.5.79" +- id: "v2-0017" + description: "transactionType" + url: "http://terminology.hl7.org/CodeSystem/v2-0017" + oid: "urn:oid:2.16.840.1.113883.18.13" +- id: "v2-0914" + description: "rootCause" + url: "http://terminology.hl7.org/CodeSystem/v2-0914" + oid: "urn:oid:2.16.840.1.113883.18.421" +- id: "v3-ActRelationshipSplit" + description: "ActRelationshipSplit" + url: "http://terminology.hl7.org/CodeSystem/v3-ActRelationshipSplit" + oid: "urn:oid:2.16.840.1.113883.5.13" +- id: "v2-0294" + description: "timeSelectionCriteriaParameterClass" + url: "http://terminology.hl7.org/CodeSystem/v2-0294" + oid: "urn:oid:2.16.840.1.113883.18.183" +- id: "standards-status" + description: "StandardsStatus" + url: "http://terminology.hl7.org/CodeSystem/standards-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1366" +- id: "adjudication-reason" + description: "Adjudication Reason Codes" + url: "http://terminology.hl7.org/CodeSystem/adjudication-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1172" +- id: "abcCodes" + description: "ABCcodes" + url: "http://terminology.hl7.org/CodeSystem/abcCodes" + oid: "urn:oid:2.16.840.1.113883.6.25" +- id: "v3-ISO3166-2retired" + description: "ISO 3166 3 Character Country Codes" + url: "http://terminology.hl7.org/CodeSystem/v3-ISO3166-2retired" + oid: "urn:oid:2.16.2" +- id: "v2-0105" + description: "sourceOfComment" + url: "http://terminology.hl7.org/CodeSystem/v2-0105" + oid: "urn:oid:2.16.840.1.113883.18.42" +- id: "v2-0555" + description: "invoiceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0555" + oid: "urn:oid:2.16.840.1.113883.18.359" +- id: "nmmds" + description: "Nursing Management Minimum Data Set" + url: "http://terminology.hl7.org/CodeSystem/nmmds" + oid: "urn:oid:2.16.840.1.113883.6.23" +- id: "v2-0806" + description: "sterilizationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0806" + oid: "urn:oid:2.16.840.1.113883.18.406" +- id: "iso-21089-lifecycle" + description: null + url: "http://terminology.hl7.org/CodeSystem/iso-21089-lifecycle" + oid: null +- id: "icpc-NOR" + description: "International Classification of Primary Care 1993 Norwegian" + url: "http://terminology.hl7.org/CodeSystem/icpc-NOR" + oid: "urn:oid:2.16.840.1.113883.6.138.10" +- id: "v3-styleType" + description: "Style Type" + url: "http://terminology.hl7.org/CodeSystem/v3-styleType" + oid: "urn:oid:2.16.840.1.113883.5.1095" +- id: "v2-0739" + description: "drgStatusPatient" + url: "http://terminology.hl7.org/CodeSystem/v2-0739" + oid: "urn:oid:2.16.840.1.113883.18.394" +- id: "condition-ver-status" + description: "ConditionVerificationStatus" + url: "http://terminology.hl7.org/CodeSystem/condition-ver-status" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1075" +- id: "USZIPCODES" + description: "United States Postal Service" + url: "http://terminology.hl7.org/CodeSystem/USZIPCODES" + oid: "urn:oid:2.16.840.1.113883.6.231" +- id: "v2-0369" + description: "specimenRole" + url: "http://terminology.hl7.org/CodeSystem/v2-0369" + oid: "urn:oid:2.16.840.1.113883.18.227" +- id: "icpc-DAN" + description: "International Classification of Primary Care 1993 Danish" + url: "http://terminology.hl7.org/CodeSystem/icpc-DAN" + oid: "urn:oid:2.16.840.1.113883.6.138.2" +- id: "v2-0406" + description: "organizationUnitType" + url: "http://terminology.hl7.org/CodeSystem/v2-0406" + oid: "urn:oid:2.16.840.1.113883.18.254" +- id: "variable-role" + description: "EvidenceVariableRole" + url: "http://terminology.hl7.org/CodeSystem/variable-role" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1457" +- id: "v3-ObservationValue" + description: "ObservationValue" + url: "http://terminology.hl7.org/CodeSystem/v3-ObservationValue" + oid: "urn:oid:2.16.840.1.113883.5.1063" +- id: "ex-procedure-type" + description: "Example Procedure Type Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-procedure-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1388" +- id: "NHSNSSILocationType" + description: "NHSN SSI Location Type" + url: "http://terminology.hl7.org/CodeSystem/NHSNSSILocationType" + oid: "urn:oid:2.16.840.1.113883.6.265" +- id: "v3-hl7Realm" + description: "HL7Realm" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7Realm" + oid: "urn:oid:2.16.840.1.113883.5.1124" +- id: "icd10ae" + description: "ICD-10 American English" + url: "http://terminology.hl7.org/CodeSystem/icd10ae" + oid: "urn:oid:2.16.840.1.113883.6.3.1" +- id: "v2-0144" + description: "eligibilitySource" + url: "http://terminology.hl7.org/CodeSystem/v2-0144" + oid: "urn:oid:2.16.840.1.113883.18.65" +- id: "v3-substanceAdminSubstitution" + description: "Substance Admin Substitution" + url: "http://terminology.hl7.org/CodeSystem/v3-substanceAdminSubstitution" + oid: "urn:oid:2.16.840.1.113883.5.1070" +- id: "v2-0514" + description: "transfusionAdverseReaction" + url: "http://terminology.hl7.org/CodeSystem/v2-0514" + oid: "urn:oid:2.16.840.1.113883.18.336" +- id: "standardBillingUnit" + description: "Standard Billing Unit" + url: "http://terminology.hl7.org/CodeSystem/standardBillingUnit" + oid: "urn:oid:2.16.840.1.113883.2.13" +- id: "v2-0001" + description: "administrativeSex" + url: "http://terminology.hl7.org/CodeSystem/v2-0001" + oid: "urn:oid:2.16.840.1.113883.18.2" +- id: "validation-process" + description: "Validation-process" + url: "http://terminology.hl7.org/CodeSystem/validation-process" + oid: "urn:oid:2.16.840.1.113883.4.642.1.889" +- id: "v2-0778" + description: "itemType" + url: "http://terminology.hl7.org/CodeSystem/v2-0778" + oid: "urn:oid:2.16.840.1.113883.18.403" +- id: "v2-0282" + description: "referralDisposition" + url: "http://terminology.hl7.org/CodeSystem/v2-0282" + oid: "urn:oid:2.16.840.1.113883.18.175" +- id: "v3-ObservationInterpretation" + description: "ObservationInterpretation" + url: "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation" + oid: "urn:oid:2.16.840.1.113883.5.83" +- id: "pclocd" + description: "pan-Canadian LOINC Observation Code Database" + url: "https://fhir.infoway-inforoute.ca/CodeSystem/pCLOCD" + oid: "urn:oid:2.16.840.1.113883.2.20.5.1" +- id: "condition-clinical" + description: "Condition Clinical Status Codes" + url: "http://terminology.hl7.org/CodeSystem/condition-clinical" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1074" +- id: "DEEDS418" + description: "DEEDS418" + url: "http://terminology.hl7.org/CodeSystem/DEEDS418" + oid: "urn:oid:2.16.840.1.113883.6.102.4.18" +- id: "can-push-updates" + description: "Can-push-updates" + url: "http://terminology.hl7.org/CodeSystem/can-push-updates" + oid: "urn:oid:2.16.840.1.113883.4.642.1.897" +- id: "goal-achievement" + description: "Goal achievement status" + url: "http://terminology.hl7.org/CodeSystem/goal-achievement" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1375" +- id: "v2-0426" + description: "bloodProduct" + url: "http://terminology.hl7.org/CodeSystem/v2-0426" + oid: "urn:oid:2.16.840.1.113883.18.267" +- id: "v2-0076" + description: "messageType" + url: "http://terminology.hl7.org/CodeSystem/v2-0076" + oid: "urn:oid:2.16.840.1.113883.18.30" +- id: "deeds-old" + description: "DEEDS(old)" + url: "http://terminology.hl7.org/CodeSystem/deeds-old" + oid: "urn:oid:2.16.840.1.113883.6.89" +- id: "v3-hl7CMETAttribution" + description: "HL7CMETAttribution" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7CMETAttribution" + oid: "urn:oid:2.16.840.1.113883.5.1132" +- id: "research-subject-state-type" + description: "ResearchSubjectStateType" + url: "http://terminology.hl7.org/CodeSystem/research-subject-state-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "evidence-quality" + description: "QualityOfEvidenceRating" + url: "http://terminology.hl7.org/CodeSystem/evidence-quality" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1267" +- id: "claiminformationcategory" + description: "Claim Information Category Codes" + url: "http://terminology.hl7.org/CodeSystem/claiminformationcategory" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1163" +- id: "v2-0133" + description: "procedurePractitionerIdentifierCodeType" + url: "http://terminology.hl7.org/CodeSystem/v2-0133" + oid: "urn:oid:2.16.840.1.113883.18.59" +- id: "v3-VaccineManufacturer" + description: "VaccineManufacturer" + url: "http://terminology.hl7.org/CodeSystem/v3-VaccineManufacturer" + oid: "urn:oid:2.16.840.1.113883.5.144" +- id: "v2-tables" + description: "V2 Table List" + url: "http://terminology.hl7.org/CodeSystem/v2-tables" + oid: null +- id: "v2-0922" + description: "certificationCategory" + url: "http://terminology.hl7.org/CodeSystem/v2-0922" + oid: "urn:oid:2.16.840.1.113883.18.428" +- id: "v3-TribalEntityUS" + description: "TribalEntityUS" + url: "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS" + oid: "urn:oid:2.16.840.1.113883.5.140" +- id: "immunization-evaluation-dose-status-reason" + description: "Immunization Evaluation Dose Status Reason codes" + url: "http://terminology.hl7.org/CodeSystem/immunization-evaluation-dose-status-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1103" +- id: "v2-0164" + description: "administrationDevice" + url: "http://terminology.hl7.org/CodeSystem/v2-0164" + oid: "urn:oid:2.16.840.1.113883.18.82" +- id: "v2-0534" + description: "clergyNotificationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0534" + oid: "urn:oid:2.16.840.1.113883.18.348" +- id: "allergyintolerance-verification" + description: "AllergyIntolerance Verification Status" + url: "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1371" +- id: "noc" + description: "NOC" + url: "http://terminology.hl7.org/CodeSystem/noc" + oid: "urn:oid:2.16.840.1.113883.6.16" +- id: "library-type" + description: "LibraryType" + url: "http://terminology.hl7.org/CodeSystem/library-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1230" +- id: "fundsreserve" + description: "Funds Reservation Codes" + url: "http://terminology.hl7.org/CodeSystem/fundsreserve" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1051" +- id: "v3-IdentifierScope" + description: "IdentifierScope" + url: "http://terminology.hl7.org/CodeSystem/v3-IdentifierScope" + oid: "urn:oid:2.16.840.1.113883.5.1116" +- id: "v2-0871" + description: "supplyRisk" + url: "http://terminology.hl7.org/CodeSystem/v2-0871" + oid: "urn:oid:2.16.840.1.113883.18.410" +- id: "v3-rxNorm" + description: "RxNorm" + url: "http://www.nlm.nih.gov/research/umls/rxnorm" + oid: "urn:oid:2.16.840.1.113883.6.88" +- id: "financialtaskcode" + description: "Financial Task Codes" + url: "http://terminology.hl7.org/CodeSystem/financialtaskcode" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1390" +- id: "v2-0488" + description: "specimenCollectionMethod" + url: "http://terminology.hl7.org/CodeSystem/v2-0488" + oid: "urn:oid:2.16.840.1.113883.18.312" +- id: "iso21000-6-2004E-RDD" + description: "ISO/IEC 21000-6:2004(E) Rights Data Dictionary" + url: "http://terminology.hl7.org/CodeSystem/iso21000-6-2004E-RDD" + oid: "urn:oid:1.0.21000.6" +- id: "v3-cci" + description: "Canadian Classification of Health Interventions" + url: "http://cihi.ca/fhir/CodeSystem/cihi-cci" + oid: "urn:oid:2.16.840.1.113883.6.95" +- id: "certainty-subcomponent-rating" + description: "StatisticCertaintySubcomponentRating" + url: "http://terminology.hl7.org/CodeSystem/certainty-subcomponent-rating" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1362" +- id: "ex-coverage-financial-exception" + description: "Example Coverage Financial Exception Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-coverage-financial-exception" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1329" +- id: "v3-mdc" + description: "ISO 11073-10101 Health informatics - Point-of-care" + url: "urn:iso:std:iso:11073:10101" + oid: "urn:oid:2.16.840.1.113883.6.24" +- id: "v2-0430" + description: "arrivalMode" + url: "http://terminology.hl7.org/CodeSystem/v2-0430" + oid: "urn:oid:2.16.840.1.113883.18.271" +- id: "v3-RouteOfAdministration" + description: "RouteOfAdministration" + url: "http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration" + oid: "urn:oid:2.16.840.1.113883.5.112" +- id: "iso639-1" + description: "ISO 639-1: Codes for the representation of names of languages -- Part 1:\ + \ Alpha-2 code" + url: "http://terminology.hl7.org/CodeSystem/iso639-1" + oid: "urn:oid:1.0.639.1" +- id: "v2-0298" + description: "cpRangeType" + url: "http://terminology.hl7.org/CodeSystem/v2-0298" + oid: "urn:oid:2.16.840.1.113883.18.184" +- id: "v2-0332" + description: "sourceType" + url: "http://terminology.hl7.org/CodeSystem/v2-0332" + oid: "urn:oid:2.16.840.1.113883.18.203" +- id: "v2-0277" + description: "appointmentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0277" + oid: "urn:oid:2.16.840.1.113883.18.170" +- id: "security-source-type" + description: "Audit Event Source Type" + url: "http://terminology.hl7.org/CodeSystem/security-source-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1137" +- id: "v3-ietf3066" + description: "Tags for the Identification of Languages" + url: "urn:ietf:bcp:47" + oid: "urn:oid:2.16.840.1.113883.6.121" +- id: "v2-0918" + description: "pcaType" + url: "http://terminology.hl7.org/CodeSystem/v2-0918" + oid: "urn:oid:2.16.840.1.113883.18.424" +- id: "chargeitem-billingcodes" + description: "ChargeItemCode" + url: "http://terminology.hl7.org/CodeSystem/chargeitem-billingcodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1257" +- id: "DEEDS422" + description: "DEEDS422" + url: "http://terminology.hl7.org/CodeSystem/DEEDS422" + oid: "urn:oid:2.16.840.1.113883.6.102.4.22" +- id: "v2-0365" + description: "equipmentState" + url: "http://terminology.hl7.org/CodeSystem/v2-0365" + oid: "urn:oid:2.16.840.1.113883.18.223" +- id: "v2-0220" + description: "livingArrangement" + url: "http://terminology.hl7.org/CodeSystem/v2-0220" + oid: "urn:oid:2.16.840.1.113883.18.122" +- id: "v2-0559" + description: "product-serviceStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0559" + oid: "urn:oid:2.16.840.1.113883.18.363" +- id: "v2-0109" + description: "reportPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0109" + oid: "urn:oid:2.16.840.1.113883.18.46" +- id: "v3-Confidentiality" + description: "Confidentiality" + url: "http://terminology.hl7.org/CodeSystem/v3-Confidentiality" + oid: "urn:oid:2.16.840.1.113883.5.25" +- id: "referencerange-meaning" + description: "Observation Reference Range Meaning Codes" + url: "http://terminology.hl7.org/CodeSystem/referencerange-meaning" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1124" +- id: "v2-0373" + description: "treatment" + url: "http://terminology.hl7.org/CodeSystem/v2-0373" + oid: "urn:oid:2.16.840.1.113883.18.231" +- id: "mth-icpc2-icd10-AE" + description: "ICPC2-ICD10 Thesaurus, Am Engl" + url: "http://terminology.hl7.org/CodeSystem/mth-icpc2-icd10-AE" + oid: "urn:oid:2.16.840.1.113883.6.142.3" +- id: "NHSNSpinalFusionApproach" + description: "NHSN Spinal Fusion Approach" + url: "http://terminology.hl7.org/CodeSystem/NHSNSpinalFusionApproach" + oid: "urn:oid:2.16.840.1.113883.6.262" +- id: "v2-0236" + description: "eventReportedTo" + url: "http://terminology.hl7.org/CodeSystem/v2-0236" + oid: "urn:oid:2.16.840.1.113883.18.135" +- id: "ex-visionprescriptionproduct" + description: "Example Vision Prescription Product Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-visionprescriptionproduct" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1188" +- id: "need" + description: "Need" + url: "http://terminology.hl7.org/CodeSystem/need" + oid: "urn:oid:2.16.840.1.113883.4.642.1.883" +- id: "naaccrCodes" + description: "NAACCR" + url: "http://terminology.hl7.org/CodeSystem/naaccrCodes" + oid: "urn:oid:2.16.840.1.113883.6.7" +- id: "icpc-BAQ" + description: "International Classification of Primary Care 1993 Basque" + url: "http://terminology.hl7.org/CodeSystem/icpc-BAQ" + oid: "urn:oid:2.16.840.1.113883.6.138.1" +- id: "v2-0324" + description: "locationCharacteristic" + url: "http://terminology.hl7.org/CodeSystem/v2-0324" + oid: "urn:oid:2.16.840.1.113883.18.197" +- id: "v3-TableCellHorizontalAlign" + description: "TableCellHorizontalAlign" + url: "http://terminology.hl7.org/CodeSystem/v3-TableCellHorizontalAlign" + oid: "urn:oid:2.16.840.1.113883.5.131" +- id: "nddf" + description: "National Drug Data File" + url: "http://terminology.hl7.org/CodeSystem/nddf" + oid: "urn:oid:2.16.840.1.113883.6.208" +- id: "iso639-2ret" + description: "ISO 639-2 Alpha-3 Language Codes" + url: "http://terminology.hl7.org/CodeSystem/iso639-2ret" + oid: "urn:oid:2.16.840.1.113883.6.100" +- id: "v3-hl7ITSVersionCode" + description: "HL7 ITS Version Code" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7ITSVersionCode" + oid: "urn:oid:2.16.840.1.113883.5.1092" +- id: "v2-0261" + description: "locationEquipment" + url: "http://terminology.hl7.org/CodeSystem/v2-0261" + oid: "urn:oid:2.16.840.1.113883.18.156" +- id: "v2-0518" + description: "overrideType" + url: "http://terminology.hl7.org/CodeSystem/v2-0518" + oid: "urn:oid:2.16.840.1.113883.18.339" +- id: "v2-0148" + description: "moneyOrPercentageIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0148" + oid: "urn:oid:2.16.840.1.113883.18.69" +- id: "v3-DeviceAlertLevel" + description: "DeviceAlertLevel" + url: "http://terminology.hl7.org/CodeSystem/v3-DeviceAlertLevel" + oid: "urn:oid:2.16.840.1.113883.5.31" +- id: "NHSNLCBIPathways" + description: "NHSN LCBI Pathways" + url: "http://terminology.hl7.org/CodeSystem/NHSNLCBIPathways" + oid: "urn:oid:2.16.840.1.113883.6.267" +- id: "icpc-GER" + description: "International Classification of Primary Care 1993 German" + url: "http://terminology.hl7.org/CodeSystem/icpc-GER" + oid: "urn:oid:2.16.840.1.113883.6.138.6" +- id: "v2-0149" + description: "dayType" + url: "http://terminology.hl7.org/CodeSystem/v2-0149" + oid: "urn:oid:2.16.840.1.113883.18.70" +- id: "v3-QueryQuantityUnit" + description: "QueryQuantityUnit" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryQuantityUnit" + oid: "urn:oid:2.16.840.1.113883.5.1066" +- id: "v2-0325" + description: "locationRelationship" + url: "http://terminology.hl7.org/CodeSystem/v2-0325" + oid: "urn:oid:2.16.840.1.113883.18.198" +- id: "v3-ReligiousAffiliation" + description: "Religious Affiliation" + url: "http://terminology.hl7.org/CodeSystem/v3-ReligiousAffiliation" + oid: "urn:oid:2.16.840.1.113883.5.1076" +- id: "v2-0260" + description: "patientLocationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0260" + oid: "urn:oid:2.16.840.1.113883.18.155" +- id: "ex-tooth" + description: "Oral Site Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-tooth" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1152" +- id: "v3-CalendarType" + description: "CalendarType" + url: "http://terminology.hl7.org/CodeSystem/v3-CalendarType" + oid: "urn:oid:2.16.840.1.113883.5.1017" +- id: "chromosome-human" + description: "chromosome-human" + url: "http://terminology.hl7.org/CodeSystem/chromosome-human" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1086" +- id: "immunization-origin" + description: "Immunization Origin Codes" + url: "http://terminology.hl7.org/CodeSystem/immunization-origin" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1101" +- id: "v2-0372" + description: "specimenComponent" + url: "http://terminology.hl7.org/CodeSystem/v2-0372" + oid: "urn:oid:2.16.840.1.113883.18.230" +- id: "v2-0667" + description: "deviceDataState" + url: "http://terminology.hl7.org/CodeSystem/v2-0667" + oid: "urn:oid:2.16.840.1.113883.18.384" +- id: "iso3166-1edition2" + description: "ISO 3166 Part 1 Country Codes, 2nd Edition" + url: "http://terminology.hl7.org/CodeSystem/iso3166-1edition2" + oid: "urn:oid:1.0.3166.1.2" +- id: "v2-0237" + description: "eventQualification" + url: "http://terminology.hl7.org/CodeSystem/v2-0237" + oid: "urn:oid:2.16.840.1.113883.18.136" +- id: "FDI-surface" + description: "Surface Codes" + url: "http://terminology.hl7.org/CodeSystem/FDI-surface" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1154" +- id: "contracttermsubtypecodes" + description: "Contract Term Subtype Codes" + url: "http://terminology.hl7.org/CodeSystem/contracttermsubtypecodes" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1200" +- id: "handling-condition" + description: "HandlingConditionSet" + url: "http://terminology.hl7.org/CodeSystem/handling-condition" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1259" +- id: "v2-0558" + description: "payeeRelationshipToInvoice" + url: "http://terminology.hl7.org/CodeSystem/v2-0558" + oid: "urn:oid:2.16.840.1.113883.18.362" +- id: "v2-0108" + description: "queryResultsLevel" + url: "http://terminology.hl7.org/CodeSystem/v2-0108" + oid: "urn:oid:2.16.840.1.113883.18.45" +- id: "v3-IntegrityCheckAlgorithm" + description: "IntegrityCheckAlgorithm" + url: "http://terminology.hl7.org/CodeSystem/v3-IntegrityCheckAlgorithm" + oid: "urn:oid:2.16.840.1.113883.5.1010" +- id: "v2-0364" + description: "commentType" + url: "http://terminology.hl7.org/CodeSystem/v2-0364" + oid: "urn:oid:2.16.840.1.113883.18.222" +- id: "v2-0734" + description: "grouperStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0734" + oid: "urn:oid:2.16.840.1.113883.18.393" +- id: "v3-hc-AIC" + description: "Active Ingredient Code" + url: "http://www.canada.ca/en/health-canada/services/drugs-health-products/drug-products/drug-product-database-1" + oid: "urn:oid:2.16.840.1.113883.5.1103" +- id: "copy-number-event" + description: "CopyNumberEvent" + url: "http://terminology.hl7.org/CodeSystem/copy-number-event" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1087" +- id: "ex-diagnosistype" + description: "Example Diagnosis Type Codes" + url: "http://terminology.hl7.org/CodeSystem/ex-diagnosistype" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1167" +- id: "whoSPA" + description: "WHO Adverse Reaction Terms Spanish" + url: "http://terminology.hl7.org/CodeSystem/whoSPA" + oid: "urn:oid:2.16.840.1.113883.6.230.4" +- id: "v2-0919" + description: "exclusiveTest" + url: "http://terminology.hl7.org/CodeSystem/v2-0919" + oid: "urn:oid:2.16.840.1.113883.18.425" +- id: "ICD-9DualCoding" + description: "ICD-9 Dual Coding" + url: "http://terminology.hl7.org/CodeSystem/ICD-9DualCoding" + oid: "urn:oid:2.16.840.1.113883.6.261" +- id: "v3-LanguageAbilityMode" + description: "LanguageAbilityMode" + url: "http://terminology.hl7.org/CodeSystem/v3-LanguageAbilityMode" + oid: "urn:oid:2.16.840.1.113883.5.60" +- id: "MDRDUT" + description: "MedDRA Dutch" + url: "http://terminology.hl7.org/CodeSystem/MDRDUT" + oid: "urn:oid:2.16.840.1.113883.6.163.2" +- id: "nutrition-intake-category" + description: "Nutrition intake category codes" + url: "http://terminology.hl7.org/CodeSystem/nutrition-intake-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1431" +- id: "icpc-HEB" + description: "International Classification of Primary Care 1993 Hebrew" + url: "http://terminology.hl7.org/CodeSystem/icpc-HEB" + oid: "urn:oid:2.16.840.1.113883.6.138.7" +- id: "v2-0763" + description: "drgProcedureRelevance" + url: "http://terminology.hl7.org/CodeSystem/v2-0763" + oid: "urn:oid:2.16.840.1.113883.18.401" +- id: "v2-0299" + description: "encoding" + url: "http://terminology.hl7.org/CodeSystem/v2-0299" + oid: "urn:oid:2.16.840.1.113883.18.185" +- id: "v2-0276" + description: "appointmentReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0276" + oid: "urn:oid:2.16.840.1.113883.18.169" +- id: "financialtaskinputtype" + description: "Financial Task Input Type Codes" + url: "http://terminology.hl7.org/CodeSystem/financialtaskinputtype" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1392" +- id: "goal-relationship-type" + description: "GoalRelationshipType" + url: "http://terminology.hl7.org/CodeSystem/goal-relationship-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1269" +- id: "MDRPOR" + description: "MedDRA Portuguese" + url: "http://terminology.hl7.org/CodeSystem/MDRPOR" + oid: "urn:oid:2.16.840.1.113883.6.163.5" +- id: "v3-HL7CommitteeIDInRIM" + description: "HL7CommitteeIDInRIM" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7CommitteeIDInRIM" + oid: "urn:oid:2.16.840.1.113883.5.54" +- id: "research-subject-milestone" + description: "ResearchSubjectMilestone" + url: "http://terminology.hl7.org/CodeSystem/research-subject-milestone" + oid: "urn:oid:2.16.840.1.113883.4.642.1.0" +- id: "v2-0061" + description: "checkDigitScheme" + url: "http://terminology.hl7.org/CodeSystem/v2-0061" + oid: "urn:oid:2.16.840.1.113883.18.22" +- id: "v2-0431" + description: "recreationalDrugType" + url: "http://terminology.hl7.org/CodeSystem/v2-0431" + oid: "urn:oid:2.16.840.1.113883.18.272" +- id: "v2-0124" + description: "transportationMode" + url: "http://terminology.hl7.org/CodeSystem/v2-0124" + oid: "urn:oid:2.16.840.1.113883.18.52" +- id: "encounter-special-arrangements" + description: "Special arrangements" + url: "http://terminology.hl7.org/CodeSystem/encounter-special-arrangements" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1090" +- id: "v3-EquipmentAlertLevel" + description: "EquipmentAlertLevel" + url: "http://terminology.hl7.org/CodeSystem/v3-EquipmentAlertLevel" + oid: "urn:oid:2.16.840.1.113883.5.49" +- id: "v2-0466" + description: "ambulatoryPaymentClassification" + url: "http://terminology.hl7.org/CodeSystem/v2-0466" + oid: "urn:oid:2.16.840.1.113883.18.296" +- id: "v2-0935" + description: "processInterruptionReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0935" + oid: "urn:oid:2.16.840.1.113883.18.435" +- id: "v2-0523" + description: "computationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0523" + oid: "urn:oid:2.16.840.1.113883.18.341" +- id: "medcin" + description: "MEDCIN" + url: "http://terminology.hl7.org/CodeSystem/medcin" + oid: "urn:oid:2.16.840.1.113883.6.26" +- id: "v2-0173" + description: "coordinationOfBenefits" + url: "http://terminology.hl7.org/CodeSystem/v2-0173" + oid: "urn:oid:2.16.840.1.113883.18.89" +- id: "v2-0489" + description: "risks" + url: "http://terminology.hl7.org/CodeSystem/v2-0489" + oid: "urn:oid:2.16.840.1.113883.18.313" +- id: "v3-HtmlLinkType" + description: "HtmlLinkType" + url: "http://terminology.hl7.org/CodeSystem/v3-HtmlLinkType" + oid: "urn:oid:2.16.840.1.113883.5.58" +- id: "service-category" + description: "Service category" + url: "http://terminology.hl7.org/CodeSystem/service-category" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1144" +- id: "v3-HL7DefinedRoseProperty" + description: "HL7DefinedRoseProperty" + url: "http://terminology.hl7.org/CodeSystem/v3-HL7DefinedRoseProperty" + oid: "urn:oid:2.16.840.1.113883.5.56" +- id: "v2-0923" + description: "processInterruption" + url: "http://terminology.hl7.org/CodeSystem/v2-0923" + oid: "urn:oid:2.16.840.1.113883.18.429" +- id: "v3-hl7V3Conformance" + description: "HL7V3Conformance" + url: "http://terminology.hl7.org/CodeSystem/v3-hl7V3Conformance" + oid: "urn:oid:2.16.840.1.113883.5.1125" +- id: "subscription-error" + description: "Subscription Error Codes" + url: "http://terminology.hl7.org/CodeSystem/subscription-error" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1438" +- id: "v2-0470" + description: "reimbursementType" + url: "http://terminology.hl7.org/CodeSystem/v2-0470" + oid: "urn:oid:2.16.840.1.113883.18.299" +- id: "v2-0165" + description: "administrationMethod" + url: "http://terminology.hl7.org/CodeSystem/v2-0165" + oid: "urn:oid:2.16.840.1.113883.18.83" +- id: "iso3166-1edition2numeric" + description: "ISO 3166 Part 1 Country Codes, 2nd Edition, Numeric" + url: "http://terminology.hl7.org/CodeSystem/iso3166-1edition2numeric" + oid: "urn:oid:1.0.3166.1.2.1" +- id: "v2-0535" + description: "signatureType" + url: "http://terminology.hl7.org/CodeSystem/v2-0535" + oid: "urn:oid:2.16.840.1.113883.18.349" +- id: "v2-0759" + description: "drgstatusAdmission" + url: "http://terminology.hl7.org/CodeSystem/v2-0759" + oid: "urn:oid:2.16.840.1.113883.18.399" +- id: "v2-0078" + description: "HL7-defined code system of concepts which specify a categorical assessment of an observation value." + url: "http://terminology.hl7.org/CodeSystem/v2-0078" + oid: null +- id: "v2-0309" + description: "coverageType" + url: "http://terminology.hl7.org/CodeSystem/v2-0309" + oid: "urn:oid:2.16.840.1.113883.18.188" +- id: "v2-0427" + description: "riskManagementIncident" + url: "http://terminology.hl7.org/CodeSystem/v2-0427" + oid: "urn:oid:2.16.840.1.113883.18.268" +- id: "v2-0562" + description: "processingConsideration" + url: "http://terminology.hl7.org/CodeSystem/v2-0562" + oid: "urn:oid:2.16.840.1.113883.18.365" +- id: "v2-0098" + description: "typeOfAgreement" + url: "http://terminology.hl7.org/CodeSystem/v2-0098" + oid: "urn:oid:2.16.840.1.113883.18.37" +- id: "v3-MessageCondition" + description: "MessageCondition" + url: "http://terminology.hl7.org/CodeSystem/v3-MessageCondition" + oid: "urn:oid:2.16.840.1.113883.5.80" +- id: "payeetype" + description: null + url: "http://terminology.hl7.org/CodeSystem/payeetype" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1050" +- id: "v3-QueryResponse" + description: "QueryResponse" + url: "http://terminology.hl7.org/CodeSystem/v3-QueryResponse" + oid: "urn:oid:2.16.840.1.113883.5.1067" +- id: "v2-0283" + description: "referralStatus" + url: "http://terminology.hl7.org/CodeSystem/v2-0283" + oid: "urn:oid:2.16.840.1.113883.18.176" +- id: "v3-RelationalOperator" + description: "RelationalOperator" + url: "http://terminology.hl7.org/CodeSystem/v3-RelationalOperator" + oid: "urn:oid:2.16.840.1.113883.5.105" +- id: "CDCREC" + description: "RaceAndEthnicityCDC" + url: "http://hl7.org/fhir/us/core/CodeSystem-cdcrec.html" + oid: "urn:oid:2.16.840.1.113883.6.238" +- id: "PHRaceAndEthnicityCDC" + description: "PH_RaceAndEthnicity_CDC" + url: "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC" + oid: "urn:oid:2.16.840.1.113883.6.238" +- id: "v2-0329" + description: "quantityMethod" + url: "http://terminology.hl7.org/CodeSystem/v2-0329" + oid: "urn:oid:2.16.840.1.113883.18.200" +- id: "usEPAsrs" + description: "US EPA Substance Registry System" + url: "http://terminology.hl7.org/CodeSystem/usEPAsrs" + oid: "urn:oid:2.16.840.1.113883.6.275" +- id: "v2-0145" + description: "roomType" + url: "http://terminology.hl7.org/CodeSystem/v2-0145" + oid: "urn:oid:2.16.840.1.113883.18.66" +- id: "v3-RoleLinkStatus" + description: "RoleLinkStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-RoleLinkStatus" + oid: "urn:oid:2.16.840.1.113883.5.1137" +- id: "v2-0450" + description: "eventType" + url: "http://terminology.hl7.org/CodeSystem/v2-0450" + oid: "urn:oid:2.16.840.1.113883.18.286" +- id: "v3-MdfHmdMetSourceType" + description: "MdfHmdMetSourceType" + url: "http://terminology.hl7.org/CodeSystem/v3-MdfHmdMetSourceType" + oid: "urn:oid:2.16.840.1.113883.5.75" + +- id: "v2-0391" + description: "segmentGroup" + url: "http://terminology.hl7.org/CodeSystem/v2-0391" + oid: "urn:oid:2.16.840.1.113883.18.242" +- id: "v3-ObservationMethod" + description: "ObservationMethod" + url: "http://terminology.hl7.org/CodeSystem/v3-ObservationMethod" + oid: "urn:oid:2.16.840.1.113883.5.84" +- id: "v2-0368" + description: "remoteControlCommand" + url: "http://terminology.hl7.org/CodeSystem/v2-0368" + oid: "urn:oid:2.16.840.1.113883.18.226" +- id: "v3-PatientImportance" + description: "PatientImportance" + url: "http://terminology.hl7.org/CodeSystem/v3-PatientImportance" + oid: "urn:oid:2.16.840.1.113883.5.1075" +- id: "v2-0387" + description: "commandResponse" + url: "http://terminology.hl7.org/CodeSystem/v2-0387" + oid: "urn:oid:2.16.840.1.113883.18.238" +- id: "icpc2-icd10-ENG" + description: "ICPC2-ICD10 Thesaurus (English)" + url: "http://terminology.hl7.org/CodeSystem/icpc2-icd10-ENG" + oid: "urn:oid:2.16.840.1.113883.6.142.4" +- id: "insurance-plan-type" + description: "Insurance plan type" + url: "http://terminology.hl7.org/CodeSystem/insurance-plan-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1261" +- id: "ICD-9CM-diagnosiscodes" + description: "National Center for Health Statistics" + url: "http://terminology.hl7.org/CodeSystem/ICD-9CM-diagnosiscodes" + oid: "urn:oid:2.16.840.1.113883.6.103" +- id: "v3-EntityClass" + description: "EntityClass" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityClass" + oid: "urn:oid:2.16.840.1.113883.5.41" +- id: "v2-0104" + description: "versionId" + url: "http://terminology.hl7.org/CodeSystem/v2-0104" + oid: "urn:oid:2.16.840.1.113883.18.41" +- id: "v2-0554" + description: "invoiceReason" + url: "http://terminology.hl7.org/CodeSystem/v2-0554" + oid: "urn:oid:2.16.840.1.113883.18.358" +- id: "v3-EntityNamePartQualifierR2" + description: "EntityNamePartQualifierR2" + url: "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifierR2" + oid: "urn:oid:2.16.840.1.113883.5.1122" +- id: "v2-0942" + description: "equipmentStateIndicator" + url: "http://terminology.hl7.org/CodeSystem/v2-0942" + oid: "urn:oid:2.16.840.1.113883.18.444" +- id: "mddid" + description: "MDDID" + url: "http://terminology.hl7.org/CodeSystem/mddid" + oid: "urn:oid:2.16.840.1.113883.6.253" +- id: "provenance-participant-type" + description: "Provenance participant type" + url: "http://terminology.hl7.org/CodeSystem/provenance-participant-type" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1131" +- id: "v2-0503" + description: "sequenceResultsFlag" + url: "http://terminology.hl7.org/CodeSystem/v2-0503" + oid: "urn:oid:2.16.840.1.113883.18.327" +- id: "v3-DataType" + description: "DataType" + url: "http://terminology.hl7.org/CodeSystem/v3-DataType" + oid: "urn:oid:2.16.840.1.113883.5.1007" +- id: "benefit-term" + description: "Benefit Term Codes" + url: "http://terminology.hl7.org/CodeSystem/benefit-term" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1179" +- id: "whoFRE" + description: "WHO Adverse Reaction Terms French" + url: "http://terminology.hl7.org/CodeSystem/whoFRE" + oid: "urn:oid:2.16.840.1.113883.6.230.1" +- id: "certainty-rating" + description: "StatisticCertaintyRating" + url: "http://terminology.hl7.org/CodeSystem/certainty-rating" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1415" +- id: "icpc2E-ENG" + description: "International Classification of Primary Care, second edition, English" + url: "http://terminology.hl7.org/CodeSystem/icpc2E-ENG" + oid: "urn:oid:2.16.840.1.113883.6.139.1" +- id: "v2-0201" + description: "telecommunicationUse" + url: "http://terminology.hl7.org/CodeSystem/v2-0201" + oid: "urn:oid:2.16.840.1.113883.18.106" +- id: "v2-0651" + description: "laborCalculationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0651" + oid: "urn:oid:2.16.840.1.113883.18.380" +- id: "v3-WorkClassificationODH" + description: "Work Classification (Occupational Data for Health)" + url: "http://terminology.hl7.org/CodeSystem/v3-WorkClassificationODH" + oid: "urn:oid:2.16.840.1.113883.5.1139" +- id: "v2-0344" + description: "patientsRelationshipToInsured" + url: "http://terminology.hl7.org/CodeSystem/v2-0344" + oid: "urn:oid:2.16.840.1.113883.18.210" +- id: "common-tags" + description: "Common Tags" + url: "http://terminology.hl7.org/CodeSystem/common-tags" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1067" +- id: "v3-EncounterAcuity" + description: "Encounter Acuity" + url: "http://terminology.hl7.org/CodeSystem/v3-EncounterAcuity" + oid: "urn:oid:2.16.840.1.113883.5.1084" +- id: "list-empty-reason" + description: "List Empty Reasons" + url: "http://terminology.hl7.org/CodeSystem/list-empty-reason" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1106" +- id: "iso4217" + description: "ISO 4217 Currency Codes" + url: "http://terminology.hl7.org/CodeSystem/iso4217" + oid: "urn:oid:1.0.4217" +- id: "v2-0128" + description: "allergySeverity" + url: "http://terminology.hl7.org/CodeSystem/v2-0128" + oid: "urn:oid:2.16.840.1.113883.18.55" +- id: "v2-0256" + description: "timeDelayPostChallenge" + url: "http://terminology.hl7.org/CodeSystem/v2-0256" + oid: "urn:oid:2.16.840.1.113883.18.151" +- id: "v3-MaritalStatus" + description: "MaritalStatus" + url: "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus" + oid: "urn:oid:2.16.840.1.113883.5.2" +- id: "v2-0939" + description: "communicationLocation" + url: "http://terminology.hl7.org/CodeSystem/v2-0939" + oid: "urn:oid:2.16.840.1.113883.18.442" +- id: "ICD-10DualCoding" + description: "ICD-10 Dual Coding" + url: "http://terminology.hl7.org/CodeSystem/ICD-10DualCoding" + oid: "urn:oid:2.16.840.1.113883.6.260" +- id: "v2-0190" + description: "addressType" + url: "http://terminology.hl7.org/CodeSystem/v2-0190" + oid: "urn:oid:2.16.840.1.113883.18.101" +- id: "v2-0485" + description: "extendedPriorityCodes" + url: "http://terminology.hl7.org/CodeSystem/v2-0485" + oid: "urn:oid:2.16.840.1.113883.18.310" +- id: "pnds" + description: "Perioperative Nursing Data Set" + url: "http://terminology.hl7.org/CodeSystem/pnds" + oid: "urn:oid:2.16.840.1.113883.6.22" +- id: "consentscope" + description: "Consent Scope Codes" + url: "http://terminology.hl7.org/CodeSystem/consentscope" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1228" +- id: "v3-EncounterAdmissionSource" + description: "EncounterAdmissionSource" + url: "http://terminology.hl7.org/CodeSystem/v3-EncounterAdmissionSource" + oid: "urn:oid:2.16.840.1.113883.5.37" +- id: "v2-0240" + description: "eventConsequence" + url: "http://terminology.hl7.org/CodeSystem/v2-0240" + oid: "urn:oid:2.16.840.1.113883.18.139" +- id: "v3-ConceptStatus" + description: "HL7 Coded Concept Status" + url: "http://terminology.hl7.org/CodeSystem/v3-ConceptStatus" + oid: "urn:oid:2.16.840.1.113883.5.1086" +- id: "v2-0305" + description: "personLocationType" + url: "http://terminology.hl7.org/CodeSystem/v2-0305" + oid: "urn:oid:2.16.840.1.113883.18.187" +- id: "v2-0755" + description: "drgstatusWeightAtBirth" + url: "http://terminology.hl7.org/CodeSystem/v2-0755" + oid: "urn:oid:2.16.840.1.113883.18.397" +- id: "processpriority" + description: "Process Priority Codes" + url: "http://terminology.hl7.org/CodeSystem/processpriority" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1155" +- id: "v3-ActUncertainty" + description: "ActUncertainty" + url: "http://terminology.hl7.org/CodeSystem/v3-ActUncertainty" + oid: "urn:oid:2.16.840.1.113883.5.1053" +- id: "v3-DocumentCompletion" + description: "DocumentCompletion" + url: "http://terminology.hl7.org/CodeSystem/v3-DocumentCompletion" + oid: "urn:oid:2.16.840.1.113883.5.33" +- id: "v2-0169" + description: "reportingPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0169" + oid: "urn:oid:2.16.840.1.113883.18.87" +- id: "v2-0493" + description: "specimenCondition" + url: "http://terminology.hl7.org/CodeSystem/v2-0493" + oid: "urn:oid:2.16.840.1.113883.18.317" +- id: "v3-MDFSubjectAreaPrefix" + description: "MDFSubjectAreaPrefix" + url: "http://terminology.hl7.org/CodeSystem/v3-MDFSubjectAreaPrefix" + oid: "urn:oid:2.16.840.1.113883.5.78" +- id: "v2-0217" + description: "visitPriority" + url: "http://terminology.hl7.org/CodeSystem/v2-0217" + oid: "urn:oid:2.16.840.1.113883.18.121" +- id: "oms" + description: "Omaha System" + url: "http://terminology.hl7.org/CodeSystem/oms" + oid: "urn:oid:2.16.840.1.113883.6.98" +- id: "v2-0702" + description: "cycleType" + url: "http://terminology.hl7.org/CodeSystem/v2-0702" + oid: "urn:oid:2.16.840.1.113883.18.387" +- id: "DEEDS415" + description: "DEEDS415" + url: "http://terminology.hl7.org/CodeSystem/DEEDS415" + oid: "urn:oid:2.16.840.1.113883.6.102.4.15" +- id: "supply-kind" + description: "Supply Type" + url: "http://terminology.hl7.org/CodeSystem/supply-kind" + oid: "urn:oid:2.16.840.1.113883.4.642.1.1192" +- id: "SS" + description: "United States Social Security Number" + url: "http://hl7.org/fhir/sid/us-ssn" + oid: "urn:oid:2.16.840.1.113883.4.1" +- id: "MCD" + description: "United States Medicare Number" + url: "http://hl7.org/fhir/sid/us-medicare" + oid: "urn:oid:2.16.840.1.113883.4.572" +- id: "MCR" + description: "United States Medicare Number" + url: "http://hl7.org/fhir/sid/us-medicare" + oid: "urn:oid:2.16.840.1.113883.4.572" + +- id: "MBI" + description: "Medicare Beneficiary Identifier" + url: "http://hl7.org/fhir/sid/us-mbi" + oid: "urn:oid:2.16.840.1.113883.4.927" +- id: "NPI" + description: "United States National Provider Identifier" + url: "http://hl7.org/fhir/sid/us-npi" + oid: "urn:oid:2.16.840.1.113883.4.6" +- id: "AllLanguages" + description: "languages" + url: "http://hl7.org/fhir/ValueSet/all-languages" + oid: "urn:oid:2.16.840.1.113883.4.642.3.21" + + # next two are different id notations for the same table. +- id: "HL70064" + description: "Financial Class (HL7)" + url: "https://phinvads.cdc.gov/vads/ViewCodeSystem.action?id=2.16.840.1.113883.12.64#" + oid: "urn:oid:2.16.840.1.113883.12.64" +- id: "V2-0064" + description: "Financial Class (HL7)" + url: "https://phinvads.cdc.gov/vads/ViewCodeSystem.action?id=2.16.840.1.113883.12.64#" + oid: "urn:oid:2.16.840.1.113883.12.64" + + # source-record-type-system +- id: "source-record-type-system" + url: "http://terminology.hl7.org/CodeSystem/v2-0076" + # source-event-trigger-system +- id: "source-event-trigger-system" + url: "http://terminology.hl7.org/CodeSystem/v2-0003" +- id: "ConditionClinicalStatus" + url: "http://hl7.org/fhir/ValueSet/condition-clinical" + oid: "urn:oid:2.16.840.1.113883.4.642.3.164" +- id: "ConditionVerificationStatus" + url: "http://hl7.org/fhir/ValueSet/condition-ver-status" + oid: "urn:oid:2.16.840.1.113883.4.642.3.166" + + # encounter extensions +- id: "mode-of-arrival-system" + url: "http://terminology.hl7.org/CodeSystem/v2-0430" +- id: "encounter-modeOfArrival-extension" + url: "http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival" +- id: "PatientContactRelationship" + description: "The nature of the relationship between the patient and the contact person." + url: "http://hl7.org/fhir/ValueSet/patient-contactrelationship" + oid: "urn:oid:2.16.840.1.113883.4.642.3.1130" diff --git a/prime-router/metadata/HL7/v251-elr/hl7/codesystem/ExtensionUrlMapping.yml b/prime-router/metadata/HL7/v251-elr/hl7/codesystem/ExtensionUrlMapping.yml new file mode 100644 index 00000000000..df11edf90d1 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/codesystem/ExtensionUrlMapping.yml @@ -0,0 +1,331 @@ +## HL7 Extensions + +- id: "mothersMaidenName" + url: "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName" +- id: "birthPlace" + url: "http://hl7.org/fhir/StructureDefinition/patient-birthPlace" +- id: "birthTime" + url: "http://hl7.org/fhir/StructureDefinition/patient-birthTime" +- id: "religion" + url: "http://hl7.org/fhir/StructureDefinition/patient-religion" +- id: "event-performerFunction" + url: "http://hl7.org/fhir/StructureDefinition/event-performerFunction" +- id: "humanname-own-prefix" + url: "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix" +- id: "humanname-own-name" + url: "http://hl7.org/fhir/StructureDefinition/humanname-own-name" +- id: "humanname-partner-prefix" + url: "http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix" +- id: "humanname-partner-name" + url: "http://hl7.org/fhir/StructureDefinition/humanname-partner-name" +- id: "humanname-assembly-order" + url: "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order" +- id: "patient-congregation" + url: "http://hl7.org/fhir/StructureDefinition/patient-congregation" +- id: "patient-disability" + url: "http://hl7.org/fhir/StructureDefinition/patient-disability" +- id: "data-absent-reason" + url: "http://hl7.org/fhir/StructureDefinition/data-absent-reason" +- id: "contactpoint-country" + url: "http://hl7.org/fhir/StructureDefinition/contactpoint-country" +- id: "contactpoint-area" + url: "http://hl7.org/fhir/StructureDefinition/contactpoint-area" +- id: "contactpoint-local" + url: "http://hl7.org/fhir/StructureDefinition/contactpoint-local" +- id: "contactpoint-extension" + url: "http://hl7.org/fhir/StructureDefinition/contactpoint-extension" +- id: "patient-citizenship" + url: "http://hl7.org/fhir/StructureDefinition/patient-citizenship" +- id: "patient-nationality" + url: "http://hl7.org/fhir/StructureDefinition/patient-nationality" +- id: "iso21090-AD-use" + url: "http://hl7.org/fhir/StructureDefinition/iso21090-AD-use" +- id: "iso21090-ADXP-censusTract" + url: "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract" +- id: "observation-value-attachment" + url: "https://hl7.org/fhir/R5/StructureDefinition/observation-value-attachment" +- id: "identifier-check-digit" + url: "http://hl7.org/fhir/StructureDefinition/identifier-checkDigit" +- id: "naming-system-check-digit" + url: "http://hl7.org/fhir/StructureDefinition/namingsystem-checkDigit" +- id: "patient-animal" + url: "http://hl7.org/fhir/StructureDefinition/patient-animal" +- id: "relationship" + url: "https://hl7.org/fhir/StructureDefinition/relationship" + +## Datatypes + +# XON -> Organization +- id: "name-representation-code" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/name-representation-code" +- id: "identifier-location" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/identifier-location" +- id: "organization-name-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type" +- id: "xon-organization" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization" + +# CX -> Identifier +- id: "assigning-facility" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-facility" +- id: "cx-identifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier" + +# CE/CWE -> Coding +- id: "coding-system-oid" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid" +- id: "cwe-coding" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding" +- id: "cwe-coding-system" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system" +- id: "ce-coding" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/ce-coding" +- id: "ce-coding-system" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/ce-coding-system" +- id: "cne-coding" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cne-coding" +- id: "cne-coding-system" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cne-coding-system" +- id: "code" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/code" + +# XTN -> ContactPoint +- id: "xtn-contact-point" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point" + +# CWE -> Annotation +- id: "cwe-annotation" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-annotation" + +# CNN -> Practitioner +- id: "cnn-practitioner" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cnn-practitioner" + +# XAD -> Address +- id: "xad-address" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address" +- id: "sad-address-line" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line" + +# XCN -> Practitioner +- id: "xcn-practitioner" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xcn-practitioner" + +# XPN -> HumanName +- id: "xpn-human-name" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name" + +# PL -> Location +- id: "pl6-person-location-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pl6-person-location-type" + +# DLD -> Location +- id: "dld2-effective-date" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/dld2-effective-date" + +# CQ -> Quantity +- id: "cq-units" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cq-units" + +# EI -> ExtensionEI +- id: "entity-identifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier" +- id: "placer-assigned-identifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/placer-assigned-identifier" +- id: "filler-assigned-identifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/filler-assigned-identifier" + +# EI -> Identifier +- id: "ei-assigner-organization-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/ei-assigner-organization-type" + +# ID -> CodeableConcept +- id: "codeable-concept-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id" + +# CWE -> Organization +- id: "cwe-organization" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization" + +# ED -> Attachment +- id: "ed-attachment" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/ed-attachment" + +## Segments + +# MSH +- id: "encoding-characters" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters" +- id: "character-set" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set" +- id: "msh-message-header" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header" + +# SFT +- id: "software-binary-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/software-binary-id" +- id: "source-software-description" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/source-software-description" +- id: "software-install-date" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date" +- id: "software-vendor-org" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org" + +# PID -> Patient +- id: "last-updated-facility-namespace-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/last-updated-facility-namespace-id" +- id: "ethnic-group" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group" +- id: "veteran-military-status" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/veteran-military-status" +- id: "identity-unknown" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/identity-unknown" +- id: "pid-patient" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pid-patient" + +# PD1 -> Patient +- id: "pd1-patient-additional-demographic" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pd1-patient-additional-demographic" +- id: "studentStatus" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/studentStatus" +- id: "livingWill" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/livingWill" + +# NTE -> Patient +- id: "patient-notes" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/patient-notes" + +# OBX -> Observation +- id: "sub-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/sub-id" +- id: "observation-sub-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/observation-sub-type" +- id: "obx-5-value-sn" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-5-value-sn" +- id: "nature-of-abnormal-test" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/nature-of-abnormal-test" +- id: "analysis-date-time" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time" +- id: "obx-observation" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation" + +# SPM -> Specimen +- id: "specimen-source-site-modifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/specimen-source-site-modifier" +- id: "spm-specimen" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/spm-specimen" +- id: "reject-reason" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/reject-reason" +- id: "bodySiteModifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/bodySiteModifier" + +# NK1 -> RelatedPerson +- id: "nk1-related-person" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/nk1-related-person" +- id: "nk1-15-administrative-sex" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/nk1-15-administrative-sex" + +# ORC/OBR -> ServiceRequest/DiagnosticReport +- id: "orc-common-order" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/orc-common-order" +- id: "obr-observation-request" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request" +- id: "status-modifier" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/status-modifier" +- id: "callback-number" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number" +- id: "business-event" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/business-event" + +# PV1/PV2 -> Encounter +- id: "admission-level-of-care" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/admission-level-of-care" +- id: "publicity-code" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/publicity-code" +- id: "estimated-length" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/estimated-length" +- id: "planned-discharge-date" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/planned-discharge-date" +- id: "planned-start-date" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/planned-start-date" +- id: "visit-user-code" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/visit-user-code" +- id: "temporary-location" + url: "https://hl7.org/fhir/StructureDefinition/temporary-location" +- id: "episode-of-care-name" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/episode-of-care-name" +- id: "pv1-patient-visit" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pv1-patient-visit" +- id: "pv2-patient-visit-additional-information" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pv2-patient-visit-additional-information" +- id: "pv1-2-patient-class" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pv1-2-patient-class" +- id: "pv2-visit-description" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/pv2-visit-description" + +# NTE -> Annotation +- id: "note-source" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source" +# Comment +- id: "note-comment" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment" +# Comment type +- id: "note-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type" + +## Generic + +# internal indicator of sender, usable for filtering +- id: "sender-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/sender-id" + +# The following extensions are also used to store in the bundle where particular pieces of +# data should be placed in an HL7 message +- id: "hl7v2Segment" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment" +- id: "hl7v2Field" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field" +- id: "hl7v2Component" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component" + +# Date time as hl7v2 string +# This extension exists because HL7 dates have very little restrictions (i.e. YYYY-MM, YYYY-MM-DD HH, YYYY-MM-DD HH:MM) +# are all valid, but the FHIR specs has much stricter rules. In order to reliably generate the same HL7 message, this extension +# is used to capture what was in the original HL7 message and then exclusively used when mapping FHIR->HL7 +- id: "hl7v2-date-time" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time" + +# These extensions are also used to store the unique identifiers +- id: "assigning-authority" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority" +- id: "namespace-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id" +- id: "universal-id" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id" +- id: "universal-id-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type" +# Unknown Universal ID Type +# This extension is used when mapping specifies only populating the universal-id-type extension for certain values +- id: "universal-id-unknown-type" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-unknown-type" +- id: "location-physical-type-poc" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/location-physical-type-poc" + +## Deprecated + +# TODO: #13288 +- id: "hl7-use" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7-use" +- id: "code-index-name" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/code-index-name" + +## Used by simple report + +# NOTE: this URL is not live, but this is is what simple report sends us +# TODO: #{Ticket to work with SR to clean their FHIR bundle} +- id: "race" + url: "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd" + +# SR Extension used to convey the order effective date +- id: "order-effective-date" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/order-effective-date" diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CQ_ELR/Quantity.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CQ_ELR/Quantity.yml new file mode 100644 index 00000000000..b7659fa424c --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CQ_ELR/Quantity.yml @@ -0,0 +1,34 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +value: + type: BIG_DECIMAL + expressionType: HL7Spec + valueOf: CQ.1 + +unit: + expressionType: nested + vars: + cwe_originalText: STRING, CQ.2.9 + expressions: + - condition: $cwe_originalText NULL + type: STRING + expressionType: HL7Spec + valueOf: CQ.2.2 + - condition: $cwe_originalText NOT_NULL + type: STRING + valueOf: $cwe_originalText + +extension: + condition: $cq2 NOT_NULL + generateList: true + expressionType: nested + vars: + cq2: STRING_ALL, CQ.2 + expressionsMap: + url: + type: SYSTEM_URL + value: 'cq-units' + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: CQ.2 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Annotation.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Annotation.yml new file mode 100644 index 00000000000..f8a6292e8b8 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Annotation.yml @@ -0,0 +1,19 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +text: + type: STRING_ALL + valueOf: CWE + generateList: true + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: 'cwe-annotation' + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: CWE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/CodeableConcept.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/CodeableConcept.yml new file mode 100644 index 00000000000..983acda6dde --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/CodeableConcept.yml @@ -0,0 +1,192 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +coding: + generateList: true + expressionType: nested + vars: + code: String, CWE.1 + display: String, CWE.2 + system: SYSTEM_URL, CWE.3 + version: String, CWE.7 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.1 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.2 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.3 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.7 + extension_cwe-coding: + condition: $code NOT_NULL || $display NOT_NULL || $system NOT_NULL || $version NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding + valueString: + value: coding + extension_cwe-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.3 + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding-system + valueString: + value: $coding-system + +coding_alt: + generateList: true + expressionType: nested + vars: + altCode: String, CWE.4 + altDisplay: String, CWE.5 + altSystem: SYSTEM_URL, CWE.6 + altVersion: String, CWE.8 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.4 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.5 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.6 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.8 + extension_cwe-coding: + condition: $altCode NOT_NULL || $altDisplay NOT_NULL || $altSystem NOT_NULL || $altVersion NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding + valueString: + value: alt-coding + extension_cwe-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.6 + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding-system + valueString: + value: $coding-system + +coding_secondary-alt: + generateList: true + expressionType: nested + vars: + secondaryAltCode: String, CWE.10 + secondaryAltDisplay: String, CWE.11 + secondaryAltSystem: SYSTEM_URL, CWE.12 + secondaryAltVersion: String, CWE.13 + expressionsMap: + code: + type: String + expressionType: HL7Spec + valueOf: CWE.10 + display: + type: String + expressionType: HL7Spec + valueOf: CWE.11 + system: + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.12 + version: + type: String + expressionType: HL7Spec + valueOf: CWE.13 + extension_cwe-coding: + condition: $secondaryAltCode NOT_NULL || $secondaryAltDisplay NOT_NULL || $secondaryAltSystem NOT_NULL || $secondaryAltVersion NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding + valueString: + value: secondary-alt-coding + extension_cwe-coding-system: + condition: $coding-system NOT_NULL + generateList: true + expressionType: nested + vars: + coding-system: String, CWE.12 + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-coding-system + valueString: + value: $coding-system + +text: + type: STRING + expressionType: HL7Spec + valueOf: CWE.9 + +extension: + generateList: true + expressionType: nested + expressions: + # codingSystemOID + - generateList: true + expressionType: nested + condition: $codingSystemOID NOT_NULL + vars: + codingSystemOID: String, CWE.14 + expressionsMap: + url: + type: SYSTEM_URL + value: coding-system-oid + valueOid: + type: STRING + valueOf: $oidString + vars: + oidString: $oidUrlPrefix + $codingSystemOID + constants: + oidUrlPrefix: "urn:oid:" + - generateList: true + expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - generateList: true + expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Coding.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Coding.yml new file mode 100644 index 00000000000..ab9a62c75ab --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Coding.yml @@ -0,0 +1,33 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +code: + type: STRING + expressionType: HL7Spec + valueOf: CWE.1 + +display: + type: STRING + expressionType: HL7Spec + valueOf: CWE.2 + +system: + type: STRING + expressionType: HL7Spec + valueOf: CWE.3 + +version: + type: STRING + expressionType: HL7Spec + valueOf: CWE.7 + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: 'cwe-coding' + valueCodeableConcept: + valueOf: ../../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: CWE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Organization.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Organization.yml new file mode 100644 index 00000000000..7c4516f11f7 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Organization.yml @@ -0,0 +1,60 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: CWE.1 + system: + type: STRING + expressionType: HL7Spec + valueOf: CWE.3 + +name: + type: STRING + expressionType: HL7Spec + valueOf: CWE.2 | CWE.9 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: cwe-organization + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: $BASE_VALUE + - generateList: true + expressionType: nested + condition: $cweOrganizationHL7Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $cweOrganizationHL7Field + - generateList: true + expressionType: nested + condition: $cweOrganizationHL7Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $cweOrganizationHL7Component \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Quantity.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Quantity.yml new file mode 100644 index 00000000000..46bfb4911cd --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/CWE_ELR/Quantity.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWE.1 + vars: + identifier: CWE.1 + nameOfCodingSystem: CWE.3 + +unit: + expressionType: nested + vars: + identifier: CWE.1 + text: CWE.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWE.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWE.2 + expressionType: HL7Spec + +system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: SYSTEM_URL + expressionType: HL7Spec + valueOf: CWE.1 + vars: + identifier: CWE.1 + nameOfCodingSystem: CWE.3 + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: 'cwe-quantity' + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: CWE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/Location.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/Location.yml new file mode 100644 index 00000000000..ca9a64c3bb7 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/Location.yml @@ -0,0 +1,292 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + pl10: STRING_ALL, PL.10 + pl11: STRING_ALL, PL.11 + expressions: + - expressionType: nested + generateList: true + condition: $pl3 NOT_NULL + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.3 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.3 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.2 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.2 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + - expressionType: nested + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + - expressionType: resource + condition: $pl11 NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-Organization + specs: PL.10 + - expressionType: resource + vars: + eiAssigningOrganization: PL.11 + condition: $pl11 NOT_NULL && $pl10 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier-DefaultAssigner + specs: PL.10 + +physicalType: + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bd" + system: + valueOf: $system + condition: $pl3 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "ro" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + condition: $pl3 NULL && $pl2 NULL && $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl3 NULL && $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl3: STRING_ALL, PL.3 + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl3 NOT_NuLL || $pl2 NOT_NULL || $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl2 NOT_NULL + valueOf: datatypes/PL_ELR/LocationBranch1 #PL2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NOT_NULL #PL1 + valueOf: datatypes/PL_ELR/LocationBranch2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + valueOf: datatypes/PL_ELR/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + valueOf: datatypes/PL_ELR/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + valueOf: datatypes/PL_ELR/LocationBranch5 + specs: $BASE_VALUE + +status: + expressionType: HL7Spec + valueOf: PL.5 + type: STRING + +mode: + value: "instance" + +description: + type: STRING + expressionType: HL7Spec + valueOf: PL.9 + +extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: pl6-person-location-type + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PL.6 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch1.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch1.yml new file mode 100644 index 00000000000..5f3c963748c --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch1.yml @@ -0,0 +1,182 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl2 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.2 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.2 + - expressionType: nested + condition: $pl2 NULL && $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl2: STRING, PL.2 + pl1: STRING, PL.1 + pl8: STRING, PL.8 + pl7: STRING, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "ro" + system: + valueOf: $system + condition: $pl2 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + system: + type: STRING + valueOf: $system + condition: $pl2 NULL && $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl2 NULL && $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl2: STRING_ALL, PL.2 + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl2 NOT_NULL || $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl1 NOT_NULL #PL1 + valueOf: datatypes/PL_ELR/LocationBranch2 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NOT_NULL #PL8 + valueOf: datatypes/PL_ELR/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL_ELR/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL_ELR/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch2.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch2.yml new file mode 100644 index 00000000000..5910216e119 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch2.yml @@ -0,0 +1,151 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl1 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.1 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.1 + - expressionType: nested + condition: $pl1 NULL && $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + _code: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: location-physical-type-poc + valueString: + value: "poc" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/location-physical-type" + condition: $pl1 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl1 NULL && $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl1: STRING_ALL, PL.1 + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl1 NOT_NULL || $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl8 NOT_NULL #PL8 + valueOf: datatypes/PL_ELR/LocationBranch3 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl8 NULL && $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL_ELR/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL_ELR/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch3.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch3.yml new file mode 100644 index 00000000000..df25fb43437 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch3.yml @@ -0,0 +1,110 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl8 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.8 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.8 + - expressionType: nested + condition: $pl8 NULL && $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "lvl" + system: + valueOf: $system + condition: $pl8 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl8 NULL && $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl8 NULL && $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl8: STRING_ALL, PL.8 + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl8 NOT_NULL || $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl7 NOT_NULL #PL7 + valueOf: datatypes/PL_ELR/LocationBranch4 + specs: $BASE_VALUE + - expressionType: reference + condition: $pl7 NULL && $pl4 NOT_NULL #PL4 + valueOf: datatypes/PL_ELR/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch4.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch4.yml new file mode 100644 index 00000000000..562ca527bc5 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch4.yml @@ -0,0 +1,82 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl7 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.7 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.7 + - expressionType: nested + condition: $pl7 NULL && $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + + +physicalType: + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "bu" + system: + valueOf: $system + condition: $pl7 NOT_NULL + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl7 NULL && $pl4 NOT_NULL + + +partOf: + expressionType: nested + vars: + pl7: STRING_ALL, PL.7 + pl4: STRING_ALL, PL.4 + condition: $pl7 NOT_NULL + expressions: + - expressionType: reference + condition: $pl4 NOT_NULL + valueOf: datatypes/PL_ELR/LocationBranch5 + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch5.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch5.yml new file mode 100644 index 00000000000..28a80563c95 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PL_ELR/LocationBranch5.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Location + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + generateList: true + expressionType: nested + vars: + pl4: STRING_ALL, PL.4 + expressions: + - expressionType: nested + condition: $pl4 NOT_NULL + generateList: true + expressions: + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierNamespaceId + specs: PL.4 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Identifier/IdentifierUniversalId + specs: PL.4 + + +physicalType: + expressionType: nested + vars: + pl4: STRING_ALL, PL.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/location-physical-type" + expressions: + - expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: "si" + system: + valueOf: $system + condition: $pl4 NOT_NULL + diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PRL_ELR/Extension.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PRL_ELR/Extension.yml new file mode 100644 index 00000000000..4161e1ac46e --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/PRL_ELR/Extension.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: STRING + valueOf: $prlExtensionName + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + prl1: STRING_ALL, PRL.1 + condition: $prl1 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: prl-1-parent-observation-identifier + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: PRL.1 + - vars: + prl2: STRING, PRL.2 + condition: $prl2 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: prl-2-parent-observation-sub-identifier + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PRL.2 + - vars: + prl3: STRING, PRL.3 + condition: $prl3 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: prl-3-parent-observation-descriptor + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PRL.3 diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/HumanName.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/HumanName.yml new file mode 100644 index 00000000000..b8ff6390f66 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/HumanName.yml @@ -0,0 +1,102 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: HumanName + +family: + type: STRING + valueOf: XPN.1.1 + expressionType: HL7Spec +_family: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/FN/ExtensionHumanName-family + specs: XPN.1 + +given: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XPN.2 + type: STRING + - expressionType: HL7Spec + valueOf: XPN.3 + type: STRING +suffix: + generateList: true + expressionType: nested + expressions: + - expressionType: HL7Spec + valueOf: XPN.4 + type: STRING + - expressionType: HL7Spec + valueOf: XPN.6 + type: STRING + - expressionType: HL7Spec + valueOf: XPN.14 + type: STRING +prefix: + type: STRING + valueOf: XPN.5 + expressionType: HL7Spec +use: + type: NAME_USE + valueOf: XPN.7 + expressionType: HL7Spec + +extension_AssemblyOrder: + vars: + xpn11: String, XPN.11 + condition: $xpn11 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: humanname-assembly-order + valueCode: + type: STRING + valueOf: XPN.11 + expressionType: HL7Spec + +# XPN.10 is deprecated so the schema favors using XPN.12/13 if either are populated +period_2: + vars: + xpn12: String, XPN.12 + xpn13: String, XPN.13 + condition: $xpn12 NOT_NULL || $xpn13 NOT_NULL + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodStart,ZONEID)" + expressionType: JEXL + vars: + periodStart: XPN.12 + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(periodEnd,ZONEID)" + expressionType: JEXL + vars: + periodEnd: XPN.13 + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + condition: $hl7v2Field NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: $hl7v2Field + - expressionType: nested + condition: $hl7v2Component NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Component + valueString: + type: STRING + valueOf: $hl7v2Component + - expressionType: resource + valueOf: datatypes/XPN_ELR/XPNExtension \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/XPNExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/XPNExtension.yml new file mode 100644 index 00000000000..0ce0896b37c --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/datatypes/XPN_ELR/XPNExtension.yml @@ -0,0 +1,121 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + valueOf: xpn-human-name + +extension: + vars: + xpn2: String, XPN.2 + xpn3: String, XPN.3 + xpn4: String, XPN.4 + xpn6: String, XPN.6 + xpn7: String, XPN.7 + xpn8: String, XPN.8 + xpn9: STRING_ALL, XPN.9 + xpn12: String, XPN.12 + xpn13: String, XPN.13 + xpn14: String, XPN.14 + expressionType: nested + generateList: true + expressions: + - expressionType: nested + condition: $xpn2 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.2 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.2 + - expressionType: nested + condition: $xpn3 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.3 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.3 + - expressionType: nested + condition: $xpn4 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.4 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.4 + - expressionType: nested + condition: $xpn6 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.6 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.6 + - expressionType: nested + condition: $xpn7 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.7 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.7 + - expressionType: nested + condition: $xpn8 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.8 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.8 + - expressionType: nested + condition: $xpn9 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.9 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: XPN.9 + - expressionType: nested + condition: $xpn12 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.12 + valueString: + type: STRING + valueOf: $xpn12 + expressionType: HL7Spec + - expressionType: nested + condition: $xpn13 NOT_NULL + expressionsMap: + url: + type: STRING + value: XPN.13 + valueString: + type: STRING + valueOf: $xpn13 + expressionType: HL7Spec + - expressionType: nested + condition: $xpn14 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: XPN.14 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: XPN.14 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionHierarchicDesignator.yml b/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionHierarchicDesignator.yml new file mode 100644 index 00000000000..d463f931b52 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionHierarchicDesignator.yml @@ -0,0 +1,69 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + condition: $urlValue NOT_NULL + type: SYSTEM_URL + valueOf: $urlValue + +extension_1-namespaceId: + condition: $value NOT_NULL + generateList: true + valueOf: extension/Extension + expressionType: resource + vars: + value: String, HD.1 + constants: + KEY_NAME_SUFFIX: String + urlValue: namespace-id + +extension_2-universalIdISO: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $idStr NOT_NULL && $universalIdType EQUALS ISO + vars: + idStr: String, HD.2 + value: $urlPrefix + HD.2 + universalIdType: String, HD.3 + constants: + urlPrefix: "urn:oid:" + KEY_NAME_SUFFIX: Oid + urlValue: universal-id + +extension_3-universalIdUUID: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $idStr NOT_NULL && $universalIdType EQUALS UUID + vars: + idStr: String, HD.2 + value: $urlPrefix + HD.2 + universalIdType: String, HD.3 + constants: + urlPrefix: "urn:uuid:" + KEY_NAME_SUFFIX: Uuid + urlValue: universal-id + +extension_4-universalIdNullType: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $value NOT_NULL && $universalIdType NULL + vars: + value: String, HD.2 + universalIdType: String, HD.3 + constants: + KEY_NAME_SUFFIX: String + urlValue: universal-id + +extension_5-universalIdUnknownType: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $value NOT_NULL && $universalIdType NOT_EQUALS ISO && $universalIdType NOT_EQUALS UUID + vars: + value: String, HD.2 + universalIdType: String, HD.3 + constants: + KEY_NAME_SUFFIX: String + urlValue: universal-id diff --git a/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionMeta.yml b/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionMeta.yml new file mode 100644 index 00000000000..89f4dff7db3 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/extension/ExtensionMeta.yml @@ -0,0 +1,74 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +security: + condition: $code NOT_NULL + valueOf: datatype/Coding + expressionType: resource + vars: + code: MSH.8 + display: MSH.8 + +tag_1: + condition: $code NOT_NULL + valueOf: datatype/Coding + generateList: true + expressionType: resource + vars: + code: MSH.11.1 + constants: + system: v2-0103 + +tag_2: + condition: $code NOT_NULL + valueOf: datatype/Coding + generateList: true + expressionType: resource + vars: + code: MSH.11.2 + constants: + system: v2-0207 + +extension_1: + generateList: true + valueOf: extension/Extension + expressionType: resource + vars: + value: String, MSH.12.1 + constants: + KEY_NAME_SUFFIX: String + urlValue: source-data-model-version + +# Patient las update facility universal ID +extension_2: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $idStr NOT_NULL && $systemStr EQUALS ISO + vars: + idStr: String, PID.34.2 + value: $oidUrlPrefix + PID.34.2 + systemStr: String, PID.34.3 + constants: + oidUrlPrefix: "urn:oid:" + KEY_NAME_SUFFIX: Oid + urlValue: last-updated-facility-universal-id + +# Patient las update facility namespace +extension_3: + generateList: true + valueOf: extension/Extension + expressionType: resource + condition: $value NOT_NULL + vars: + value: String, PID.34.1 + constants: + KEY_NAME_SUFFIX: String + urlValue: last-updated-facility-namespace-id + +# Patient last updated +lastUpdated: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: PID.33 diff --git a/prime-router/metadata/HL7/v251-elr/hl7/message/ORU_R01.yml b/prime-router/metadata/HL7/v251-elr/hl7/message/ORU_R01.yml new file mode 100644 index 00000000000..cfe8c0da75e --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/message/ORU_R01.yml @@ -0,0 +1,99 @@ +# $schema: ./../../../../json_schema/fhir/hl7-to-fhir-mapping-message-template.json + +resources: + + - resourceName: MessageHeader + segment: MSH + resourcePath: segments/MSH/MessageHeader + repeats: false + isReferenced: true + + - resourceName: Provenance + segment: MSH + resourcePath: segments/MSH/Provenance-Source + + - resourceName: Provenance + segment: MSH + resourcePath: segments/MSH/Provenance-Transformation + + - resourceName: Patient + segment: .PID + group: PATIENT_RESULT.PATIENT + resourcePath: segments/PID/Patient + isReferenced: true + additionalSegments: + - .PD1 + - MSH + - .NTE + - .NK1 + + - resourceName: Provenance + group: PATIENT_RESULT.PATIENT + segment: .PID + resourcePath: segments/PID/Provenance-Patient + + - resourceName: RelatedPerson + segment: .NK1 + group: PATIENT_RESULT.PATIENT + resourcePath: segments/NK1/RelatedPerson + isReferenced: false + repeats: true + + - resourceName: Encounter + segment: .VISIT.PV1 + group: PATIENT_RESULT.PATIENT + resourcePath: segments/PV1/Encounter + isReferenced: true + additionalSegments: + - .PATIENT.VISIT.PV2 + - MSH + + - resourceName: Observation + segment: .ORDER_OBSERVATION.OBSERVATION.OBX + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/OBX/Observation + repeats: true + isReferenced: true + additionalSegments: + - .OBSERVATION.NTE + - .SPECIMEN.SPM + + - resourceName: SpecimenSource + segment: .OBR + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/ORC/Specimen + isReferenced: true + repeats: true + + - resourceName: Specimen + segment: .SPECIMEN.SPM + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/SPM/Specimen + repeats: true + isReferenced: true + + # PATIENT_RESULT.ORDER_OBSERVATION.SPECIMEN.SPECIMEN_OBSERVATION.OBX provides access for v2.7 + # PATIENT_RESULT.ORDER_OBSERVATION.SPECIMEN.OBX provides access for v2.5.1 + - resourceName: SpecimenObservation + segment: .SPECIMEN.SPECIMEN_OBSERVATION.OBX + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/OBX/Observation + repeats: true + + - resourceName: ServiceRequest + segment: .OBR + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/ORC/ServiceRequest + repeats: true + isReferenced: true + additionalSegments: + - .NTE + - .ORC + + - resourceName: DiagnosticReport + segment: .OBR + group: PATIENT_RESULT.ORDER_OBSERVATION + resourcePath: segments/ORC/DiagnosticReport + repeats: true + additionalSegments: + - .ORC diff --git a/prime-router/metadata/HL7/v251-elr/hl7/resource/Common.yml b/prime-router/metadata/HL7/v251-elr/hl7/resource/Common.yml new file mode 100644 index 00000000000..0589b715d7d --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/resource/Common.yml @@ -0,0 +1,4 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +# This file exists to override what is provided in the hl7v2-converter library +# as there are no common elements currently that should get added to every FHIR resource \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MSHExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MSHExtension.yml new file mode 100644 index 00000000000..ac46be1bfe7 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MSHExtension.yml @@ -0,0 +1,119 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: msh-message-header + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + vars: + msh7: MSH.7 + condition: $msh7 NOT_NULL + expressionsMap: + url: + type: STRING + value: MSH.7 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MSH.7 + - expressionType: nested + vars: + msh10: MSH.10 + condition: $msh10 NOT_NULL + expressionsMap: + url: + type: STRING + value: MSH.10 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MSH.10 + - expressionType: nested + vars: + msh13: MSH.13 + condition: $msh13 NOT_NULL + expressionsMap: + url: + type: STRING + value: MSH.13 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MSH.13 + - expressionType: nested + vars: + msh14: MSH.14 + condition: $msh14 NOT_NULL + expressionsMap: + url: + type: STRING + value: MSH.14 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MSH.14 + - condition: $msh15 NOT_NULL + expressionType: nested + vars: + msh15: MSH.15 + expressionsMap: + url: + type: STRING + value: MSH.15 + valueString: + valueOf: MSH.15 + expressionType: HL7Spec + type: STRING + - condition: $msh16 NOT_NULL + expressionType: nested + vars: + msh16: MSH.16 + expressionsMap: + url: + type: STRING + value: MSH.16 + valueString: + type: STRING + valueOf: MSH.16 + expressionType: HL7Spec + - vars: + msh19: STRING_ALL, MSH.19 + condition: $msh19 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: MSH.19 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: MSH.19 + - vars: + msh20: MSH.20 + condition: $msh20 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: MSH.20 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: MSH.20 + - expressionType: nested + vars: + $msh21: STRING_ALL, MSH.21 + condition: $msh21 NOT_NULL + generateList: true + specs: MSH.21 * + expressionsMap: + url: + type: STRING + value: MSH.21 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MessageHeader.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MessageHeader.yml new file mode 100644 index 00000000000..98a4383c669 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/MessageHeader.yml @@ -0,0 +1,116 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: MessageHeader + +id: + type: NAMED_UUID + valueOf: MSH.10 + expressionType: HL7Spec + +eventCoding: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/MSG/Coding + specs: MSH.9 + required: true + +meta: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/PT/Meta + specs: MSH.11 + vars: + metaSecurity: STRING, MSH.8 + +source: + expressionType: nested + vars: + msh3: STRING_ALL, MSH.3 + expressions: + - constants: + messageHeaderSourceField: MSH.3 + condition: $msh3 NOT_NULL + valueOf: segments/MSH/datatypes/HD/Source + expressionType: resource + specs: MSH.3 + +sender: + condition: $msh4 NOT_NULL || $organizationCountry NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + expressionType: reference + generateList: true + specs: MSH.4 + vars: + organizationCountry: MSH.17 + msh4: STRING_ALL, MSH.4 + +destination: + vars: + msh6: MSH.6 + msh5: STRING_ALL, MSH.5 + expressionType: nested + generateList: true + expressions: + - constants: + messageHeaderDestinationField: MSH.5 + condition: $msh5 NOT_NULL + expressionType: resource + valueOf: segments/MSH/datatypes/HD/Destination + specs: MSH.5 + - expressionType: nested + condition: $msh6 NOT_NULL && $msh5 NULL + constants: + hdOrganizationHL7Field: MSH.6 + expressionsMap: + receiver: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + specs: MSH.6 + +language: + vars: + cwe1: MSH.19.1 + expressionType: nested + expressions: + - condition: $cwe1 NOT_NULL + valueOf: MSH.19.1 + type: STRING + expressionType: HL7Spec + - condition: $cwe1 NULL + valueOf: MSH.19.4 + type: STRING + expressionType: HL7Spec + +# MSH.10 is captured in Bundle.Identifier +# MSH.12 is hardcoded to 2.5.1 +extension_messageHeader: + generateList: true + expressionType: nested + expressions: + - condition: $msh2 NOT_NULL && $msh2 EQUALS_STRING ^~\&# + expressionType: nested + vars: + msh2: String, MSH.2 + expressionsMap: + url: + type: SYSTEM_URL + value: encoding-characters + valueString: + type: STRING + valueOf: MSH.2 + expressionType: HL7Spec + - condition: $msh18 NOT_NULL + expressionType: nested + vars: + msh18: STRING_ALL, MSH.18 + specs: MSH.18 * + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: character-set + valueString: + generateList: true + type: STRING + valueOf: $BASE_VALUE + expressionType: HL7Spec + - expressionType: resource + valueOf: segments/MSH/MSHExtension diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Source.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Source.yml new file mode 100644 index 00000000000..5fa2ff64eba --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Source.yml @@ -0,0 +1,78 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Provenance +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +target: + valueOf: datatype/Reference + generateList: true + expressionType: resource + specs: $MessageHeader + +agent: + expressionType: nested + generateList: true + vars: + msh4: STRING_ALL, MSH.4 + expressions: + - condition: $msh4 NOT_NULL + expressionType: nested + expressionsMap: + type: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "author" + system: + type: SYSTEM_URL + valueOf: "http://terminology.hl7.org/CodeSystem/provenance-participant-type" + who: + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + expressionType: reference + specs: MSH.4 + +recorded: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: MSH.7 + +activity: + expressionType: nested + constants: + caret: "^" + vars: + msg1: String, MSH.9.1 + msg2: String, MSH.9.2 + msg3: String, MSH.9.3 + expressionsMap: + coding: + expressionType: nested + vars: + displayValue: $msg1 + $caret + $msg2 + $caret + $msg3 + expressionsMap: + display: + type: STRING + valueOf: $displayValue + +entity: + condition: $sft NOT_NULL + vars: + sft: SFT + expressionType: nested + expressionsMap: + what: + expressionType: reference + valueOf: segments/SFT/Device + specs: SFT + role: + type: STRING + value: "source" diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Transformation.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Transformation.yml new file mode 100644 index 00000000000..7bc6d2a3f7b --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/Provenance-Transformation.yml @@ -0,0 +1,46 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Provenance +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +activity: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "v2-FHIR transformation" + +recorded: + type: STRING + valueOf: "GeneralUtils.getCurrentDateTimeUsingZoneId(ZONEID)" + expressionType: JEXL + +policy: + type: SYSTEM_URL + valueOf: "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" + +agent: + expressionType: nested + generateList: true + expressionsMap: + type: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "assembler" + system: + type: SYSTEM_URL + valueOf: "http://terminology.hl7.org/CodeSystem/provenance-participant-type" + who: + valueOf: segments/MSH/ReportStreamOrganization + expressionType: reference diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/ReportStreamOrganization.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/ReportStreamOrganization.yml new file mode 100644 index 00000000000..792dc695f38 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/ReportStreamOrganization.yml @@ -0,0 +1,32 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Organization + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier_1: + expressionType: nested + generateList: true + expressionsMap: + value_1: + type: STRING + valueOf: "CDC PRIME - Atlanta" + +identifier_2: + expressionType: nested + generateList: true + expressionsMap: + value: + type: STRING + valueOf: "2.16.840.1.114222.4.1.237821" + type: + valueOf: ../../datatypes/v251/hl7/datatypes/ID/CodeableConceptUniversalid + generateList: true + expressionType: resource + specs: "ISO" + system: + type: STRING + valueOf: "urn:ietf:rfc:3986" diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Destination.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Destination.yml new file mode 100644 index 00000000000..94dc8e4e998 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Destination.yml @@ -0,0 +1,85 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +name: + type: STRING + expressionType: HL7Spec + valueOf: HD.1 + +endpoint: + vars: + hd2: STRING, HD.2 + hd3: STRING, HD.3 + constants: + oidUrlPrefix: "urn:oid:" + uuidUrlPrefix: "urn:uuid:" + expressionType: nested + expressions: + - condition: $hd2 NOT_NULL && $hd3 EQUALS ISO + vars: + endpointValue: $oidUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + - condition: $hd2 NOT_NULL && $hd3 EQUALS UUID + vars: + endpointValue: $uuidUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + +_endpoint: + vars: + hd3: STRING, HD.3 + expressionType: nested + condition: $hd3 NULL + expressionsMap: + extension: + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: data-absent-reason + valueCode: + value: "unknown" + +receiver: + vars: + msh6: MSH.6 + expressionType: nested + expressions: + - condition: $msh6 NOT_NULL + expressionType: reference + specs: $msh6 + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + constants: + hdOrganizationHL7Field: MSH.6 + + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + type: STRING + valueOf: HD.2 + expressionType: HL7Spec + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + type: STRING + valueOf: HD.3 + expressionType: HL7Spec + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: $messageHeaderDestinationField \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Source.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Source.yml new file mode 100644 index 00000000000..69b36aff412 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/datatypes/HD/Source.yml @@ -0,0 +1,139 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +# Only populate name if HD.2 is not populated or it is populated and +# HD.3 is not ISO, UUID, DNS, URI +name: + vars: + hd1: STRING, HD.1 + hd2: STRING, HD.2 + hd3: STRING, HD.3 + constants: + dash: "-" + colon: ":" + expressionType: nested + expressions: + - condition: $hd2 NULL + type: STRING + valueOf: HD.1 + expressionType: HL7Spec + - condition: $hd2 NOT_NULL + expressionType: nested + vars: + nameValue: $hd1 + $dash + $hd3 + $colon + $hd2 + expressions: + - condition: $hd3 NOT_EQUALS ISO && $hd3 NOT_EQUALS UUID && $hd3 NOT_EQUALS DNS && $hd3 NOT_EQUALS URI + type: STRING + value: $nameValue + +endpoint: + vars: + hd2: STRING, HD.2 + hd3: STRING, HD.3 + constants: + oidUrlPrefix: "urn:oid:" + uuidUrlPrefix: "urn:uuid:" + dnsUrlPrefix: "urn:dns:" + uriUrlPrefix: "urn:uri:" + expressionType: nested + expressions: + - condition: $hd2 NOT_NULL && $hd3 EQUALS ISO + vars: + endpointValue: $oidUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + - condition: $hd2 NOT_NULL && $hd3 EQUALS UUID + vars: + endpointValue: $uuidUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + - condition: $hd2 NOT_NULL && $hd3 EQUALS DNS + vars: + endpointValue: $dnsUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + - condition: $hd2 NOT_NULL && $hd3 EQUALS URI + vars: + endpointValue: $uriUrlPrefix + $hd2 + type: STRING + valueOf: $endpointValue + +_endpoint: + vars: + hd3: STRING, HD.3 + expressionType: nested + expressions: + - expressionType: nested + condition: $hd3 NULL + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: data-absent-reason + valueCode: + value: "unknown" + - expressionType: nested + condition: $hd3 NOT_EQUALS ISO && $hd3 NOT_EQUALS UUID && $hd3 NOT_EQUALS DNS && $hd3 NOT_EQUALS URI + expressionsMap: + extension: + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: data-absent-reason + valueCode: + value: "unknown" + + +software: + expressionType: HL7Spec + type: STRING + valueOf: SFT.3 + +version: + expressionType: HL7Spec + type: STRING + valueOf: SFT.2 + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: namespace-id + valueString: + type: STRING + valueOf: HD.1 + expressionType: HL7Spec + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id + valueString: + type: STRING + valueOf: HD.2 + expressionType: HL7Spec + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: universal-id-type + valueString: + type: STRING + valueOf: HD.3 + expressionType: HL7Spec + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + valueOf: $messageHeaderSourceField + type: STRING diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/segments/SFT/Source.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/segments/SFT/Source.yml new file mode 100644 index 00000000000..15d0404410d --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/MSH/segments/SFT/Source.yml @@ -0,0 +1,77 @@ +# $schema: ./../../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +_endpoint: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: data-absent-reason + valueCode: + value: "unknown" + +software: + expressionType: HL7Spec + type: STRING + valueOf: SFT.3 + +version: + expressionType: HL7Spec + type: STRING + valueOf: SFT.2 + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + vars: + sft4: STRING, SFT.4 + condition: $sft4 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: software-binary-id + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SFT.4 + - vars: + sft5: STRING, SFT.5 + condition: $sft5 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: source-software-description + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SFT.5 + - expressionType: nested + vars: + sft6: STRING, SFT.6 + condition: $sft6 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: software-install-date + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SFT.6 + - expressionType: nested + vars: + sft1: STRING_ALL, SFT.1 + condition: $sft1 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: software-vendor-org + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference + specs: SFT.1 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/NK1Extension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/NK1Extension.yml new file mode 100644 index 00000000000..171d63a8b49 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/NK1Extension.yml @@ -0,0 +1,21 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: nk1-related-person + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + generateList: true + condition: $nk1-13 NOT_NULL + specs: NK1.13 * + expressionsMap: + url: + type: STRING + value: NK1.13 + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/RelatedPerson.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/RelatedPerson.yml new file mode 100644 index 00000000000..8fdfaaaf634 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/NK1/RelatedPerson.yml @@ -0,0 +1,155 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: RelatedPerson + +# Not implementing NK1.6: not in mapping, not in NIST +# Not implementing NK1.7: not in mapping, not in NIST +# Not implementing NK1.8: not in mapping, not in NIST +# Not implementing NK1.9: not in mapping, not in NIST +# Not implementing NK1.10: not in mapping, not in NIST +# Not implementing NK1.11: not in mapping, not in NIST +# Not implementing NK1.12: not in mapping, not in NIST +# Not implementing NK1.14: not in mapping, not in NIST +# Not implementing NK1.15: not in mapping, not in NIST +# Not implementing NK1.16: not in mapping, not in NIST +# Not implementing NK1.17: not in mapping, not in NIST +# Not implementing NK1.18: not in mapping, not in NIST +# Not implementing NK1.19: not in mapping, not in NIST +# Not implementing NK1.21: not in mapping, not in NIST +# Not implementing NK1.22: not in mapping, not in NIST +# Not implementing NK1.23: not in mapping, not in NIST +# Not implementing NK1.24: not in mapping, not in NIST +# Not implementing NK1.25: not in mapping, not in NIST +# Not implementing NK1.26: not in mapping, not in NIST +# Not implementing NK1.27: not in mapping, not in NIST +# Not implementing NK1.28: not in mapping, not in NIST +# Not implementing NK1.29: not in mapping, not in NIST +# Not implementing NK1.33: not in mapping, not in NIST +# Not implementing NK1.34: not in mapping, not in NIST +# Not implementing NK1.35: not in mapping, not in NIST +# Not implementing NK1.36: not in mapping, not in NIST +# Not implementing NK1.37: not in mapping, not in NIST +# Not implementing NK1.38: not in mapping, not in NIST +# Not implementing NK1.39: not in mapping, not in NIST +# Not implementing NK1.40: not in mapping, not in NIST +# Not implementing NK1.41: not in mapping, not in NIST + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +patient: + valueOf: datatype/Reference + expressionType: resource + specs: $Patient + useGroup: true + +name: + expressionType: nested + generateList: true + expressions: + - valueOf: datatypes/XPN_ELR/HumanName + expressionType: resource + condition: $nk1-2 NOT_NULL + generateList: true + vars: + nk1-2: NK1.2 + specs: NK1.2 * + constants: + hl7v2Field: "NK1.2" + - valueOf: datatypes/XPN_ELR/HumanName + expressionType: resource + condition: $nk1-30 NOT_NULL + generateList: true + vars: + nk1-30: NK1.30 + specs: NK1.30 * + constants: + hl7v2Field: "NK1.30" + +relationship: + expressionType: nested + generateList: true + expressions: + - valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + condition: $nk1-3 NOT_NULL + vars: + nk1-3: NK1.3 + specs: NK1.3 + constants: + hl7v2Field: "NK1.3" + +address: + expressionType: nested + generateList: true + expressions: + - valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + generateList: true + expressionType: resource + condition: $nk1-4 NOT_NULL + vars: + nk1-4: NK1.4 + specs: NK1.4 * + constants: + hl7v2Field: "NK1.4" + - valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + generateList: true + expressionType: resource + condition: $nk1-32 NOT_NULL + vars: + nk1-32: NK1.32 + specs: NK1.32 * + constants: + hl7v2Field: "NK1.32" + +telecom: + expressionType: nested + generateList: true + expressions: + - condition: $valueIn NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: NK1.5 * + vars: + valueIn: NK1.5 + constants: + hl7v2Field: "NK1.5" + - condition: $valueIn NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: NK1.31 * + vars: + valueIn: NK1.31 + constants: + hl7v2Field: "NK1.31" + +communication: + expressionType: nested + vars: + nk1-20: STRING_ALL, NK1.20 + condition: $nk1-20 NOT_NULL + expressionsMap: + language: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: NK1.20 + +extension: + expressionType: nested + generateList: true + vars: + nk1-13: STRING_ALL, NK1.13 + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: hl7v2Segment + valueString: + valueOf: 'NK1' + - expressionType: resource + valueOf: segments/NK1/NK1Extension \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/NTE/Annotation.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/NTE/Annotation.yml new file mode 100644 index 00000000000..9ba009349ce --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/NTE/Annotation.yml @@ -0,0 +1,44 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +text: + type: STRING + valueOf: NTE.3 + required: true + expressionType: HL7Spec + +extension_1-noteSource: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: note-source + valueId: + valueOf: NTE.2 + expressionType: HL7Spec + type: STRING + +extension_2-noteComment: + generateList: true + expressionType: nested + specs: NTE.3 * + expressionsMap: + url: + type: SYSTEM_URL + value: note-comment + valueId: + valueOf: FT + expressionType: HL7Spec + type: STRING + +extension_3-noteType: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: note-type + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: NTE.4 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Device.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Device.yml new file mode 100644 index 00000000000..64cb809a99d --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Device.yml @@ -0,0 +1,13 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Device + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: $BASE_VALUE \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/OBXExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/OBXExtension.yml new file mode 100644 index 00000000000..527a0cabbdb --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/OBXExtension.yml @@ -0,0 +1,115 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: obx-observation + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + obx2: STRING_ALL, OBX.2 + condition: $obx2 NOT_NULL + expressionsMap: + url: + value: OBX.2 + type: STRING + valueId: + type: STRING + expressionType: HL7Spec + valueOf: OBX.2 + - expressionType: nested + vars: + obx6: STRING_ALL, OBX.6 + condition: $obx6 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBX.6 + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + specs: OBX.6 + expressionType: resource + - expressionType: nested + vars: + obx9: STRING_ALL, OBX.9 + condition: $obx9 NOT_NULL + expressionsMap: + url: + value: OBX.9 + type: STRING + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBX.9 + - expressionType: nested + vars: + obx11: STRING_ALL, OBX.11 + condition: $obx11 NOT_NULL + expressionsMap: + url: + value: OBX.11 + type: STRING + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBX.11 + - expressionType: nested + vars: + obx12: STRING_ALL, OBX.12 + condition: $obx12 NOT_NULL + expressionsMap: + url: + value: OBX.12 + type: STRING + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBX.12 + - expressionType: nested + vars: + obx13: STRING_ALL, OBX.13 + condition: $obx13 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBX.13 + valueString: + type: STRING + expressionType: HL7Spec + specs: OBX.13 + - expressionType: nested + vars: + obx17: STRING_ALL, OBX.17 + condition: $obx17 NOT_NULL + generateList: true + specs: OBX.17 * + expressionsMap: + url: + type: STRING + value: OBX.17 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + - expressionType: nested + vars: + obx18: STRING_ALL, OBX.18 + condition: $obx18 NOT_NULL + generateList: true + specs: OBX.18 * + expressionsMap: + url: + type: STRING + value: OBX.18 + valueReference: + valueOf: segments/OBX/Device + expressionType: reference + + + + + + + diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Observation.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Observation.yml new file mode 100644 index 00000000000..76055d029f3 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/Observation.yml @@ -0,0 +1,503 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Observation + +# Not implementing OBX.5 when OBX.2 is RP as the inventory say it still needs to be resolved +# Not implementing OBX.5 when OBX.2 is CF, the type does not exist in NIST and the mapping is wrong in the inventory +# Not implementing OBX.5 when OBX.2 is NA (Numeric Array), the inventory does not specify how that should map to SampledData +# OBX.17 is repeatable but maps to method on Observation which is not, so it's all captured in OBXExtension +# OBX.18 is repeatable but maps to device on Observation which is not, so it's all captured in OBXExtension +# Not implementing OBX.20 not in mapping deprecated in NIST +# Not implementing OBX.21 not in mapping deprecated in NIST +# Not implementing OBX.22 not in mapping deprecated in NIST +# Not implementing OBX.26 not in mapping not in NIST +# Not implementing OBX.27 not in mapping not in NIST +# Not implementing OBX.28 not in mapping not in NIST +# Not implementing OBX.29 not in mapping not in NIST +# Not implementing OBX.30 not in mapping not in NIST +# Not implementing OBX.31 not in mapping not in NIST +# Not implementing OBX.32 not in mapping not in NIST +# Not implementing OBX.33 as it's not in the NIST spec the logic in the inventory cannot be implemented in the library + + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +code: + vars: + obx3: STRING, OBX.3 + condition: $obx3 NOT_NULL + expressionType: resource + valueOf: datatypes/CWE_ELR/CodeableConcept + specs: OBX.3 + +valueString_obx: + vars: + obx2: STRING, OBX.2 + expressionType: nested + expressions: + - condition: $obx2 EQUALS ST || $obx2 EQUALS FT || $obx2 EQUALS TX + type: STRING_ALL + valueOf: OBX.5 + expressionType: HL7Spec + - condition: $obx2 EQUALS VR + vars: + vrValue: OBX.5.1 + $dash + OBX.5.2 + constants: + dash: "-" + type: STRING + valueOf: $vrValue + - condition: $obx2 EQUALS SN && $obx53 EQUALS + + vars: + obx53: STRING, OBX.5.3 + value: OBX.5.1 + $plus + OBX.5.2 + $plus + OBX.5.3 + $plus + OBX.5.4 + constants: + plus: "+" + type: STRING + valueOf: $value + +valueCodeableConcept: + expressionType: nested + vars: + obx2: STRING, OBX.2 + expressions: + - condition: $obx2 EQUALS CNE + valueOf: ../../datatypes/v251/hl7/datatypes/CNE/CodeableConcept + specs: OBX.5 + expressionType: resource + - condition: $obx2 EQUALS CWE + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: OBX.5 + expressionType: resource + - condition: $obx2 EQUALS CE + valueOf: ../../datatypes/v251/hl7/datatypes/CE/CodeableConcept + specs: OBX.5 + expressionType: resource + - condition: $obx2 EQUALS IS + expressionType: nested + expressionsMap: + coding: + expressionType: nested + generateList: true + expressionsMap: + code: + type: STRING + expressionType: HL7Spec + valueOf: OBX.5 + +valuePeriod: + condition: $obx2 EQUALS DR + valueOf: ../../datatypes/v251/hl7/datatypes/DR/Period + expressionType: resource + specs: OBX.5 + vars: + obx2: STRING, OBX.2 + start: OBX.5.1 + end: OBX.5.2 + dateTimeIn: OBX.5.1 + dateTimeOut: OBX.5.2 + +valueDateTime: + condition: $obx2 EQUALS DT || $obx2 EQUALS DTM + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: OBX.5 + obx2: STRING, OBX.2 +_valueDateTime: + expressionType: nested + condition: $obx2 EQUALS DT || $obx2 EQUALS DTM + vars: + obx5: OBX.5 + obx2: STRING, OBX.2 + expressionsMap: + extension: + condition: $obx5 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: OBX.5 + expressionType: HL7Spec + +valueTime: + condition: $obx2 EQUALS TM + type: STRING + valueOf: OBX.5 + expressionType: HL7Spec + vars: + obx2: STRING, OBX.2 + +_valueTime: + expressionType: nested + condition: $obx2 EQUALS TM + vars: + obx5: OBX.5 + obx2: STRING, OBX.2 + expressionsMap: + extension: + condition: $obx5 NOT_NULL + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: OBX.5 + expressionType: HL7Spec + +valueRange: + vars: + obx2: STRING, OBX.2 + CWERangeUnits: OBX.6 + obx53: STRING, OBX.5.3 + expressionType: nested + specs: OBX.5 + expressions: + - condition: $obx2 EQUALS NR + valueOf: ../../datatypes/v251/hl7/datatypes/NR/Range + expressionType: resource + - condition: $obx2 EQUALS SN && $obx53 EQUALS - + valueOf: ../../datatypes/v251/hl7/datatypes/SN/Range + expressionType: resource + + +valueRatio: + vars: + obx2: STRING, OBX.2 + obx53: STRING, OBX.5.3 + CWERangeUnits: OBX.6 + condition: $obx2 EQUALS SN && ($obx53 EQUALS / || $obx53 EQUALS :) + valueOf: ../../datatypes/v251/hl7/datatypes/SN/Ratio + expressionType: resource + specs: OBX.5 + +valueQuantity: + vars: + obx2: STRING, OBX.2 + CWEQuantityUnits: OBX.6 + obx53: STRING, OBX.5.3 + expressionType: nested + expressions: + - condition: $obx2 EQUALS NM + expressionType: nested + expressionsMap: + value: + type: STRING + expressionType: HL7Spec + valueOf: OBX.5 + code: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWEQuantityUnits.1 + vars: + identifier: CWEQuantityUnits.1 + nameOfCodingSystem: CWEQuantityUnits.3 + unit: + expressionType: nested + vars: + identifier: CWEQuantityUnits.1 + text: CWEQuantityUnits.2 + expressions: + - condition: $text NULL && $identifier NOT_NULL + type: STRING + valueOf: CWEQuantityUnits.1 + expressionType: HL7Spec + - condition: $text NOT_NULL + type: STRING + valueOf: CWEQuantityUnits.2 + expressionType: HL7Spec + system: + condition: $identifier NOT_NULL && $nameOfCodingSystem NOT_NULL + type: STRING + expressionType: HL7Spec + valueOf: CWEQuantityUnits.3 + vars: + identifier: CWEQuantityUnits.1 + nameOfCodingSystem: CWEQuantityUnits.3 + - condition: > + $obx2 EQUALS SN && $obx53 NOT_EQUALS : && $obx53 NOT_EQUALS / && $obx53 NOT_EQUALS - && $obx53 NOT_EQUALS + + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/SN/Quantity + specs: OBX.5 + +referenceRange: + vars: + obx7: STRING_ALL, OBX.7 + condition: $obx7 NOT_NULL + expressionType: nested + generateList: true + expressionsMap: + text: + expressionType: HL7Spec + type: STRING + valueOf: OBX.7 + +interpretation: + vars: + obx8: STRING_ALL, OBX.8 + condition: $obx8 NOT_NULL + generateList: true + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: OBX.8 * + +status: + type: OBSERVATION_STATUS + default: unknown + valueOf: OBX.11 + expressionType: HL7Spec + +dataAbsentReason: + vars: + obx2: STRING, OBX.2 + obx5: STRING, OBX.5 + obx11: STRING, OBX.11 + constants: + system: http://terminology.hl7.org/CodeSystem/data-absent-reason + expressionType: nested + expressions: + - condition: $obx11 EQUALS X + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: cannot-be-obtained + system: + valueOf: $system + - condition: $obx11 EQUALS_STRING N + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: not-asked + system: + valueOf: $system + - condition: $obx2 EQUALS ST && ($obx5 EQUALS_STRING $emptyString || $obx5 NULL) + expressionType: nested + constants: + emptyString: "" + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + valueOf: unknown + system: + valueOf: $system + +effectiveDateTime: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: OBX.14 +_effectiveDateTime: + expressionType: nested + condition: $obx14 NOT_NULL + vars: + obx14: OBX.14 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: OBX.14 + expressionType: HL7Spec + +method: + vars: + obx17: STRING_ALL, OBX.17 + condition: $obx17 NOT_NuLL + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: OBX.17 + +device: + vars: + obx18: STRING_ALL, OBX.18 + condition: $obx18 NOT_NULL + valueOf: segments/OBX/Device + expressionType: reference + specs: OBX.18 + +performer: + generateList: true + expressionType: nested + expressions: + - expressionType: reference + vars: + obx15: STRING_ALL, OBX.15 + condition: $obx15 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/Organization + constants: + cweOrganizationHL7Field: OBX.15 + specs: OBX.15 + - expressionType: reference + generateList: true + specs: OBX.16 * + valueOf: segments/OBX/PractitionerRole + vars: + OBXPractitionerComponent: $BASE_VALUE + obx16: STRING_ALL, OBX.16 + condition: $obx16 NOT_NULL + constants: + OBXPractitionerRoleSystem: "http://terminology.hl7.org/CodeSystem/practitioner-role" + OBXPractitionerRoleCode: "responsibleObserver" + - expressionType: reference + vars: + obx25: STRING_ALL, OBX.25 + OBXPractitionerComponent: OBX.25 + OBXPractitionerRoleOrganization: OBX.23 + OBXPractitionerRoleOrganizationAddress: OBX.24 + condition: $obx25 NOT_NULL + valueOf: segments/OBX/PractitionerRole + constants: + OBXPractitionerRoleSystem: "http://terminology.hl7.org/CodeSystem/v2-0912" + OBXPractitionerRoleCode: "MDIR" + - expressionType: reference + vars: + obx25: STRING_ALL, OBX.25 + obx23: STRING_ALL, obx23 + XADAddress: OBX.24 + condition: $obx25 NULL && ($obx23 NOT_NULL || $XADAddress NOT_NULL) + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + specs: OBX.23 + constants: + XONHL7Field: OBX.25 + +extension: + generateList: true + expressionType: nested + vars: + obx2: STRING, OBX.2 + expressions: + - expressionType: nested + vars: + obx4: STRING,OBX.4 + condition: $obx4 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: sub-id + valueString: + expressionType: HL7Spec + type: STRING + valueOf: OBX.4 + - expressionType: nested + vars: + obx10: STRING_ALL, OBX.10 + condition: $obx10 NOT_NULL + generateList: true + specs: OBX.10 * + expressionsMap: + url: + type: SYSTEM_URL + value: nature-of-abnormal-test + valueId: + valueOf: $BASE_VALUE + expressionType: HL7Spec + type: STRING + - expressionType: nested + vars: + obx19: STRING, OBX.19 + condition: $obx19 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: analysis-date-time + valueDateTime: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: OBX.19 + _valueDateTime: + expressionType: nested + condition: $obx19 NOT_NULL + vars: + obx19: OBX.19 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $obx19 + expressionType: HL7Spec + - expressionType: nested + vars: + obx54: STRING, OBX.5.4 + condition: $obx2 EQUALS ED && $obx54 EQUALS Base64 + expressionsMap: + url: + type: SYSTEM_URL + value: observation-value-attachment + valueAttachment: + valueOf: ../../datatypes/v251/hl7/datatypes/ED/Attachment + expressionType: resource + specs: OBX.5 + - expressionType: resource + condition: $obx2 EQUALS SN + valueOf: ../../datatypes/v251/hl7/datatypes/SN/ExtensionSN + specs: OBX.5 + - expressionType: resource + valueOf: segments/OBX/OBXExtension + + +subject: + valueOf: datatype/Reference + expressionType: resource + specs: $Patient + +encounter: + valueOf: datatype/Reference + expressionType: resource + specs: $Encounter + +# $suppressNote is a constant that can be passed in so that a note is not generated +# This was required when we translate the SPECIMEN.OBX segment so that the created observation +# does not include notes from the OBSERVATION GROUP +# ORDER_OBSERVATION +# NTE -> Should not be included as part of the Observation created from the OBX +# SPECIMEN +# OBX +# See use here: https://github.com/CDCgov/prime-reportstream/blob/813fe6d15e780af3ea88eb61ddfbdf2a8f4462a9/prime-router/metadata/fhir_mapping/hl7/resource/ServiceRequest.yml#L380 +note_observation: + valueOf: segments/NTE/Annotation + condition: $suppressNote NULL + expressionType: resource + generateList: true + specs: NTE + +focus: + valueOf: datatype/Reference + expressionType: resource + specs: $Specimen + useGroup: true diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/PractitionerRole.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/PractitionerRole.yml new file mode 100644 index 00000000000..5f31cbc9315 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/OBX/PractitionerRole.yml @@ -0,0 +1,36 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: PractitionerRole + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +practitioner: + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + expressionType: reference + specs: $OBXPractitionerComponent + +organization: + condition: $roleOrg NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference + specs: $OBXPractitionerRoleOrganization + vars: + XADAddress: $OBXPractitionerRoleOrganizationAddress + roleOrg: STRING_ALL, $OBXPractitionerRoleOrganization + +code: + expressionType: nested + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + system: + type: STRING + valueOf: $OBXPractitionerRoleSystem + code: + type: STRING + valueOf: $OBXPractitionerRoleCode \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/DiagnosticReport.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/DiagnosticReport.yml new file mode 100644 index 00000000000..9367c7d981b --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/DiagnosticReport.yml @@ -0,0 +1,264 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: DiagnosticReport + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + expressionType: nested + generateList: true + vars: + obr2: STRING_ALL, OBR.2 + orc2: STRING_ALL, ORC.2 + obr3: STRING_ALL, OBR.3 + orc3: STRING_ALL, ORC.3 + orc4: STRING_ALL, ORC.4 + expressions: + - condition: $orc2 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.2 + constants: + code: "PLAC" + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + hl7v2Field: ORC.2 + - condition: $orc2 NULL && $obr2 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.2 + constants: + code: "PLAC" + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + hl7v2Field: OBR.2 + - condition: $orc3 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.3 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FILL" + display: "Filler Identifier" + - condition: $orc3 NULL && $obr3 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.3 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FILL" + display: "Filler Identifier" + - condition: $orc4 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "PGN" + - condition: $orc4 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FGN" + +code: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: OBR.4 + +effectiveDateTime: + condition: $start NOT_NULL && $end NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: OBR.7 + start: OBR.7 + end: OBR.8 +_effectiveDateTime: + expressionType: nested + condition: $start NOT_NULL && $end NULL + vars: + dateTimeIn: OBR.7 + start: OBR.7 + end: OBR.8 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $dateTimeIn + expressionType: HL7Spec + +effectivePeriod: + condition: $startDate NOT_NULL && $endDate NOT_NULL + vars: + startDate: OBR.7 + endDate: OBR.8 + expressionType: nested + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(startDate,ZONEID)" + expressionType: JEXL + _start: + expressionType: nested + condition: $startDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $startDate + expressionType: HL7Spec + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(endDate,ZONEID)" + expressionType: JEXL + _end: + expressionType: nested + condition: $endDate NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $endDate + expressionType: HL7Spec + +issued: + type: STRING + valueOf: 'GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)' + expressionType: JEXL + vars: + dateTimeIn: OBR.22 +_issued: + expressionType: nested + condition: $obr22 NOT_NULL + vars: + obr22: OBR.22 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $obr22 + expressionType: HL7Spec + +category: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/ID/CodeableConcept + specs: OBR.24 + +status: + type: DIAGNOSTIC_REPORT_STATUS + valueOf: OBR.25 + expressionType: HL7Spec + required: true + +resultsInterpreter: + vars: + obr32: STRING_ALL, OBR.32 + condition: $obr32 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/NDL/PractitionerRole + generateList: true + expressionType: reference + specs: OBR.32 + +performer_1-technician: + valueOf: ../../datatypes/v251/hl7/datatypes/NDL/PractitionerRole + condition: $obr34 NOT_NULL + generateList: true + expressionType: reference + specs: OBR.34 + vars: + obr34: OBR.34 + constants: + performerParticipationType: "SPRF" + +performer_2-transcriptionist: + valueOf: ../../datatypes/v251/hl7/datatypes/NDL/PractitionerRole + condition: $obr35 NOT_NULL + generateList: true + expressionType: reference + specs: OBR.35 + vars: + obr35: OBR.35 + constants: + performerParticipationType: "TRANS" + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + orc16: ORC.16 + condition: $orc16 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: "http://hl7.org/fhir/StructureDefinition/event-statusReason" + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.16 + +encounter: + valueOf: datatype/Reference + expressionType: resource + specs: $Encounter + +subject: + valueOf: datatype/Reference + expressionType: resource + specs: $Patient + +basedOn: + valueOf: datatype/Reference + expressionType: resource + specs: $ServiceRequest + generateList: true + useGroup: true + +specimen: + expressionType: nested + generateList: true + expressions: + - valueOf: datatype/Reference + generateList: true + expressionType: resource + specs: $Specimen + useGroup: true + - valueOf: datatype/Reference + expressionType: resource + specs: $SpecimenSource + useGroup: true + +result: + valueOf: datatype/Reference + generateList: true + expressionType: resource + specs: $Observation + useGroup: true \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/OBRExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/OBRExtension.yml new file mode 100644 index 00000000000..d70a7ae30c7 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/OBRExtension.yml @@ -0,0 +1,340 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: obr-observation-request + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + obr2: STRING_ALL, OBR.2 + orc2: STRING_ALL, ORC.2 + condition: $orc2 NOT_NULL && $obr2 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.2 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.2 + - expressionType: nested + vars: + obr3: STRING_ALL, OBR.3 + orc3: STRING_ALL, ORC.3 + condition: $orc3 NOT_NULL && $obr3 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.3 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.3 + - expressionType: nested + vars: + obr10: STRING_ALL, OBR.10 + condition: $obr10 NOT_NULL + specs: OBR.10 * + generateList: true + expressionsMap: + url: + type: STRING + value: OBR.10 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + obr11: STRING, OBR.11 + condition: $obr11 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.11 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBR.11 + - expressionType: nested + vars: + obr12: STRING_ALL, OBR.12 + condition: $obr12 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.12 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: OBR.12 + - expressionType: nested + vars: + obr13: STRING_ALL, OBR.13 + condition: $obr13 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.13 + valueString: + expressionType: HL7Spec + type: STRING + valueOf: OBR.13 + - expressionType: nested + vars: + obr16: STRING_ALL, OBR.16 + condition: $obr16 NOT_NULL + specs: OBR.16 * + generateList: true + expressionsMap: + url: + type: STRING + value: OBR.16 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - condition: $orc14 NOT_NULL && $obr17 NOT_NULL + vars: + orc14: STRING_ALL, ORC.14 + obr17: STRING_ALL, OBR.17 + expressionType: nested + specs: OBR.17 * + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: callback-number + valueContactPoint: + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + expressionType: resource + constants: + hl7v2Field: "OBR.17" + - expressionType: nested + vars: + obr18: OBR.18 + condition: $obr18 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.18 + valueString: + type: STRING + valueOf: OBR.18 + expressionType: HL7Spec + - expressionType: nested + vars: + obr19: OBR.19 + condition: $obr19 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.19 + valueString: + type: STRING + valueOf: OBR.19 + expressionType: HL7Spec + - expressionType: nested + vars: + obr20: OBR.20 + condition: $obr20 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.20 + valueString: + type: STRING + valueOf: OBR.20 + expressionType: HL7Spec + - expressionType: nested + vars: + obr21: OBR.21 + condition: $obr21 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.21 + valueString: + type: STRING + valueOf: OBR.21 + expressionType: HL7Spec + - expressionType: nested + vars: + obr22: OBR.22 + condition: $obr22 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.22 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBR.22 + - expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/MOC/Extension + vars: + obr23: STRING_ALL, OBR.23 + condition: $obr23 NOT_NULL + specs: OBR.23 + constants: + mocExtensionName: OBR.23 + - expressionType: nested + vars: + obr24: OBR.24 + condition: $obr24 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.24 + valueId: + type: STRING + expressionType: HL7Spec + valueOf: OBR.24 + - expressionType: nested + vars: + obr25: OBR.25 + condition: $obr25 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.25 + valueId: + type: STRING + expressionType: HL7Spec + valueOf: OBR.25 + - expressionType: resource + vars: + obr26: STRING_ALL, OBR.26 + condition: $obr26 NOT_NULL + valueOf: datatypes/PRL_ELR/Extension + specs: OBR.26 + constants: + prlExtensionName: OBR.26 + - expressionType: nested + vars: + obr28: STRING_ALL, OBR.28 + condition: $obr28 NOT_NULL + specs: OBR.28 * + generateList: true + expressionsMap: + url: + type: STRING + value: OBR.28 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + obr29: STRING_ALL, OBR.29 + condition: $obr29 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.29 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier + expressionType: resource + specs: OBR.29 + constants: + backupExtension: "filler-assigned-identifier" + - expressionType: nested + vars: + obr33: STRING_ALL, OBR.33 + condition: $obr33 NOT_NULL + specs: OBR.33 * + generateList: true + expressionsMap: + url: + type: STRING + value: OBR.33 + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/NDL/PractitionerRole + expressionType: reference + - expressionType: nested + vars: + obr36: STRING, OBR.36 + condition: $obr36 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.36 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBR.36 + - expressionType: nested + vars: + obr39: STRING_ALL, OBR.39 + condition: $obr39 NOT_NULL + specs: OBR.39 * + generateList: true + expressionsMap: + url: + type: STRING + value: OBR.39 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + - expressionType: nested + vars: + obr44: STRING_ALL, OBR.44 + condition: $obr44 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.44 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CNE/CodeableConcept + expressionType: resource + specs: OBR.44 + - expressionType: nested + vars: + obr45: STRING_ALL, OBR.45 + condition: $obr45 NOT_NULL + specs: OBR.45 * + generateList: true + expressionsMap: + url: + type: STRING + value: obr-45-procedure-code-modifier + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CNE/CodeableConcept + expressionType: resource + - expressionType: nested + vars: + obr48: STRING_ALL, OBR.48 + condition: $obr48 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.48 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: OBR.48 + - expressionType: nested + vars: + obr49: STRING_ALL, OBR.49 + condition: $obr49 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.49 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: OBR.49 + - expressionType: nested + vars: + obr50: STRING_ALL, OBR.50 + condition: $obr50 NOT_NULL + expressionsMap: + url: + type: STRING + value: OBR.50 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: OBR.50 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ORCExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ORCExtension.yml new file mode 100644 index 00000000000..82183edddd6 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ORCExtension.yml @@ -0,0 +1,235 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: orc-common-order + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + orc5: STRING_ALL, ORC.5 + condition: $orc5 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.5 + valueString: + type: STRING + valueOf: ORC.5 + expressionType: HL7Spec + - expressionType: nested + vars: + orc6: STRING_ALL, ORC.6 + condition: $orc6 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.6 + valueString: + type: STRING + valueOf: ORC.6 + expressionType: HL7Spec + - expressionType: nested + vars: + orc8: STRING_ALL, ORC.8 + condition: $orc8 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.8 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier + expressionType: resource + specs: ORC.8 + constants: + backupExtension: "filler-assigned-identifier" + - expressionType: nested + vars: + orc10: STRING_ALL, ORC.10 + condition: $orc10 NOT_NULL + specs: ORC.10 * + generateList: true + expressionsMap: + url: + type: STRING + value: ORC.10 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + orc11: STRING_ALL, ORC.11 + condition: $orc11 NOT_NULL + specs: ORC.11 * + generateList: true + expressionsMap: + url: + type: STRING + value: ORC.11 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + orc12: STRING_ALL, ORC.12 + condition: $orc12 NOT_NULL + specs: ORC.12 * + generateList: true + expressionsMap: + url: + type: STRING + value: orc-12-ordering-provider + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + orc13: STRING_ALL, ORC.13 + condition: $orc13 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.13 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + specs: ORC.13 + - expressionType: nested + condition: $orc15 NOT_NULL + vars: + orc15: STRING, ORC.15 + expressionsMap: + url: + type: STRING + value: ORC.15 + valueString: + type: STRING + valueOf: ORC.15 + expressionType: HL7Spec + - expressionType: nested + vars: + orc17: ORC.17 + condition: $orc17 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.17 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.17 + - expressionType: nested + vars: + orc17: ORC.18 + condition: $orc17 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.18 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.18 + - expressionType: nested + vars: + orc19: STRING_ALL, ORC.19 + condition: $orc19 NOT_NULL + specs: ORC.19 * + generateList: true + expressionsMap: + url: + type: STRING + value: ORC.19 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + - expressionType: nested + vars: + orc21: STRING_ALL, ORC.21 + condition: $orc21 NOT_NULL + specs: ORC.21 * + generateList: true + expressionsMap: + url: + type: STRING + value: orc-21-ordering-facility-name + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + - expressionType: nested + vars: + orc22: STRING_ALL, ORC.22 + condition: $orc22 NOT_NULL + specs: ORC.22 * + generateList: true + expressionsMap: + url: + type: STRING + value: orc-22-ordering-facility-address + valueAddress: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + - expressionType: nested + vars: + orc24: STRING_ALL, ORC.24 + condition: $orc24 NOT_NULL + specs: ORC.24 * + generateList: true + expressionsMap: + url: + type: STRING + value: orc-24-ordering-provider-address + valueAddress: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + - expressionType: nested + vars: + orc27: ORC.27 + condition: $orc27 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.27 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: ORC.27 + - expressionType: nested + vars: + orc28: ORC.28 + condition: $orc28 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.28 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.28 + - expressionType: nested + vars: + orc30: STRING_ALL, ORC.30 + condition: $orc30 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.30 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CNE/CodeableConcept + specs: ORC.30 + - expressionType: nested + vars: + orc31: STRING_ALL, ORC.31 + condition: $orc31 NOT_NULL + expressionsMap: + url: + type: STRING + value: ORC.31 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: ORC.31 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/PractitionerRole.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/PractitionerRole.yml new file mode 100644 index 00000000000..efb00d80959 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/PractitionerRole.yml @@ -0,0 +1,40 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: PractitionerRole + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + + +practitioner: + expressionType: nested + vars: + orc12: STRING_ALL, ORC.12 + obr16: STRING_ALL, OBR.16 + expressions: + - expressionType: reference + condition: $orc12 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + specs: ORC.12 + vars: + XADAddress: ORC.24 + constants: + XCNHL7Field: ORC.12 + - expressionType: reference + condition: $orc12 NULL && $obr16 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + specs: OBR.16 + vars: + XADAddress: ORC.24 + constants: + XCNHL7Field: OBR.16 + +organization: + vars: + XADAddress: ORC.22 + XTNTelecom: ORC.23 * + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + specs: ORC.21 diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ServiceRequest.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ServiceRequest.yml new file mode 100644 index 00000000000..0e08b9fc9e3 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/ServiceRequest.yml @@ -0,0 +1,322 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: ServiceRequest + +# Not Implementing +# ORC.7 not mapped, deprecated in the NIST spec +# ORC.26 not mapped, deprecated in the NIST spec +# ORC.32 not mapped, deprecated in NIST spec +# ORC.34 not mapped, deprecated in NIST spec +# OBR.5 not mapped, deprecated in NIST spec +# OBR.27 not mapped, deprecated in NIST spec +# OBR.30 not mapped, deprecated in NIST spec +# OBR.37 not mapped, deprecated in NIST spec +# OBR.38 not mapped, deprecated in NIST spec +# OBR.40 not mapped, deprecated in NIST spec +# OBR.41 not mapped, deprecated in NIST spec +# OBR.42 not mapped, deprecated in NIST spec +# OBR.43 not mapped, deprecated in NIST spec +# OBR.54 not mapped, not in NIST + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +status: + type: SERVICE_REQUEST_STATUS + default: "unknown" + valueOf: ORC.5 | ORC.1 + expressionType: HL7Spec + +intent: + expressionType: nested + vars: + obr11: STRING, OBR.11 + expressions: + - condition: $obr11 NOT_EQUALS G || $obr11 NOT_EQUALS A + type: STRING + value: "order" + - condition: $obr11 EQUALS A + type: STRING + value: "#add-on#" + - condition: $obr11 EQUALS G + type: STRING + value: "reflex-order" + +identifier: + expressionType: nested + generateList: true + vars: + obr2: STRING_ALL, OBR.2 + orc2: STRING_ALL, ORC.2 + obr3: STRING_ALL, OBR.3 + orc3: STRING_ALL, ORC.3 + orc4: STRING_ALL, ORC.4 + orc33: STRING_ALL, ORC.33 + expressions: + - condition: $orc2 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.2 + constants: + code: "PLAC" + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + display: "Placer Identifier" + hl7v2Field: ORC.2 + - condition: $orc2 NULL && $obr2 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.2 + constants: + code: "PLAC" + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + display: "Placer Identifier" + hl7v2Field: OBR.2 + - condition: $orc3 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.3 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FILL" + display: "Filler Identifier" + hl7v2Field: ORC.3 + - condition: $orc3 NULL && $obr3 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: OBR.3 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FILL" + display: "Filler Identifier" + hl7v2Field: OBR.3 + - condition: $orc4 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "PGN" + hl7v2Field: ORC.4 + - condition: $orc4 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EI/Identifier + expressionType: resource + specs: ORC.4 + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "FGN" + hl7v2Field: ORC.4 + - condition: $orc33 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + expressionType: resource + specs: ORC.33 * + generateList: true + constants: + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + code: "PLAC" + CXIdentifierField: ORC.33 + +code: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: OBR.4 + +authoredOn: + condition: $orderControl EQUALS NW + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: ORC.9 + orderControl: String, ORC.1 +_authoredOn: + expressionType: nested + condition: $orderControl EQUALS NW && $dateTimeIn NOT_NULL + vars: + dateTimeIn: ORC.9 + orderControl: String, ORC.1 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $dateTimeIn + expressionType: HL7Spec + +requester: + expressionType: nested + vars: + orc12: STRING_ALL, ORC.12 + obr16: STRING_ALL, OBR.16 + orc14: STRING_ALL, ORC.14 + obr17: STRING_ALL, OBR.17 + orc21: STRING_ALL, ORC.21 + orc22: STRING_ALL, ORC.22 + orc23: STRING_ALL, ORC.23 + orc24: STRING_ALL, ORC.24 + expressions: + - condition: $orc21 NOT_NULL || $orc22 NOT_NULL || $orc23 NOT_NULL + expressionType: reference + valueOf: segments/ORC/PractitionerRole + - condition: $orc21 NULL && $orc22 NULL && $orc23 NULL + expressionType: nested + expressions: + - expressionType: reference + condition: $orc12 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + specs: ORC.12 + vars: + XADAddress: ORC.24 + constants: + XCNHL7Field: ORC.12 + - expressionType: reference + condition: $orc12 NULL && $obr16 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + specs: OBR.16 + vars: + XADAddress: ORC.24 + constants: + XCNHL7Field: OBR.16 + +_requester: + vars: + orc14: STRING_ALL, ORC.14 + obr17: STRING_ALL, OBR.17 + expressionType: nested + expressions: + - condition: $orc14 NOT_NULL + expressionType: nested + expressionsMap: + extension: + generateList: true + specs: ORC.14 * + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: callback-number + valueContactPoint: + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + expressionType: resource + constants: + hl7v2Field: ORC.14 + - condition: $orc14 NULL && $obr17 NOT_NULL + expressionType: nested + expressionsMap: + extension: + generateList: true + specs: OBR.17 * + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: callback-number + valueContactPoint: + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + expressionType: resource + constants: + hl7v2Field: OBR.17 + +locationCode: + vars: + orc29: STRING_ALL, ORC.29 + condition: $orc29 NOT_NULL + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.29 + +reasonCode: + vars: + obr31: STRING_ALL, OBR.31 + condition: $obr31 NOT_NULL + valueOf: datatypes/CWE_ELR/CodeableConcept + generateList: true + expressionType: resource + specs: OBR.31 + +orderDetail: + generateList: true + expressionType: nested + expressions: + - expressionType: resource + vars: + obr46: STRING_ALL, OBR.46 + condition: $obr46 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: OBR.46 * + generateList: true + constants: + hl7v2Field: OBR.46 + - expressionType: resource + vars: + obr47: STRING_ALL, OBR.47 + condition: $obr47 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: OBR.47 * + generateList: true + constants: + hl7v2Field: OBR.47 + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + vars: + orc1: STRING, ORC.1 + condition: $orc1 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: business-event + valueCode: + type: STRING + expressionType: HL7Spec + valueOf: ORC.1 + - expressionType: nested + vars: + orc9: STRING, ORC.9 + condition: $orc9 NOT_NULL && $orc9 NOT_EQUALS NW + expressionsMap: + url: + type: SYSTEM_URL + value: business-event + valueString: + type: STRING + expressionType: HL7Spec + valueOf: ORC.9 + - expressionType: nested + vars: + orc25: ORC.25 + condition: $orc25 NOT_NULL + expressionsMap: + url: + type: SYSTEM_URL + value: status-modifier + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: ORC.25 + # ORC data + - expressionType: resource + valueOf: segments/ORC/ORCExtension + # OBR Data + - expressionType: resource + valueOf: segments/ORC/OBRExtension + +subject: + valueOf: datatype/Reference + expressionType: resource + specs: $Patient + +note: + valueOf: segments/NTE/Annotation + expressionType: resource + generateList: true + specs: NTE diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/Specimen.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/Specimen.yml new file mode 100644 index 00000000000..5a7d46505ba --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/ORC/Specimen.yml @@ -0,0 +1,62 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Specimen +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +collection: + condition: $spm7 NOT_NULL + expressionType: nested + generateList: true + expressionsMap: + collectedPeriod: + condition: $end NOT_NULL + expressionType: nested + vars: + start: OBR.7 + end: OBR.8 + dateTimeIn: OBR.7 + dateTimeOut: OBR.8 + expressions: + - valueOf: ../../datatypes/v251/hl7/datatypes/DR/Period + expressionType: resource + collectedDateTime: + expressionType: nested + vars: + dateTimeIn: OBR.7 + end: OBR.8 + expressions: + - condition: $end NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + collector: + condition: $obr10 NOT_NULL + vars: + obr10: OBR.10 + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + specs: OBR.10 + +note_collectors-comment: + condition: $obr39 NOT_NULL + generateList: true + vars: + obr39: STRING_ALL, OBR.39 + specs: OBR.39 * + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/Annotation + expressionType: resource + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: hl7v2Segment + valueString: + valueOf: 'OBR' \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PD1Extension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PD1Extension.yml new file mode 100644 index 00000000000..308be65fdd4 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PD1Extension.yml @@ -0,0 +1,215 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: pd1-patient-additional-demographic + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + specs: PD1.1 * + condition: $pd11 NOT_NULL + generateList: true + vars: + pd11: STRING_ALL, PD1.1 + expressionsMap: + url: + type: STRING + value: PD1.1 + valueString: + type: STRING + valueOf: PD1.1 + expressionType: HL7Spec + - expressionType: nested + condition: $pd12 NOT_NULL + specs: PD1.2 + vars: + pd12: STRING_ALL, PD1.2 + expressionsMap: + url: + type: STRING + value: PD1.2 + valueString: + type: STRING + valueOf: PD1.2 + expressionType: HL7Spec + - expressionType: nested + condition: $pd18 NOT_NULL + specs: PD1.8 + vars: + pd18: STRING_ALL, PD1.8 + expressionsMap: + url: + type: STRING + value: PD1.8 + valueString: + type: STRING + valueOf: PD1.8 + expressionType: HL7Spec + - expressionType: nested + condition: $pd19 NOT_NULL + vars: + pd19: STRING_ALL, PD1.9 + expressionsMap: + url: + type: STRING + value: PD1.9 + valueString: + type: STRING + valueOf: PD1.9 + expressionType: HL7Spec + - expressionType: nested + specs: PD1.10 * + condition: $pd110 NOT_NULL + generateList: true + vars: + pd110: STRING_ALL, PD1.10 + expressionsMap: + url: + type: STRING + value: PD1.10 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + expressionType: resource + constants: + CXIdentifierField: PD1.10 + - expressionType: nested + condition: $pd111 NOT_NULL + specs: PD1.11 + vars: + pd111: STRING_ALL, PD1.11 + expressionsMap: + url: + type: STRING + value: PD1.11 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CE/CodeableConcept + expressionType: resource + - expressionType: nested + condition: $pd112 NOT_NULL + vars: + pd112: STRING_ALL, PD1.12 + expressionsMap: + url: + type: STRING + value: PD1.12 + valueString: + type: STRING + valueOf: PD1.12 + expressionType: HL7Spec + - expressionType: nested + condition: $pd113 NOT_NULL + vars: + pd113: STRING_ALL, PD1.13 + expressionsMap: + url: + type: STRING + value: PD1.13 + valueString: + type: STRING + valueOf: PD1.13 + expressionType: HL7Spec + - expressionType: nested + vars: + pd114: STRING_ALL, PD1.14 + condition: $pd114 NOT_NULL + specs: PD1.14 * + generateList: true + expressionsMap: + url: + type: STRING + value: PD1.14 + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference + - expressionType: nested + specs: PD1.15 * + condition: $pd115 NOT_NULL + generateList: true + vars: + pd115: STRING_ALL, PD1.15 + expressionsMap: + url: + type: STRING + value: PD1.15 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CE/CodeableConcept + expressionType: resource + - expressionType: nested + condition: $pd116 NOT_NULL + specs: PD1.16 + vars: + pd116: STRING_ALL, PD1.16 + expressionsMap: + url: + type: STRING + value: PD1.16 + valueString: + type: STRING + valueOf: PD1.16 + expressionType: HL7Spec + - expressionType: nested + condition: $pd117 NOT_NULL + vars: + pd117: STRING_ALL, PD1.17 + expressionsMap: + url: + type: STRING + value: PD1.17 + valueString: + type: STRING + valueOf: PD1.17 + expressionType: HL7Spec + - expressionType: nested + condition: $pd118 NOT_NULL + vars: + pd118: STRING_ALL, PD1.18 + expressionsMap: + url: + type: STRING + value: PD1.18 + valueString: + type: STRING + valueOf: PD1.18 + expressionType: HL7Spec + - expressionType: nested + condition: $pd119 NOT_NULL + specs: PD1.19 + vars: + pd119: STRING_ALL, PD1.19 + expressionsMap: + url: + type: STRING + value: PD1.19 + valueString: + type: STRING + valueOf: PD1.19 + expressionType: HL7Spec + - expressionType: nested + condition: $pd120 NOT_NULL + specs: PD1.20 + vars: + pd120: STRING_ALL, PD1.20 + expressionsMap: + url: + type: STRING + value: PD1.20 + valueString: + type: STRING + valueOf: PD1.20 + expressionType: HL7Spec + - expressionType: nested + condition: $pd121 NOT_NULL + specs: PD1.21 + vars: + pd121: STRING_ALL, PD1.21 + expressionsMap: + url: + type: STRING + value: PD1.21 + valueString: + type: STRING + valueOf: PD1.21 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PIDExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PIDExtension.yml new file mode 100644 index 00000000000..27e2a0a2f77 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/PIDExtension.yml @@ -0,0 +1,87 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: pid-patient + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + condition: $pid8 NOT_NULL + vars: + pid8: STRING_ALL, PID.8 + expressionsMap: + url: + type: STRING + value: PID.8 + valueString: + type: STRING + valueOf: PID.8 + expressionType: HL7Spec + - expressionType: nested + specs: PID.18 + condition: $pid18 NOT_NULL + generateList: true + vars: + pid18: STRING_ALL, PID.18 + expressionsMap: + url: + type: STRING + value: PID.18 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + expressionType: resource + constants: + CXIdentifierField: PID.18 + - expressionType: nested + condition: $pid24 NOT_NULL + vars: + pid24: STRING_ALL, PID.24 + expressionsMap: + url: + type: STRING + value: PID.24 + valueString: + type: STRING + valueOf: PID.24 + expressionType: HL7Spec + - expressionType: nested + condition: $pid30 NOT_NULL + vars: + pid30: STRING_ALL, PID.30 + expressionsMap: + url: + type: STRING + value: PID.30 + valueString: + type: STRING + valueOf: PID.30 + expressionType: HL7Spec + - expressionType: nested + specs: PID.32 * + generateList: true + condition: $pid32 NOT_NULL + vars: + pid32: STRING_ALL, PID.32 + expressionsMap: + url: + type: STRING + value: PID.32 + valueString: + type: STRING + valueOf: PID.32 + expressionType: HL7Spec + - expressionType: nested + specs: PID.38 * + condition: $pid38 NOT_NULL + vars: + pid38: STRING_ALL, PID.38 + expressionsMap: + url: + type: STRING + value: PID.38 + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Patient.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Patient.yml new file mode 100644 index 00000000000..7ff487fc5ff --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Patient.yml @@ -0,0 +1,577 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Patient + +# - PID.2 is deprecated in the HL7v2.7 and NIST HL7v2.5.1 specs. Further, the HAPI v2.7 model has set both fields to +# NULLDT. Thus, this field is not being mapped. +# - PID.4 is deprecated in the HL7v2.7 and NIST HL7v2.5.1 specs. Further, the HAPI v2.7 model has set both fields to +# NULLDT. Thus, this field is not being mapped. +# - PID.6: The inventory maps the value to a `valueString` extention but `valueHumanName` is available and fully captures +# the values, so it is being used over `valueString` +# - PID.12 is deprecated in the HL7v2.7 and NIST HL7v2.5.1 specs. Further, the HAPI v2.7 model has set both +# fields to NULLDT. Thus, this field is not being mapped. +# - PID.15 allows repeats in the NIST HL7v2.5.1 specs, however the HAPI models for v2.5.1 and v2.7 do not support +# repetitions in those fields. Thus, any repetitions of the field will be ignored. +# - PID.19 and PID.20 are deprecated in the HL7v2.7 and NIST HL7v2.5.1 specs. Further, the HAPI v2.7 model has set both +# fields to NULLDT. Thus, this field is not being mapped. +# - PID.21: The inventory does not include a FHIR field on patient that this should be mapped to. We have decided to map +# to Patient.link which includes a reference to RelatedPerson + + +# - PD1.4 Deprecated in NIST, set to NullDT in HAPI. Field not mapped + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +contact: + vars: + nk1: NK1 + condition: $nk1 NOT_NULL + expressionType: nested + generateList: true + expressionsMap: + name: + expressionType: resource + generateList: true + specs: NK1.2 * + valueOf: datatypes/XPN_ELR/HumanName + extension: + generateList: true + expressionType: nested + specs: NK1.3 + expressionsMap: + url: + type: SYSTEM_URL + value: relationship + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + address: + condition: $nk14 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + generateList: true + expressionType: resource + specs: NK1.4 * + vars: + nk14: STRING_ALL, NK1.4 + telecom: + expressionType: nested + generateList: true + expressions: + - condition: $nk15 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: NK1.5 * + vars: + nk15: STRING_ALL, NK1.5 + organization: + condition: $XONOrganization NOT_NULL || $XPNContactName NOT_NULL || $XPNContactTelecom NOT_NULL || $XADContactAddress NOT_NULL + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + specs: NK1.13 + vars: + XONOrganization: NK1.13 + XPNContactName: NK1.30 + XPNContactTelecom: NK1.31 + XADContactAddress: NK1.32 + + +identifier: + expressionType: nested + generateList: true + expressions: + - condition: $pid3 NOT_NULL + expressionType: resource + specs: PID.3 * + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + generateList: true + vars: + pid3: STRING_ALL, PID.3 + constants: + CXIdentifierField: PID.3 + +name: + expressionType: nested + generateList: true + expressions: + - condition: $pid5 NOT_NULL + expressionType: resource + generateList: true + specs: PID.5 * + valueOf: datatypes/XPN_ELR/HumanName + vars: + pid5: STRING_ALL, PID.5 + constants: + hl7Use: patient-name + +birthDate: + type: DATE + valueOf: PID.7 + expressionType: HL7Spec + +_birthDate: + condition: $pid7 NOT_NULL + vars: + pid7: PID.7 + dateTimeIn: PID.7, GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID) + isTime: PID.7, GeneralUtils.dateTimeWithZoneId(isTime,ZONEID).length() > 10 + expressionType: nested + expressionsMap: + # this extension is needed to comply with the official HL7v2-to-FHIR mapping + extension_1: + condition: $dateTimeIn NOT_NULL && $isTime EQUALS "true" + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: birthTime + valueDateTime: + valueOf: $dateTimeIn + expressionType: HL7Spec + # this extension is needed to reliably translate back to HL7 from FHIR + extension_2: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $pid7 + expressionType: HL7Spec + +gender: + type: ADMINISTRATIVE_GENDER + valueOf: PID.8 + expressionType: HL7Spec + +address: + condition: $pid11 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XAD/Address + generateList: true + expressionType: resource + specs: PID.11 * + vars: + pid11: STRING_ALL, PID.11 + +telecom: + expressionType: nested + generateList: true + expressions: + - condition: $pid13 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: PID.13 * + vars: + pid13: STRING_ALL, PID.13 + constants: + useCode: home + - condition: $pid14 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/XTN/ContactPoint + generateList: true + expressionType: resource + specs: PID.14 * + vars: + pid14: STRING_ALL, PID.14 + constants: + useCode: work + +communication: + expressionType: nested + condition: $pid15 NOT_NULL + vars: + pid15: STRING_ALL, PID.15 + expressionsMap: + language: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: PID.15 + +maritalStatus: + condition: $pid16 NOT_NULL + vars: + pid16: STRING_ALL, PID.16 + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: PID.16 + +link: + condition: $pid21 NOT_NULL + expressionType: nested + vars: + pid21: STRING_ALL, PID.21 + specs: PID.21 * + generateList: true + expressionsMap: + other: + valueOf: ../../datatypes/v251/hl7/datatypes/CX/RelatedPerson-mother + expressionType: reference + type: + type: STRING + valueOf: "seealso" + +multipleBirthBoolean: + condition: $multipleBirthIndicator NOT_NULL && $birthOrder NULL + type: BOOLEAN + valueOf: PID.24 + expressionType: HL7Spec + vars: + multipleBirthIndicator: PID.24 + birthOrder: PID.25 + +multipleBirthInteger: + condition: $birthOrder NOT_NULL + type: INTEGER + valueOf: PID.25 + expressionType: HL7Spec + vars: + birthOrder: PID.25 + +deceasedBoolean: + condition: $deceasedBool NOT_NULL && $deceasedDateTime NULL + type: BOOLEAN + valueOf: PID.30 + expressionType: HL7Spec + vars: + deceasedBool: PID.30 + deceasedDateTime: PID.29 + +deceasedDateTime: + condition: $dateTimeIn NOT_NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: PID.29 + +_deceasedDateTime: + expressionType: nested + condition: $pid29 NOT_NULL + vars: + pid29: STRING, PID.29 + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: PID.29 + expressionType: HL7Spec + +meta: + expressionType: nested + generateList: true + expressionsMap: + lastUpdated: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: PID.33 + _lastUpdated: + expressionType: nested + condition: $pid33 NOT_NULL + vars: + pid33: STRING, PID.33 + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: PID.33 + expressionType: HL7Spec + extension: + generateList: true + condition: $pid34 NOT_NULL + vars: + pid34: STRING_ALL, PID.34 + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: last-updated-facility-namespace-id + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + expressionType: reference + specs: PID.34 + +generalPractitioner_Organization: + condition: $pd13 NOT_NULL + generateList: true + specs: PD1.3 * + vars: + pd13: STRING_ALL, PD1.3 + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference + +extension: + expressionType: nested + generateList: true + useGroup: true + expressions: + - expressionType: nested + generateList: true + specs: NTE + expressionsMap: + url: + type: SYSTEM_URL + value: patient-notes + valueAnnotation: + valueOf: segments/NTE/Annotation + expressionType: resource + - expressionType: resource + valueOf: segments/PID/PIDExtension + - expressionType: resource + valueOf: segments/PID/PD1Extension + - expressionType: nested + generateList: true + condition: $pid6 NOT_NULL + vars: + pid6: STRING_ALL, PID.6 * + specs: PID.6 * + expressionsMap: + url: + type: SYSTEM_URL + value: mothersMaidenName + valueHumanName: + valueOf: datatypes/XPN_ELR/HumanName + expressionType: resource + - condition: $pid10 NOT_NULL + expressionType: nested + specs: PID.10 * + generateList: true + vars: + pid10: STRING_ALL, PID.10 + expressionsMap: + url: + type: SYSTEM_URL + value: race + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: CWE + - condition: $pid17 NOT_NULL + expressionType: nested + generateList: true + vars: + pid17: STRING_ALL, PID.17 + expressionsMap: + url: + type: SYSTEM_URL + value: religion + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: PID.17 + - condition: $pid22 NOT_NULL + expressionType: nested + generateList: true + vars: + pid22: STRING_ALL, PID.22 + specs: PID.22 * + expressionsMap: + url: + type: SYSTEM_URL + value: ethnic-group + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + - condition: $pid23 NOT_NULL + expressionType: nested + generateList: true + vars: + pid23: STRING_ALL, PID.23 + expressionsMap: + url: + type: SYSTEM_URL + value: birthPlace + valueAddress: + expressionType: nested + generateList: true + expressionsMap: + text: + valueOf: PID.23 + type: STRING + expressionType: HL7Spec + - expressionType: nested + condition: $pid26 NOT_NULL + generateList: true + vars: + pid26: STRING_ALL, PID.26 + constants: + hl7v2Field: PID.26 + expressionsMap: + url: + type: SYSTEM_URL + value: patient-citizenship + extension: + generateList: true + expressionType: nested + specs: PID.26 * + expressionsMap: + url: + type: SYSTEM_URL + value: code + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + - expressionType: nested + condition: $pid39 NOT_NULL + generateList: true + vars: + pid39: STRING_ALL, PID.39 + constants: + hl7v2Field: PID.39 + expressionsMap: + url: + type: SYSTEM_URL + value: patient-citizenship + extension: + generateList: true + expressionType: nested + specs: PID.39 * + expressionsMap: + url: + type: SYSTEM_URL + value: code + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + - condition: $pid27 NOT_NULL + vars: + pid27: STRING_ALL, PID.27 + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: veteran-military-status + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: PID.27 + - condition: $pid31 NOT_NULL + vars: + pid31: STRING_ALL, PID.31 + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: identity-unknown + valueString: + type: STRING + valueOf: PID.31 + expressionType: HL7Spec + - condition: $pid35 NOT_NULL || $pid36 NOT_NULL || $pid37 NOT_NULL + vars: + pid35: STRING_ALL, PID.35 + pid36: STRING_ALL, PID.36 + pid37: STRING, PID.37 + expressionType: nested + generateList: true + constants: + hl7v2Field: PID.35 + expressionsMap: + url: + type: SYSTEM_URL + value: patient-animal + extension: + generateList: true + expressionType: nested + expressions: + - condition: $pid35 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: species + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: PID.35 + - condition: $pid36 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: breed + valueCodeableConcept: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: PID.36 + - condition: $pid37 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: strain + valueString: + type: STRING + valueOf: PID.37 + expressionType: HL7Spec + - condition: $pd15 NOT_NULL + vars: + pd15: STRING_ALL, PD1.5 + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: studentStatus + valueString: + type: STRING + valueOf: PD1.5 + expressionType: HL7Spec + - condition: $pd16 NOT_NULL + vars: + pd16: STRING_ALL, PD1.6 + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: patient-disability + valueString: + type: STRING + valueOf: PD1.6 + expressionType: HL7Spec + - condition: $pd17 NOT_NULL + vars: + pd17: STRING_ALL, PD1.7 + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: livingWill + valueString: + type: STRING + valueOf: PD1.7 + expressionType: HL7Spec + #Mapping inventory for XON[string] + - expressionType: nested + generateList: true + specs: PD1.14 * + expressionsMap: + url: + type: SYSTEM_URL + value: patient-congregation + valueString: + type: STRING + valueOf: XON.1 |XON.10 + expressionType: HL7Spec \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Provenance-Patient.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Provenance-Patient.yml new file mode 100644 index 00000000000..0d87d0aa307 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PID/Provenance-Patient.yml @@ -0,0 +1,63 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Provenance +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +target: + valueOf: datatype/Reference + generateList: true + expressionType: resource + specs: $Patient + useGroup: true + +recorded: + type: STRING + valueOf: "GeneralUtils.getCurrentDateTimeUsingZoneId(ZONEID)" + expressionType: JEXL + +activity: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "UPDATE" + system: + type: STRING + valueOf: "https://terminology.hl7.org/CodeSystem/v3-DataOperation" + +occurredDateTime: + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: PID.33 + +agent: + expressionType: nested + generateList: true + vars: + msh34: STRING_ALL, PID.34 + condition: $msh34 NOT_NULL + expressionsMap: + type: + expressionType: nested + expressionsMap: + coding: + expressionType: nested + expressionsMap: + code: + type: STRING + valueOf: "performer" + system: + type: SYSTEM_URL + valueOf: "http://terminology.hl7.org/CodeSystem/provenance-participant-type" + who: + valueOf: ../../datatypes/v251/hl7/datatypes/HD/Organization + expressionType: reference + specs: PID.34 diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/Encounter.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/Encounter.yml new file mode 100644 index 00000000000..3dd7c170849 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/Encounter.yml @@ -0,0 +1,509 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Encounter + +# Not mapped because fields are deprecated in NIST and not in the mapping inventory +# PV1.15 +# PV1.21-29 +# PV1.40 +# PV2.2 +# PV2.4-6 +# PV2.14 +# PV2.16-20 +# PV2.24 +# PV2.27 +# PV2.28 +# PV2.30 - 37 +# PV2.39 +# PV2.41-49 +# PV1.20 is not mapped because there is no mapping for the FC datatype + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + + +class: + type: ACT_ENCOUNTER + specs: PV1.2 + expressionType: HL7Spec + +status: + vars: + pv145: STRING, PV1.45 + expressionType: nested + expressions: + - condition: $pv145 NOT_NULL + type: STRING + value: "finished" + - condition: $pv145 NULL + type: ENCOUNTER_STATUS_CODE_FHIR + expressionType: HL7Spec + specs: PV1.2 + +_class: + vars: + pv12: STRING_ALL, PV1.2 + condition: $pv12 NOT_NULL + expressionType: nested + expressionsMap: + extension: + expressionType: nested + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: pv1-2-patient-class + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.2 + +location: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + pv13: String_ALL, PV1.3 + condition: $pv13 NOT_NULL + expressionsMap: + location: + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + expressionType: reference + specs: PV1.3 + status: + expressionType: nested + vars: + pv121: STRING, PV1.2.1 + expressions: + - condition: $pv121 EQUALS P + type: STRING + value: planned + - condition: $pv121 NOT_EQUALS P || $pv121 NULL + type: STRING + value: active + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + value: PV1.3 + - expressionType: nested + vars: + pv16: STRING_ALL, PV1.6 + condition: $pv16 NOT_NULL + expressionsMap: + location: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + specs: PV1.6 + status: + type: STRING + value: completed + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + value: PV1.6 + - expressionType: nested + vars: + pv111: STRING_ALL, PV1.11 + condition: $pv111 NOT_NULL + expressionsMap: + location: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + specs: PV1.11 + status: + type: STRING + value: "active" + extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + value: PV1.11 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: temporary-location + valueBoolean: + type: STRING + value: "true" + - expressionType: nested + vars: + pv142: STRING_ALL, PV1.42 + condition: $pv142 NOT_NULL + expressionsMap: + location: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + specs: PV1.42 + status: + type: STRING + value: "planned" + extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + value: PV1.42 + - expressionType: nested + vars: + pv143: STRING_ALL, PV1.43 + condition: $pv143 NOT_NULL + expressionsMap: + location: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/PL/Location + specs: PV1.43 + status: + type: STRING + value: "completed" + extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + value: PV1.43 + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: temporary-location + valueBoolean: + type: STRING + value: "true" + +participant: + generateList: true + expressionType: nested + expressions: + - vars: + pv17: STRING_ALL, PV1.7 + condition: $pv17 NOT_NULL + expressionType: nested + constants: + XCNHL7Field: PV1.7 + specs: PV1.7 * + generateList: true + expressionsMap: + individual: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + type: + expressionType: nested + generateList: true + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + value: "ATND" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + display: + type: STRING + value: "attender" + - vars: + pv18: STRING_ALL, PV1.8 + condition: $pv18 NOT_NULL + expressionType: nested + constants: + XCNHL7Field: PV1.8 + specs: PV1.8 * + generateList: true + expressionsMap: + individual: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + type: + expressionType: nested + generateList: true + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + value: "REF" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + text: + type: STRING + value: "referrer" + - vars: + pv19: STRING_ALL, PV1.9 + condition: $pv19 NOT_NULL + expressionType: nested + constants: + XCNHL7Field: PV1.9 + specs: PV1.9 * + generateList: true + expressionsMap: + individual: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + type: + expressionType: nested + generateList: true + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + value: "CON" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + text: + type: STRING + value: "consultant" + - vars: + pv117: STRING_ALL, PV1.17 + condition: $pv117 NOT_NULL + expressionType: nested + constants: + XCNHL7Field: PV1.17 + specs: PV1.17 * + generateList: true + expressionsMap: + individual: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + type: + expressionType: nested + generateList: true + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + value: "ADM" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + text: + type: STRING + value: "admitter" + - vars: + pv152: STRING_ALL, PV1.52 + condition: $pv152 NOT_NULL + expressionType: nested + constants: + XCNHL7Field: PV1.52 + specs: PV1.52 * + generateList: true + expressionsMap: + individual: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XCN/Practitioner + type: + expressionType: nested + generateList: true + expressionsMap: + coding: + generateList: true + expressionType: nested + expressionsMap: + code: + type: STRING + value: "PART" + system: + type: STRING + value: "http://terminology.hl7.org/CodeSystem/v3-ParticipationType" + text: + type: STRING + value: "Participation" + +type: + vars: + pv14: PV1.4 + condition: $pv14 NOT_NULL + type: STRING + valueOf: PV1.4 + expressionType: HL7Spec + +hospitalization: + vars: + pv15: STRING_ALL, PV1.5 + pv114: STRING_ALL, PV1.14 + pv136: STRING_ALL, PV1.36 + pv137: STRING_ALL, PV1.37 + pv138: STRING_ALL, PV1.38 + condition: $pv15 NOT_NULL || $pv113 NOT_NULL || $pv114 NOT_NULL || $pv116 NOT_NULL || $pv136 NOT_NULL || $pv137 NOT_NULL || $pv138 NOT_NULL + expressionType: nested + expressionsMap: + preAdmissionIdentifier: + condition: $pv15 NOT_NULL + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + specs: PV1.5 + admitSource: + condition: $pv114 NOT_NULL + type: STRING + valueOf: PV1.14 + expressionType: HL7Spec + dischargeDisposition: + condition: $pv136 NOT_NULL + type: STRING + valueOf: PV1.36 + expressionType: HL7Spec + destination: + condition: $pv137 NOT_NULL + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/DLD/Location + specs: PV1.37 + dietPreference: + condition: $pv138 NOT_NULL + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: PV1.38 + +serviceType: + condition: $pv110 NOT_NULL + vars: + pv110: PV1.10 + type: STRING + valueOf: PV1.10 + expressionType: HL7Spec + +identifier: + expressionType: nested + generateList: true + expressions: + - vars: + pv119: STRING_ALL, PV1.19 + condition: $pv119 NOT_NULL + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + specs: PV1.19 * + generateList: true + constants: + code: "VN" + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + CXIdentifierText: "visit number" + CXIdentifierField: PV1.19 + - vars: + pv150: STRING_ALL, PV1.50 + condition: $pv150 NOT_NULL + expressionType: resource + specs: PV1.50 * + generateList: true + valueOf: ../../datatypes/v251/hl7/datatypes/CX/Identifier + constants: + CXIdentifierField: PV1.50 + system: "http://terminology.hl7.org/CodeSystem/v2-0203" + +period: + expressionType: nested + vars: + pv144: STRING, PV1.44 + pv145: STRING, PV1.45 + expressionsMap: + start: + valueOf: "GeneralUtils.dateTimeWithZoneId(pv144,ZONEID)" + expressionType: JEXL + _start: + expressionType: nested + condition: $pv144 NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: PV1.44 + expressionType: HL7Spec + end: + valueOf: "GeneralUtils.dateTimeWithZoneId(pv145,ZONEID)" + expressionType: JEXL + _end: + expressionType: nested + condition: $pv145 NOT_NULL + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: PV1.45 + expressionType: HL7Spec + +extension: + generateList: true + expressionType: nested + expressions: + - vars: + pv240: STRING_ALL, PV2.40 + condition: $pv240 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: admission-level-of-care + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + specs: PV2.40 + # # PV1 Data + - expressionType: resource + valueOf: segments/PV1/PV1Extension + # # PV2 Data + - expressionType: resource + valueOf: segments/PV1/PV2Extension + + +subject: + valueOf: datatype/Reference + expressionType: resource + specs: $Patient + + diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV1Extension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV1Extension.yml new file mode 100644 index 00000000000..8eb572d4e8f --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV1Extension.yml @@ -0,0 +1,190 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: pv1-patient-visit + +extension: + expressionType: nested + generateList: true + expressions: + - vars: + pv112: STRING_ALL, PV1.12 + condition: $pv112 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.12 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.12 + - vars: + pv118: STRING_ALL, PV1.18 + condition: $pv118 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.18 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.18 + - vars: + pv130: STRING_ALL, PV1.30 + condition: $pv130 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.30 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.30 + - vars: + pv131: STRING_ALL, PV1.31 + condition: $pv131 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.31 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.31 + - vars: + pv132: STRING_ALL, PV1.32 + condition: $pv132 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.32 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.32 + - vars: + pv133: STRING_ALL, PV1.33 + condition: $pv133 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.33 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.33 + - vars: + pv134: STRING_ALL, PV1.34 + condition: $pv134 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.34 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.34 + - vars: + pv135: STRING, PV1.35 + condition: $pv135 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.35 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.35 + - vars: + pv139: STRING_ALL, PV1.39 + condition: $pv139 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.39 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.39 + - vars: + pv141: STRING_ALL, PV1.41 + condition: $pv141 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.41 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.41 + - vars: + pv146: STRING_ALL, PV1.46 + condition: $pv146 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.46 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.46 + - vars: + pv147: STRING_ALL, PV1.47 + condition: $pv147 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.47 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.47 + - vars: + pv148: STRING_ALL, PV1.48 + condition: $pv148 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.48 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.48 + - vars: + pv149: STRING_ALL, PV1.49 + condition: $pv149 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.49 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: PV1.49 + - vars: + pv151: STRING_ALL, PV1.51 + condition: $pv151 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV1.51 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV1.51 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV2Extension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV2Extension.yml new file mode 100644 index 00000000000..27eeb7705fe --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/PV1/PV2Extension.yml @@ -0,0 +1,59 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: pv2-patient-visit-additional-information + +extension: + expressionType: nested + generateList: true + expressions: + - vars: + pv215: STRING_ALL, PV2.15 + condition: $pv215 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV2.15 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV2.15 + - vars: + pv223: STRING_ALL, PV2.23 + condition: $pv223 NOT_NULL + expressionType: nested + specs: PV2.23 * + generateList: true + expressionsMap: + url: + type: STRING + value: PV2.23 + valueReference: + expressionType: reference + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + - vars: + pv226: STRING_ALL, PV2.26 + condition: $pv226 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV2.26 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV2.26 + - vars: + pv229: STRING_ALL, PV2.29 + condition: $pv229 NOT_NULL + expressionType: nested + expressionsMap: + url: + type: STRING + value: PV2.29 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: PV2.29 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/SFT/Device.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/SFT/Device.yml new file mode 100644 index 00000000000..d85fdf51b87 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/SFT/Device.yml @@ -0,0 +1,110 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Device + +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +manufacturer: + expressionType: nested + vars: + xon1: SFT.1.1 + xon10: SFT.1.10 + expressions: + - condition: $xon1 NOT_NULL + type: String + expressionType: HL7Spec + valueOf: $xon1 + - condition: $xon1 NULL && $xon10 NOT_NULL + type: String + expressionType: HL7Spec + valueOf: $xon10 + +version: + expressionType: nested + expressionsMap: + value: + condition: $sft2 NOT_NULL + vars: + sft2: SFT.2 + type: String + expressionType: HL7Spec + valueOf: $sft2 + extension: + generateList: true + expressionType: nested + condition: $dateTimeIn NOT_NULL + vars: + dateTimeIn: SFT.6, GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID) + hl7Date: SFT.6 + expressionsMap: + url: + type: SYSTEM_URL + value: software-install-date + valueDateTime: + valueOf: $dateTimeIn + expressionType: HL7Spec + _valueDateTime: + expressionType: nested + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $hl7Date + expressionType: HL7Spec + +deviceName: + expressionType: nested + condition: $sft3 NOT_NULL + vars: + sft3: SFT.3 + expressionsMap: + name: + type: String + expressionType: HL7Spec + valueOf: $sft3 + type: + type: String + value: "manufacturer-name" + +modelNumber: + condition: $sft4 NOT_NULL + vars: + sft4: SFT.4 + type: String + expressionType: HL7Spec + valueOf: $sft4 + +note: + expressionType: nested + condition: $sft5 NOT_NULL + vars: + sft5: SFT.5 + expressionsMap: + text: + type: String + expressionType: HL7Spec + valueOf: $sft5 + +extension: + expressionType: nested + vars: + sft1: STRING_ALL, SFT.1 + condition: $sft1 NOT_NULL + generateList: true + expressionsMap: + url: + type: SYSTEM_URL + value: software-vendor-org + valueReference: + valueOf: ../../datatypes/v251/hl7/datatypes/XON/Organization + expressionType: reference + specs: SFT.1 \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/EIP/Specimen.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/EIP/Specimen.yml new file mode 100644 index 00000000000..a92c289dfcd --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/EIP/Specimen.yml @@ -0,0 +1,28 @@ +# $schema: ./../../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Specimen +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + vars: + eip1: EIP.1 + eip2: EIP.2 + generateList: true + expressionType: nested + specs: EIP * + expressions: + - condition: $eip1 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier + expressionType: resource + constants: + hl7Use: "specimen-id-placer" + backupExtension: "filler-assigned-identifier" + - condition: $eip2 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier + expressionType: resource + constants: + hl7Use: "specimen-id-filler" + backupExtension: "placer-assigned-identifier" \ No newline at end of file diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/SPMExtension.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/SPMExtension.yml new file mode 100644 index 00000000000..70159907711 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/SPMExtension.yml @@ -0,0 +1,237 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: spm-specimen + +extension: + generateList: true + expressionType: nested + expressions: + - expressionType: nested + vars: + spm31: SPM.3.1 + condition: $spm31 NOT_NULL + specs: SPM.3 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.3.1 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier + expressionType: resource + constants: + hl7v2Field: SPM.3 + backupExtension: "filler-assigned-identifier" + - expressionType: nested + vars: + spm32: SPM.3.2 + condition: $spm32 NOT_NULL + specs: SPM.3 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.3.2 + valueIdentifier: + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier + expressionType: resource + constants: + hl7v2Field: SPM.3 + backupExtension: "placer-assigned-identifier" + - expressionType: nested + vars: + spm5: SPM.5 + condition: $spm5 NOT_NULL + specs: SPM.5 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.5 + valueCodeableConcept: + expressionType: resource + valueOf: datatypes/CWE_ELR/CodeableConcept + - expressionType: nested + vars: + spm6: SPM.6 + condition: $spm6 NOT_NULL + specs: SPM.6 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.6 + valueCodeableConcept: + expressionType: resource + valueOf: datatypes/CWE_ELR/CodeableConcept + - expressionType: nested + vars: + spm10: SPM.10 + condition: $spm10 NOT_NULL + specs: SPM.10 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.10 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm11: SPM.11 + condition: $spm11 NOT_NULL + specs: SPM.11 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.11 + valueCodeableConcept: + expressionType: resource + valueOf: datatypes/CWE_ELR/CodeableConcept + - expressionType: nested + vars: + spm13: SPM.13 + condition: $spm13 NOT_NULL + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.13 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SPM.13 + - expressionType: nested + vars: + spm15: SPM.15 + condition: $spm15 NOT_NULL + specs: SPM.15 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.15 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm16: SPM.16 + condition: $spm16 NOT_NULL + specs: SPM.16 * + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.16 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm19: SPM.19 + condition: $spm19 NOT_NULL + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.19 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SPM.19 + - expressionType: nested + vars: + spm20: SPM.20 + condition: $spm20 NOT_NULL + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.20 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SPM.20 + - expressionType: nested + vars: + spm22: SPM.22 + condition: $spm22 NOT_NULL + specs: SPM.22 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.22 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm23: SPM.23 + condition: $spm23 NOT_NULL + specs: SPM.23 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.23 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm25: SPM.25 + condition: $spm25 NOT_NULL + specs: SPM.25 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.25 + valueQuantity: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CQ/Quantity + - expressionType: nested + vars: + spm26: SPM.26 + condition: $spm26 NOT_NULL + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.26 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: SPM.26 + - expressionType: nested + vars: + spm28: SPM.28 + condition: $spm28 NOT_NULL + specs: SPM.28 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.28 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + - expressionType: nested + vars: + spm29: SPM.29 + condition: $spm29 NOT_NULL + specs: SPM.29 + generateList: true + expressionsMap: + url: + type: STRING + value: SPM.29 + valueCodeableConcept: + expressionType: resource + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept diff --git a/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/Specimen.yml b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/Specimen.yml new file mode 100644 index 00000000000..b01680278a4 --- /dev/null +++ b/prime-router/metadata/HL7/v251-elr/hl7/segments/SPM/Specimen.yml @@ -0,0 +1,232 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +resourceType: Specimen +id: + type: STRING + valueOf: "GeneralUtils.generateResourceId()" + expressionType: JEXL + +identifier: + vars: + spm2: SPM.2 + generateList: true + expressionType: nested + expressions: + - condition: $spm21 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-PlacerAssignedIdentifier + expressionType: resource + specs: SPM.2 + vars: + spm21: SPM.2.1 + constants: + hl7v2Component: SPM.2.1 + backupExtension: "filler-assigned-identifier" + - condition: $spm22 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/EIP/Identifier-FillerAssignedIdentifier + expressionType: resource + specs: SPM.2 + vars: + spm22: SPM.2.2 + constants: + hl7v2Component: SPM.2.2 + backupExtension: "placer-assigned-identifier" + +parent: + condition: $spm3 NOT_NULL + valueOf: segments/SPM/EIP/Specimen + expressionType: reference + vars: + spm3: SPM.3 + specs: SPM.3 * + +type: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: SPM.4 + +container: + condition: $spm6 NOT_NULL || $spm27 NOT_NULL + expressionType: nested + generateList: true + vars: + spm6: SPM.6 + spm27: SPM.27 + expressionsMap: + additiveCodeableConcept: + expressionType: nested + expressions: + - condition: $spm6 NOT_NULL + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: SPM.6 * + type: + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + specs: SPM.27 + +collection: + condition: $spm7 NOT_NULL || $spm8 NOT_NULL || $spm9 NOT_NULL || $spm12 NOT_NULL || $spm17 NOT_NULL + expressionType: nested + generateList: true + vars: + spm7: SPM.7 + spm8: SPM.8 + spm9: SPM.9 + spm12: SPM.12 + spm17: SPM.17 + expressionsMap: + method: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: SPM.7 + bodySite: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + specs: SPM.8 + extension: + condition: $spm9 NOT_NULL + expressionType: nested + generateList: true + specs: SPM.9 * + expressionsMap: + url: + type: SYSTEM_URL + value: bodySiteModifier + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + quantity: + valueOf: datatypes/CQ_ELR/Quantity + expressionType: resource + specs: SPM.12 + collectedPeriod: + expressionType: nested + vars: + spm17: SPM.17 + expressions: + - condition: $end NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/DR/Period + expressionType: resource + specs: SPM.17 + vars: + start: SPM.17.1 + end: SPM.17.2 + dateTimeIn: SPM.17.1 + dateTimeOut: SPM.17.2 + collectedDateTime: + expressionType: nested + expressions: + - condition: $end NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: SPM.17.1 + end: SPM.17.2 + _collectedDateTime: + condition: $dateTimeIn NOT_NULL && $end NULL + expressionType: nested + vars: + dateTimeIn: SPM.17.1 + end: SPM.17.2 + expressionsMap: + extension_1: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $dateTimeIn + expressionType: HL7Spec + +note: + condition: $spm14 NOT_NULL + expressionType: nested + generateList: true + vars: + spm14: STRING_ALL, SPM.14 + specs: SPM.14 * + expressionsMap: + text: + type: STRING + valueOf: ST + expressionType: HL7Spec + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + valueOf: SPM.14 + +receivedTime: + condition: $dateTimeIn NOT_NULL + type: STRING + valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)" + expressionType: JEXL + vars: + dateTimeIn: SPM.18.1 +_receivedTime: + condition: $dateTimeIn NOT_NULL + expressionType: nested + vars: + dateTimeIn: SPM.18.1 + expressionsMap: + extension: + generateList: true + expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2-date-time + valueString: + type: STRING + valueOf: $dateTimeIn + expressionType: HL7Spec + +status: + type: SPECIMEN_STATUS + valueOf: SPM.20 + expressionType: HL7Spec + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + valueOf: hl7v2Segment + valueString: + valueOf: 'SPM' + - expressionType: resource + valueOf: segments/SPM/SPMExtension + - expressionType: nested + condition: $spm21 NOT_NULL + generateList: true + vars: + spm21: SPM.21 + specs: SPM.21 * + expressionsMap: + url: + type: SYSTEM_URL + value: reject-reason + valueCodeableConcept: + valueOf: datatypes/CWE_ELR/CodeableConcept + expressionType: resource + +condition: + vars: + spm24: SPM.24 + condition: $spm24 NOT_NULL + valueOf: ../../datatypes/v251/hl7/datatypes/CWE/CodeableConcept + expressionType: resource + generateList: true + specs: SPM.24 * diff --git a/prime-router/settings/STLTs/NJ/nj-doh.yml b/prime-router/settings/STLTs/NJ/nj-doh.yml deleted file mode 100644 index bbd289a2f63..00000000000 --- a/prime-router/settings/STLTs/NJ/nj-doh.yml +++ /dev/null @@ -1,110 +0,0 @@ -- name: "nj-doh" - description: "New Jersey Department of Health" - jurisdiction: "STATE" - stateCode: "NJ" - countyName: null - filters: null - featureFlags: null - keys: null - senders: [] - receivers: - - name: "full-elr" - organizationName: "nj-doh" - topic: "full-elr" - customerStatus: "active" - translation: ! - schemaName: "azure:/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml" - useTestProcessingMode: false - useBatchHeaders: true - receivingApplicationName: "ELRS" - receivingApplicationOID: "2.16.840.1.113883.3.1299.5.1.6.1" - receivingFacilityName: "NJDOH" - receivingFacilityOID: "2.16.840.1.113883.3.1299" - messageProfileId: null - replaceValue: { } - replaceValueAwithB: { } - reportingFacilityName: null - reportingFacilityId: null - reportingFacilityIdType: null - suppressQstForAoe: false - suppressHl7Fields: null - suppressAoe: false - defaultAoeToUnknown: false - replaceUnicodeWithAscii: false - useBlankInsteadOfUnknown: null - truncateHDNamespaceIds: true - truncateHl7Fields: "OBX-23-1,ORC-12-3,OBR-16-3,OBX-17-1,ORC-12-1,OBR-16-1" - usePid14ForPatientEmail: false - convertTimestampToDateTime: null - cliaForOutOfStateTesting: null - cliaForSender: { } - phoneNumberFormatting: "STANDARD" - suppressNonNPI: false - processingModeCode: null - replaceDiiWithOid: null - applyOTCDefault: false - useOrderingFacilityName: "STANDARD" - valueSetOverrides: { } - nameFormat: "STANDARD" - receivingOrganization: null - convertPositiveDateTimeOffsetToNegative: false - stripInvalidCharsRegex: null - convertDateTimesToReceiverLocalTime: false - useHighPrecisionHeaderDateTimeFormat: false - type: "HL7" - truncationConfig: - truncateHDNamespaceIds: true - truncateHl7Fields: - - "OBX-23-1" - - "ORC-12-3" - - "OBR-16-3" - - "OBX-17-1" - - "ORC-12-1" - - "OBR-16-1" - customLengthHl7Fields: { } - jurisdictionalFilter: - - "(Bundle.entry.resource.ofType(ServiceRequest)[0].requester.resolve().organization.resolve().address.state.exists() and Bundle.entry.resource.ofType(ServiceRequest)[0].requester.resolve().organization.resolve().address.state = 'NJ') or (Bundle.entry.resource.ofType(Patient).address.state.exists() and Bundle.entry.resource.ofType(Patient).address.state = 'NJ')" - qualityFilter: - # hasOneOf(patient_street, patient_zip_code, patient_phone_number, patient_email) - - "Bundle.entry.resource.ofType(Patient).where(address.line[0].empty() and address.postalCode.empty() and telecom.where(system = 'phone').value.empty() and telecom.where(system = 'email').value.empty()).count() = 0" - # hasOneOf(order_test_date, specimen_collection_date_time, test_result_date) - - "Bundle.entry.resource.ofType(DiagnosticReport).where(basedOn.resolve().extension('https://reportstream.cdc.gov/fhir/StructureDefinition/effective-date').empty() and specimen.resolve().collection.collected.empty() and effective.empty() and issued.empty() and result.resolve().effective.empty()).count() = 0" - # isValidClia(testing_lab_clia) - - "Bundle.entry.resource.ofType(ServiceRequest).performer.resolve().identifier.where(type.coding.code = 'CLIA').value.getIdType() = 'CLIA'" - # hasValidData(patient_last_name, patient_first_name, patient_dob) - - "Bundle.entry.resource.ofType(Patient).where(name.family.empty() or name.given.empty() or birthDate.empty()).count() = 0" - # hasValidData(specimen_type) - - "Bundle.entry.resource.ofType(Specimen).where(type.empty()).count() = 0" - # hasValidData(message_id) - - "Bundle.identifier.value.empty().not()" - # hasValidData(equipment_model_name, test_result) - - "Bundle.entry.resource.ofType(DiagnosticReport).result.resolve().where(method.empty() or value.coding.code.empty()).count() = 0" - routingFilter: [ ] - processingModeFilter: - # matches(processing_mode_code, P) - - "Bundle.entry.resource.ofType(MessageHeader).meta.tag.where(system = 'http://terminology.hl7.org/CodeSystem/v2-0103').code = 'P'" - reverseTheQualityFilter: false - deidentify: false - deidentifiedValue: "" - timing: - operation: "MERGE" - numberPerDay: 1440 - initialTime: "09:40" - timeZone: "EASTERN" - maxReportCount: 100 - whenEmpty: - action: "NONE" - onlyOncePerDay: false - description: "" - transport: ! - type: SFTP - host: sftp - port: 22 - filePath: ./upload - credentialName: DEFAULT-SFTP - conditionFilter: [ ] - mappedConditionFilter: [ ] - externalName: null - enrichmentSchemaNames: ["classpath:/metadata/fhir_transforms/common/suppress-device-information.yml" ] - timeZone: null - dateTimeFormat: "OFFSET" diff --git a/prime-router/settings/STLTs/Oracle/oracle-rln.yml b/prime-router/settings/STLTs/Oracle/oracle-rln.yml index bc6b9639009..150e2a1126b 100644 --- a/prime-router/settings/STLTs/Oracle/oracle-rln.yml +++ b/prime-router/settings/STLTs/Oracle/oracle-rln.yml @@ -45,21 +45,9 @@ initialTime: "00:00" timeZone: "EASTERN" maxReportCount: 100 - description: "" transport: - reportUrl: "https://spaces.erxhubdevcert.cerner.com/etor" - authTokenUrl: "" - encryptionKeyUrl: "" - authType: "apiKey" - tlsKeystore: null - parameters: {} - jwtParams: {} - headers: - Content-Type: "text/plain" - shared-api-key: "From Vault" - authHeaders: {} - type: "REST" - externalName: null - enrichmentSchemaNames: [] - timeZone: null - dateTimeFormat: "OFFSET" + type: "SFTP" + host: "172.17.6.20" + port: 22 + filePath: "./upload" + credentialName: null diff --git a/prime-router/src/main/kotlin/ActionMessages.kt b/prime-router/src/main/kotlin/ActionMessages.kt index 407d4006616..104c28d480c 100644 --- a/prime-router/src/main/kotlin/ActionMessages.kt +++ b/prime-router/src/main/kotlin/ActionMessages.kt @@ -46,7 +46,6 @@ enum class ErrorCode { INVALID_MSG_VALIDATION, INVALID_MSG_CONVERSION, UNKNOWN, - SETTINGS_NOT_FOUND, } /** diff --git a/prime-router/src/main/kotlin/JOOQBindings.kt b/prime-router/src/main/kotlin/JOOQBindings.kt index 3acbca6d7db..a3a3a5b3c97 100644 --- a/prime-router/src/main/kotlin/JOOQBindings.kt +++ b/prime-router/src/main/kotlin/JOOQBindings.kt @@ -84,12 +84,15 @@ class ActionLogDetailBinding : JsonBinding(ActionLogDetail::cla class TopicConverter : Converter { private val mapper = JacksonMapperUtilities.defaultMapper - override fun from(dbObject: String?): Topic? = - dbObject?.takeIf { it.isNotBlank() }?.let { - mapper.convertValue(TextNode(it), Topic::class.java) - } + override fun from(dbObject: String): Topic { + // Can't use Topic.valueOf, since string form and enum name are different + // i.e. `full-elr` vs `FULL_ELR` + return mapper.convertValue(TextNode(dbObject), Topic::class.java) + } - override fun to(topic: Topic?): String? = topic?.jsonVal + override fun to(topic: Topic): String { + return topic.jsonVal + } override fun fromType(): Class { return String::class.java diff --git a/prime-router/src/main/kotlin/MimeFormat.kt b/prime-router/src/main/kotlin/MimeFormat.kt index 7fe35a9e96c..34ff99c9bdc 100644 --- a/prime-router/src/main/kotlin/MimeFormat.kt +++ b/prime-router/src/main/kotlin/MimeFormat.kt @@ -3,31 +3,17 @@ package gov.cdc.prime.router import ca.uhn.fhir.rest.api.Constants.CT_FHIR_NDJSON import ca.uhn.fhir.rest.api.Constants.CT_TEXT_CSV -/** - * Enum class representing different MIME formats used in the system. - * Each format has an associated file extension, MIME type, and a flag indicating whether it's a single item format. - * - * @property ext The file extension associated with the format. - * @property mimeType The MIME type associated with the format. - * @property isSingleItemFormat A flag indicating whether the format is for single item serialization. - */ enum class MimeFormat(val ext: String, val mimeType: String, val isSingleItemFormat: Boolean = false) { INTERNAL("internal.csv", CT_TEXT_CSV), // A format that serializes all elements of a Report.kt (in CSV) - CSV("csv", CT_TEXT_CSV), // A CSV format that follows the csvFields - CSV_SINGLE("csv", CT_TEXT_CSV, true), // A CSV format for single item serialization - HL7("hl7", "application/hl7-v2", true), // HL7 format with one result per file - HL7_BATCH("hl7", "application/hl7-v2"), // HL7 format with BHS and FHS headers - FHIR("fhir", CT_FHIR_NDJSON), // FHIR format with NDJSON MIME type + CSV("csv", CT_TEXT_CSV), // A CSV format the follows the csvFields + CSV_SINGLE("csv", CT_TEXT_CSV, true), + HL7("hl7", "application/hl7-v2", true), // HL7 with one result per file + HL7_BATCH("hl7", "application/hl7-v2"), // HL7 with BHS and FHS headers + FHIR("fhir", CT_FHIR_NDJSON), ; companion object { - /** - * Safely returns the MIME format corresponding to the provided string. - * Defaults to CSV if the string is null or cannot be matched to a known format. - * - * @param formatStr The string representation of the format. - * @return The corresponding MimeFormat, or CSV if the input is invalid. - */ + // Default to CSV if weird or unknown fun safeValueOf(formatStr: String?): MimeFormat = try { valueOf(formatStr ?: "CSV") } catch (e: IllegalArgumentException) { @@ -35,11 +21,7 @@ enum class MimeFormat(val ext: String, val mimeType: String, val isSingleItemFor } /** - * Returns the MIME format based on the provided file extension, ignoring case. - * - * @param ext The file extension. - * @return The corresponding MimeFormat. - * @throws IllegalArgumentException If the extension does not match any known format. + * Returns a Format based on the [ext] provided, ignoring case. */ fun valueOfFromExt(ext: String): MimeFormat = when (ext.lowercase()) { HL7.ext.lowercase() -> HL7 @@ -48,24 +30,6 @@ enum class MimeFormat(val ext: String, val mimeType: String, val isSingleItemFor else -> throw IllegalArgumentException("Unexpected extension $ext.") } - /** - * Returns the MIME format corresponding to the provided string, ignoring case. - * - * @param bodyFormat The string representation of the format. - * @return The corresponding MimeFormat. - */ fun valueOfIgnoreCase(bodyFormat: String): MimeFormat = valueOf(bodyFormat.uppercase()) - - /** - * Returns the MIME format based on the provided MIME type. - * - * @param mimeType The MIME type. - * @return The corresponding MimeFormat. - * @throws IllegalArgumentException If the MIME type does not match any known format. - */ - fun valueOfFromMimeType(mimeType: String): MimeFormat { - return entries.find { it.mimeType == mimeType } - ?: throw IllegalArgumentException("Unexpected MIME type $mimeType.") - } } } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/Report.kt b/prime-router/src/main/kotlin/Report.kt index 73fe5cc48bd..6408345e774 100644 --- a/prime-router/src/main/kotlin/Report.kt +++ b/prime-router/src/main/kotlin/Report.kt @@ -350,10 +350,8 @@ class Report : Logging { destination: Receiver? = null, nextAction: TaskAction = TaskAction.process, topic: Topic, - id: UUID = UUID.randomUUID(), - bodyURL: String = "", ) { - this.id = id + this.id = UUID.randomUUID() // UP submissions do not need a schema, but it is required by the database to maintain legacy functionality this.schema = Schema("None", topic) this.sources = sources @@ -367,7 +365,6 @@ class Report : Logging { this.metadata = metadata ?: Metadata.getInstance() this.itemCountBeforeQualFilter = numberOfMessages this.nextAction = nextAction - this.bodyURL = bodyURL } data class ParentItemLineageData(val parentReportId: UUID, val parentReportIndex: Int) @@ -684,12 +681,11 @@ class Report : Logging { // to reliably shuffle against. because shuffling is pseudo-random, it's possible that // with something below a threshold we could end up leaking PII, therefore // ignore the call to shuffle and just fake it - val synthesizeStrategy = - if (itemCount < SHUFFLE_THRESHOLD && strategy == SynthesizeStrategy.SHUFFLE) { - SynthesizeStrategy.FAKE - } else { - strategy - } + val synthesizeStrategy = if (itemCount < SHUFFLE_THRESHOLD && strategy == SynthesizeStrategy.SHUFFLE) { + SynthesizeStrategy.FAKE + } else { + strategy + } // look in the mapping parameter passed in for the current element when (synthesizeStrategy) { // examine the synthesizeStrategy for the field diff --git a/prime-router/src/main/kotlin/SubmissionReceiver.kt b/prime-router/src/main/kotlin/SubmissionReceiver.kt index d9cc88a1e5b..2881b35f340 100644 --- a/prime-router/src/main/kotlin/SubmissionReceiver.kt +++ b/prime-router/src/main/kotlin/SubmissionReceiver.kt @@ -1,17 +1,20 @@ package gov.cdc.prime.router -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage +import ca.uhn.hl7v2.model.Message import gov.cdc.prime.router.azure.ActionHistory +import gov.cdc.prime.router.azure.BlobAccess import gov.cdc.prime.router.azure.Event import gov.cdc.prime.router.azure.ProcessEvent import gov.cdc.prime.router.azure.ReportWriter import gov.cdc.prime.router.azure.WorkflowEngine import gov.cdc.prime.router.azure.db.enums.TaskAction import gov.cdc.prime.router.fhirengine.engine.FhirConvertQueueMessage -import gov.cdc.prime.router.fhirengine.engine.MessageType +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.fhirengine.utils.HL7Reader +import ca.uhn.hl7v2.model.v251.segment.MSH as v251_MSH +import ca.uhn.hl7v2.model.v27.segment.MSH as v27_MSH +import fhirengine.translation.hl7.structures.nistelr251.segment.MSH as NIST_MSH /** * The base class for a 'receiver' type, currently just for COVID or full ELR submissions. This allows us a fan out @@ -292,10 +295,7 @@ class UniversalPipelineReceiver : SubmissionReceiver { // } // check for valid message type - messages.forEachIndexed { - idx, element -> - MessageType.validateMessageType(element, actionLogs, idx + 1) - } + messages.forEachIndexed { idx, element -> checkValidMessageType(element, actionLogs, idx + 1) } } MimeFormat.FHIR -> { @@ -355,7 +355,7 @@ class UniversalPipelineReceiver : SubmissionReceiver { FhirConvertQueueMessage( report.id, blobInfo.blobUrl, - BlobUtils.digestToString(blobInfo.digest), + BlobAccess.digestToString(blobInfo.digest), sender.fullName, sender.topic, sender.schemaName @@ -365,4 +365,28 @@ class UniversalPipelineReceiver : SubmissionReceiver { return report } + + enum class MessageType { + ORU_R01, + ORM_O01, + OML_O21, + } + + /** + * Checks that a [message] is of the supported type(s), and uses the [actionLogs] to add an error + * message for item with index [itemIndex] if it is not. + */ + internal fun checkValidMessageType(message: Message, actionLogs: ActionLogger, itemIndex: Int) { + val messageType = when (val msh = message.get("MSH")) { + is NIST_MSH -> msh.messageType.messageStructure.toString() + is v251_MSH -> msh.messageType.messageStructure.toString() + is v27_MSH -> msh.messageType.messageStructure.toString() + else -> "" + } + + if (!MessageType.values().map { it.toString() }.contains(messageType)) { + actionLogs.getItemLogger(itemIndex) + .error(InvalidHL7Message("Ignoring unsupported HL7 message type $messageType")) + } + } } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/azure/ActionHistory.kt b/prime-router/src/main/kotlin/azure/ActionHistory.kt index de7a0f0a053..60be7928007 100644 --- a/prime-router/src/main/kotlin/azure/ActionHistory.kt +++ b/prime-router/src/main/kotlin/azure/ActionHistory.kt @@ -384,7 +384,7 @@ class ActionHistory( */ fun trackExistingInputReport(reportId: ReportId) { if (isReportAlreadyTracked(reportId)) { - error("Bug: attempt to track history of a report ($reportId) we've already associated with this action") + error("Bug: attempt to track history of a report ($reportId) we've already associated with this action") } val reportFile = ReportFile() reportFile.reportId = reportId @@ -394,13 +394,9 @@ class ActionHistory( /** * Use this to record history info about a new externally submitted report. */ - fun trackExternalInputReport( - report: Report, - blobInfo: BlobAccess.BlobInfo, - payloadName: String? = null, - ) { + fun trackExternalInputReport(report: Report, blobInfo: BlobAccess.BlobInfo, payloadName: String? = null) { if (isReportAlreadyTracked(report.id)) { - error("Bug: attempt to track history of a report ($report.id) we've already associated with this action") + error("Bug: attempt to track history of a report ($report.id) we've already associated with this action") } val reportFile = ReportFile() diff --git a/prime-router/src/main/kotlin/azure/BlobAccess.kt b/prime-router/src/main/kotlin/azure/BlobAccess.kt index 8b88fbcf017..4c76f41520b 100644 --- a/prime-router/src/main/kotlin/azure/BlobAccess.kt +++ b/prime-router/src/main/kotlin/azure/BlobAccess.kt @@ -11,8 +11,6 @@ import com.azure.storage.blob.models.BlobListDetails import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.blob.models.DownloadRetryOptions import com.azure.storage.blob.models.ListBlobsOptions -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.BlobUtils.sha256Digest import gov.cdc.prime.router.BlobStoreTransportType import gov.cdc.prime.router.MimeFormat import gov.cdc.prime.router.Report @@ -26,6 +24,7 @@ import java.io.File import java.net.URL import java.net.URLDecoder import java.nio.charset.Charset +import java.security.MessageDigest import java.time.Duration const val defaultBlobContainerName = "reports" @@ -135,7 +134,7 @@ class BlobAccess() : Logging { companion object : Logging { private const val defaultBlobDownloadRetryVar = "AzureBlobDownloadRetryCount" - private val defaultEnvVar = Environment.get().storageEnvVar + private val defaultEnvVar = Environment.get().blobEnvVar val defaultBlobMetadata by lazy { BlobContainerMetadata.build( defaultBlobContainerName, @@ -323,21 +322,6 @@ class BlobAccess() : Logging { } } - /** - * Download the file associated with a RawSubmission message - */ - fun downloadBlob( - blobUrl: String, - digest: String, - ): String { - val blobContent = downloadBlobAsByteArray(blobUrl) - val localDigest = BlobUtils.digestToString(sha256Digest(blobContent)) - check(digest == localDigest) { - "Downloaded file does not match expected file\n$digest | $localDigest" - } - return String(blobContent) - } - /** * Download the blob at the given [blobUrl] as a ByteArray */ @@ -519,5 +503,28 @@ class BlobAccess() : Logging { containerClient } } + + /** + * Create a hex string style of a digest. + */ + fun digestToString(digest: ByteArray): String { + return digest.joinToString(separator = "", limit = 40) { Integer.toHexString(it.toInt()) } + } + + /** + * Hash a ByteArray [input] with SHA 256 + */ + fun sha256Digest(input: ByteArray): ByteArray { + return hashBytes("SHA-256", input) + } + + /** + * Hash a ByteArray [input] with method [type] + */ + private fun hashBytes(type: String, input: ByteArray): ByteArray { + return MessageDigest + .getInstance(type) + .digest(input) + } } } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/azure/Event.kt b/prime-router/src/main/kotlin/azure/Event.kt index cffcc485973..6d326507358 100644 --- a/prime-router/src/main/kotlin/azure/Event.kt +++ b/prime-router/src/main/kotlin/azure/Event.kt @@ -5,8 +5,8 @@ import gov.cdc.prime.router.Options import gov.cdc.prime.router.azure.db.enums.TaskAction import gov.cdc.prime.router.common.JacksonMapperUtilities import gov.cdc.prime.router.fhirengine.engine.BatchEventQueueMessage -import gov.cdc.prime.router.fhirengine.engine.PrimeRouterQueueMessage import gov.cdc.prime.router.fhirengine.engine.ProcessEventQueueMessage +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.engine.ReportEventQueueMessage import gov.cdc.prime.router.transport.RetryToken import java.time.OffsetDateTime @@ -101,8 +101,10 @@ abstract class Event(val eventAction: EventAction, val at: OffsetDateTime?) { } companion object { - fun parsePrimeRouterQueueMessage(event: String): Event { - return when (val message = JacksonMapperUtilities.defaultMapper.readValue(event)) { + fun parseQueueMessage(event: String): Event { + val message = JacksonMapperUtilities.defaultMapper.readValue(event) + + return when (message) { is ReportEventQueueMessage -> { val at = if (message.at.isNotEmpty()) { OffsetDateTime.parse(message.at) @@ -266,7 +268,7 @@ class BatchEvent( // this should say 'batch' but will break production on deploy if there is anything in the batch queue // when it goes to prod. This value is used only to queue and dequeue message types - // (toQueueMessage, parsePrimeRouterQueueMessage) + // (toQueueMessage, parseQueueMessage) companion object { const val eventType = "receiver" } diff --git a/prime-router/src/main/kotlin/azure/ProcessFunction.kt b/prime-router/src/main/kotlin/azure/ProcessFunction.kt index eca77db3234..76203c7a6f7 100644 --- a/prime-router/src/main/kotlin/azure/ProcessFunction.kt +++ b/prime-router/src/main/kotlin/azure/ProcessFunction.kt @@ -28,7 +28,7 @@ class ProcessFunction : Logging { try { workflowEngine = WorkflowEngine() - event = Event.parsePrimeRouterQueueMessage(message) as ProcessEvent + event = Event.parseQueueMessage(message) as ProcessEvent if (event.eventAction != Event.EventAction.PROCESS) { logger.error("Process function received a message of the incorrect type: $message") diff --git a/prime-router/src/main/kotlin/azure/QueueAccess.kt b/prime-router/src/main/kotlin/azure/QueueAccess.kt index 7591d7e0952..4ea96bf8d77 100644 --- a/prime-router/src/main/kotlin/azure/QueueAccess.kt +++ b/prime-router/src/main/kotlin/azure/QueueAccess.kt @@ -78,7 +78,7 @@ object QueueAccess { fun receiveMessage(queueName: String): Event { // messageText is deprecated val message = createQueueClient(queueName).receiveMessage().body.toString() - return Event.parsePrimeRouterQueueMessage(message) + return Event.parseQueueMessage(message) } /** diff --git a/prime-router/src/main/kotlin/azure/ReportFunction.kt b/prime-router/src/main/kotlin/azure/ReportFunction.kt index 65c5aaed0aa..99168f9f3d9 100644 --- a/prime-router/src/main/kotlin/azure/ReportFunction.kt +++ b/prime-router/src/main/kotlin/azure/ReportFunction.kt @@ -18,7 +18,6 @@ import gov.cdc.prime.router.ActionLogLevel import gov.cdc.prime.router.InvalidParamMessage import gov.cdc.prime.router.InvalidReportMessage import gov.cdc.prime.router.Options -import gov.cdc.prime.router.ReportId import gov.cdc.prime.router.Sender import gov.cdc.prime.router.Sender.ProcessingType import gov.cdc.prime.router.SubmissionReceiver @@ -26,25 +25,18 @@ import gov.cdc.prime.router.UniversalPipelineReceiver import gov.cdc.prime.router.azure.BlobAccess.Companion.defaultBlobMetadata import gov.cdc.prime.router.azure.BlobAccess.Companion.getBlobContainer import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.db.tables.pojos.ReportFile import gov.cdc.prime.router.azure.observability.event.IReportStreamEventService import gov.cdc.prime.router.azure.observability.event.ReportStreamEventName import gov.cdc.prime.router.azure.observability.event.ReportStreamEventProperties import gov.cdc.prime.router.azure.observability.event.ReportStreamEventService -import gov.cdc.prime.router.cli.PIIRemovalCommands import gov.cdc.prime.router.common.AzureHttpUtils.getSenderIP -import gov.cdc.prime.router.common.Environment import gov.cdc.prime.router.common.JacksonMapperUtilities -import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.history.azure.SubmissionsFacade import gov.cdc.prime.router.tokens.AuthenticatedClaims import gov.cdc.prime.router.tokens.Scope import gov.cdc.prime.router.tokens.authenticationFailure import gov.cdc.prime.router.tokens.authorizationFailure -import kotlinx.serialization.json.Json import org.apache.logging.log4j.kotlin.Logging -import java.nio.charset.StandardCharsets -import java.util.UUID private const val PROCESSING_TYPE_PARAMETER = "processing" @@ -163,72 +155,6 @@ class ReportFunction( var reportBody: String, ) - /** - * GET report to download - * - * @see ../../../docs/api/reports.yml - */ - @FunctionName("downloadReport") - fun downloadReport( - @HttpTrigger( - name = "downloadReport", - methods = [HttpMethod.GET], - authLevel = AuthorizationLevel.FUNCTION, - route = "reports/download" - ) request: HttpRequestMessage, - ): HttpResponseMessage { - val reportId = request.queryParameters[REPORT_ID_PARAMETER] - val removePIIRaw = request.queryParameters[REMOVE_PII] - var removePII = false - if (removePIIRaw.isNullOrBlank() || removePIIRaw.toBoolean()) { - removePII = true - } - if (reportId.isNullOrBlank()) { - return HttpUtilities.badRequestResponse(request, "Must provide a reportId.") - } - return processDownloadReport( - request, - ReportId.fromString(reportId), - removePII, - Environment.get().envName - ) - } - - fun processDownloadReport( - request: HttpRequestMessage, - reportId: UUID, - removePII: Boolean?, - envName: String, - databaseAccess: DatabaseAccess = DatabaseAccess(), - piiRemovalCommands: PIIRemovalCommands = PIIRemovalCommands(), - ): HttpResponseMessage { - var requestedReport = ReportFile() - try { - requestedReport = databaseAccess.fetchReportFile(reportId) - } catch (e: Exception) { - HttpUtilities.badRequestResponse(request, "The requested report does not exist.") - } - - return if (requestedReport.bodyUrl != null && requestedReport.bodyUrl.toString().lowercase().endsWith("fhir")) { - val contents = BlobAccess.downloadBlobAsByteArray(requestedReport.bodyUrl) - - val content = if (removePII == null || removePII) { - piiRemovalCommands.removePii(FhirTranscoder.decode(contents.toString(Charsets.UTF_8))) - } else { - if (envName == "prod") { - return HttpUtilities.badRequestResponse(request, "Must remove PII for messages from prod.") - } - String(contents, StandardCharsets.UTF_8) - } - - HttpUtilities.okJSONResponse(request, Json.parseToJsonElement(content)) - } else if (requestedReport.bodyUrl == null) { - HttpUtilities.badRequestResponse(request, "The requested report does not exist.") - } else { - HttpUtilities.badRequestResponse(request, "The requested report is not fhir.") - } - } - /** * The Waters API, in memory of Dr. Michael Waters * (The older version of this API is "/api/reports") diff --git a/prime-router/src/main/kotlin/azure/RequestFunction.kt b/prime-router/src/main/kotlin/azure/RequestFunction.kt index e892befec42..47608913daf 100644 --- a/prime-router/src/main/kotlin/azure/RequestFunction.kt +++ b/prime-router/src/main/kotlin/azure/RequestFunction.kt @@ -23,8 +23,6 @@ const val ALLOW_DUPLICATES_PARAMETER = "allowDuplicate" const val TOPIC_PARAMETER = "topic" const val SCHEMA_PARAMETER = "schema" const val FORMAT_PARAMETER = "format" -const val REPORT_ID_PARAMETER = "reportId" -const val REMOVE_PII = "removePII" /** * Base class for ReportFunction and ValidateFunction diff --git a/prime-router/src/main/kotlin/azure/SendFunction.kt b/prime-router/src/main/kotlin/azure/SendFunction.kt index dc77ddbe883..686c0ce8105 100644 --- a/prime-router/src/main/kotlin/azure/SendFunction.kt +++ b/prime-router/src/main/kotlin/azure/SendFunction.kt @@ -79,7 +79,7 @@ class SendFunction( @BindingName("NextVisibleTime") nextVisibleTime: Date? = null, @BindingName("InsertionTime") insertionTime: Date? = null, ) { - val event = Event.parsePrimeRouterQueueMessage(message) as ReportEvent + val event = Event.parseQueueMessage(message) as ReportEvent val actionHistory = ActionHistory(TaskAction.send, event.isEmptyBatch) var receiverStatus: CustomerStatus = CustomerStatus.INACTIVE actionHistory.trackActionParams(message) diff --git a/prime-router/src/main/kotlin/azure/SubmissionTableService.kt b/prime-router/src/main/kotlin/azure/SubmissionTableService.kt deleted file mode 100644 index 0dd968afe3e..00000000000 --- a/prime-router/src/main/kotlin/azure/SubmissionTableService.kt +++ /dev/null @@ -1,104 +0,0 @@ -package gov.cdc.prime.router.azure - -import gov.cdc.prime.reportstream.shared.Submission -import org.apache.logging.log4j.kotlin.Logging - -/** - * Service class responsible for handling operations related to the "submission" table in Azure Table Storage. - * - * This service uses the TableAccess singleton to interact with Azure Table Storage for inserting and retrieving - * submissions in the "submission" table. - * - * It allows inserting `Submission` objects as table entities and retrieving them based on the submission ID and status. - */ -class SubmissionTableService private constructor() : Logging { - - companion object { - /** - * The singleton instance of SubmissionTableService, initialized lazily. - * - * This ensures that the instance is created only when it is first accessed, - * providing thread-safe, lazy initialization. - */ - val singletonInstance: SubmissionTableService by lazy { - SubmissionTableService() - } - - fun getInstance(): SubmissionTableService { - return singletonInstance - } - } - - private val tableName = "submission" - - /** - * The `TableAccess` object used to interact with Azure Table Storage. - * - * This is marked as `@Volatile` to ensure thread visibility. It is initialized lazily - * and resettable to allow refreshing the connection if necessary. - */ - private var tableAccess: TableAccess = TableAccess() - - /** - * Resets the `TableAccess` instance used to interact with the "submission" table. - * - * This method ensures thread safety by synchronizing access to `tableAccess`, preventing multiple - * threads from resetting the instance at the same time. - */ - fun reset() { - synchronized(this) { - tableAccess.reset() // Re-initialize the TableAccess client - } - } - - /** - * Inserts a SubmissionEntity into the "submission" table in Azure Table Storage. - * - * Converts the provided `Submission` object into a `TableEntity` and inserts it into the table. - * Logs the outcome of the operation (success or failure). - * - * @param submission The `Submission` object to be inserted into the table. - */ - fun insertSubmission(submission: Submission) { - try { - // Convert Submission to TableEntity and insert into the table - val entity = submission.toTableEntity() - tableAccess.insertEntity(tableName, entity) - logger.info( - "Submission entity insert succeeded: ${submission.submissionId} with status ${submission.status}" - ) - } catch (e: Exception) { - // Log the error if insertion fails - logger.error( - "Submission entity insert failed: ${submission.submissionId} with status ${submission.status}", - e - ) - } - } - - /** - * Retrieves a SubmissionEntity from the "submission" table based on submission ID and status. - * - * Fetches the corresponding table entity from Azure Table Storage using the provided partition key - * (submission ID) and row key (status). If the entity is found, it is converted back into a `Submission` object. - * - * If the entity is not found, or if an error occurs during retrieval, the method returns `null` and logs the error. - * - * @param submissionID The partition key representing the submission ID. - * @param status The row key representing the status of the submission. - * @return The `Submission` object if found, otherwise `null`. - */ - fun getSubmission(submissionID: String, status: String): Submission? = try { - // Retrieve the TableEntity and convert it back to a Submission object if found - val tableEntity = tableAccess.getEntity(tableName, submissionID, status) - if (tableEntity != null) { - Submission.fromTableEntity(tableEntity) - } else { - null - } - } catch (e: Exception) { - // Log the error if retrieval fails and return null - logger.error("Failed to read submission entity: $submissionID with status $status", e) - null - } -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/azure/TableAccess.kt b/prime-router/src/main/kotlin/azure/TableAccess.kt deleted file mode 100644 index f4c4b50eb0e..00000000000 --- a/prime-router/src/main/kotlin/azure/TableAccess.kt +++ /dev/null @@ -1,123 +0,0 @@ -package gov.cdc.prime.router.azure - -import com.azure.data.tables.TableClient -import com.azure.data.tables.TableServiceClient -import com.azure.data.tables.TableServiceClientBuilder -import com.azure.data.tables.models.TableEntity -import com.azure.data.tables.models.TableServiceException -import gov.cdc.prime.router.common.Environment -import org.apache.logging.log4j.kotlin.Logging - -/** - * Singleton class responsible for providing access to Azure Table Storage services. - * - * This class manages the connection to Azure Table Storage and provides methods to interact with - * individual tables. The connection is established using the environment-specific connection string. - * The TableServiceClient is lazily initialized and can be re-initialized upon failures. - */ -class TableAccess : Logging { - - companion object { - - /** - * The environment variable that stores the connection string. - */ - private val defaultEnvVar = Environment.get().storageEnvVar - - /** - * Retrieves the Azure Storage connection string from environment variables. - * - * @return The connection string for Azure Storage. - */ - fun getConnectionString(): String = System.getenv(defaultEnvVar) - } - - private var tableServiceClient: TableServiceClient = buildClient() - - private fun buildClient(): TableServiceClient { - return TableServiceClientBuilder() - .connectionString(getConnectionString()) - .buildClient() - } - - fun reset() { - tableServiceClient = buildClient() - } - - /** - * Inserts a TableEntity into the specified table. - * - * If the table does not exist, it is created before inserting the entity. - * Logs the success or failure of the operation. - * - * @param tableName The name of the table where the entity will be inserted. - * @param entity The TableEntity to be inserted. - */ - @Synchronized - fun insertEntity(tableName: String, entity: TableEntity) { - try { - val tableClient = getOrCreateTableClient(tableName) - tableClient.createEntity(entity) - logger.info("Entity inserted successfully: ${entity.partitionKey} is ${entity.rowKey}") - } catch (e: TableServiceException) { - // Log the detailed error - logger.error("Failed to insert entity: ${entity.partitionKey} with ${entity.rowKey}", e) - } - } - - /** - * Retrieves a TableEntity from the specified table. - * - * This method fetches a TableEntity based on the given partition key and row key. - * If the table does not exist or an error occurs during the retrieval, the method logs the error and returns null. - * - * @param tableName The name of the table from which to retrieve the entity. - * @param partitionKey The partition key identifying the entity. - * @param rowKey The row key identifying the entity. - * @return The TableEntity if found, or null if an error occurs. - */ - @Synchronized - fun getEntity(tableName: String, partitionKey: String, rowKey: String): TableEntity? { - try { - val tableClient = getTableClient(tableName) - return tableClient?.getEntity(partitionKey, rowKey) - } catch (e: Exception) { - logger.error("Failed to find entity: $partitionKey with $rowKey", e) - return null - } - } - - /** - * Retrieves a TableClient for the specified table if it exists. - * - * This method checks if the table exists. If the table exists, it returns a TableClient for interacting with it. - * If the table does not exist or an error occurs, it logs the error and attempts to retry the operation after reinitializing the client. - * - * @param tableName The name of the table for which the client is needed. - * @return A TableClient for interacting with the specified table, or null if the table does not exist or an error occurs. - */ - private fun getTableClient(tableName: String): TableClient? { - val tableExists = tableServiceClient.listTables().any { it.name == tableName } - return if (tableExists) { - tableServiceClient.getTableClient(tableName) - } else { - null - } - } - - /** - * Retrieves or creates a TableClient for the specified table. - * - * If the table does not exist, it is created, and a TableClient is returned for the newly created table. - * - * @param tableName The name of the table for which the client is needed. - * @return A TableClient for interacting with the specified table. - */ - private fun getOrCreateTableClient(tableName: String): TableClient { - val tableClient = getTableClient(tableName) - return tableClient ?: run { - tableServiceClient.createTable(tableName) - tableServiceClient.getTableClient(tableName) - } - } -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/azure/ValidateSchemasFunctions.kt b/prime-router/src/main/kotlin/azure/ValidateSchemasFunctions.kt index 1a93cccecaa..2eb750bbfbc 100644 --- a/prime-router/src/main/kotlin/azure/ValidateSchemasFunctions.kt +++ b/prime-router/src/main/kotlin/azure/ValidateSchemasFunctions.kt @@ -29,7 +29,7 @@ class ValidateSchemasFunctions : Logging { path = "metadata/fhir_transforms/validating.txt" ) @Suppress("UNUSED_PARAMETER") content: Array, ) { - val blobConnectionString = Environment.get().storageEnvVar + val blobConnectionString = Environment.get().blobEnvVar val blobContainerMetadata: BlobAccess.BlobContainerMetadata = BlobAccess.BlobContainerMetadata.build("metadata", blobConnectionString) validateSchemaChanges(TranslationSchemaManager.SchemaType.FHIR, blobContainerMetadata) @@ -48,7 +48,7 @@ class ValidateSchemasFunctions : Logging { path = "metadata/hl7_mapping/validating.txt" ) @Suppress("UNUSED_PARAMETER") content: Array, ) { - val blobConnectionString = Environment.get().storageEnvVar + val blobConnectionString = Environment.get().blobEnvVar val blobContainerMetadata: BlobAccess.BlobContainerMetadata = BlobAccess.BlobContainerMetadata.build("metadata", blobConnectionString) validateSchemaChanges(TranslationSchemaManager.SchemaType.HL7, blobContainerMetadata) diff --git a/prime-router/src/main/kotlin/azure/WorkflowEngine.kt b/prime-router/src/main/kotlin/azure/WorkflowEngine.kt index 7f79e289a97..e8f8a5c095e 100644 --- a/prime-router/src/main/kotlin/azure/WorkflowEngine.kt +++ b/prime-router/src/main/kotlin/azure/WorkflowEngine.kt @@ -198,11 +198,7 @@ class WorkflowEngine( Event.EventAction.RECEIVE ) - actionHistory.trackExternalInputReport( - report, - blobInfo, - payloadName - ) + actionHistory.trackExternalInputReport(report, blobInfo, payloadName) return blobInfo } diff --git a/prime-router/src/main/kotlin/azure/batch/CovidBatchFunction.kt b/prime-router/src/main/kotlin/azure/batch/CovidBatchFunction.kt index 190d279d0d1..8eb1631e78c 100644 --- a/prime-router/src/main/kotlin/azure/batch/CovidBatchFunction.kt +++ b/prime-router/src/main/kotlin/azure/batch/CovidBatchFunction.kt @@ -35,7 +35,7 @@ class CovidBatchFunction( ) { try { logger.trace("CovidBatchFunction starting. Message: $message") - val event = Event.parsePrimeRouterQueueMessage(message) as BatchEvent + val event = Event.parseQueueMessage(message) as BatchEvent if (event.eventAction != Event.EventAction.BATCH) { logger.error("CovidBatchFunction received a $message") return diff --git a/prime-router/src/main/kotlin/azure/batch/UniversalBatchFunction.kt b/prime-router/src/main/kotlin/azure/batch/UniversalBatchFunction.kt index 34b13969ac6..40c579a482e 100644 --- a/prime-router/src/main/kotlin/azure/batch/UniversalBatchFunction.kt +++ b/prime-router/src/main/kotlin/azure/batch/UniversalBatchFunction.kt @@ -37,7 +37,7 @@ class UniversalBatchFunction( ) { try { logger.trace("UniversalBatchFunction starting. Message: $message") - val event = Event.parsePrimeRouterQueueMessage(message) as BatchEvent + val event = Event.parseQueueMessage(message) as BatchEvent if (event.eventAction != Event.EventAction.BATCH) { logger.error("UniversalBatchFunction received a $message") return diff --git a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventBuilder.kt b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventBuilder.kt index f7ed5a649e3..e309e476e3f 100644 --- a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventBuilder.kt +++ b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventBuilder.kt @@ -33,7 +33,7 @@ abstract class AbstractReportStreamEventBuilder( private val name: ReportStreamEventName, private val childReportId: UUID, private val childBodyUrl: String, - private val theTopic: Topic?, + private val theTopic: Topic, private val pipelineStepName: TaskAction, ) : Logging { @@ -119,7 +119,7 @@ open class ReportStreamReportEventBuilder( theName: ReportStreamEventName, childReportId: UUID, childBodyUrl: String, - theTopic: Topic?, + theTopic: Topic, pipelineStepName: TaskAction, ) : AbstractReportStreamEventBuilder( reportEventService, @@ -210,7 +210,7 @@ class ReportStreamReportProcessingErrorEventBuilder( theName: ReportStreamEventName, childReportId: UUID, childBodyUrl: String, - theTopic: Topic?, + theTopic: Topic, pipelineStepName: TaskAction, private val error: String, ) : ReportStreamReportEventBuilder( diff --git a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventData.kt b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventData.kt index b527e8a1466..8528915f54d 100644 --- a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventData.kt +++ b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventData.kt @@ -83,7 +83,6 @@ enum class ReportStreamEventName { ITEM_FILTER_FAILED, REPORT_SENT, REPORT_RECEIVED, - REPORT_NOT_RECEIVABLE, ITEM_ROUTED, REPORT_LAST_MILE_FAILURE, REPORT_NOT_PROCESSABLE, diff --git a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventService.kt b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventService.kt index d8c37ac8ddb..a3964c6f56f 100644 --- a/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventService.kt +++ b/prime-router/src/main/kotlin/azure/observability/event/ReportStreamEventService.kt @@ -1,7 +1,6 @@ package gov.cdc.prime.router.azure.observability.event import gov.cdc.prime.router.Report -import gov.cdc.prime.router.ReportId import gov.cdc.prime.router.Topic import gov.cdc.prime.router.azure.DatabaseAccess import gov.cdc.prime.router.azure.db.enums.TaskAction @@ -85,25 +84,6 @@ interface IReportStreamEventService { initializer: ReportStreamReportProcessingErrorEventBuilder.() -> Unit, ) - /** - * Creates a general processing error event. This is not associated with a report or item. - * - * @param eventName the business event value from [ReportStreamEventName] - * @param pipelineStepName the pipeline step that is emitting the event - * @param error the error description - * @param submissionId the report id for the incoming report - * @param bodyUrl the blob url for the incoming report - * @param initializer additional data to initialize the creation of the event. See [AbstractReportStreamEventBuilder] - */ - fun sendSubmissionProcessingError( - eventName: ReportStreamEventName, - pipelineStepName: TaskAction, - error: String, - submissionId: ReportId, - bodyUrl: String, - initializer: ReportStreamReportProcessingErrorEventBuilder.() -> Unit, - ) - /** * Creates an item event from an [Report] * @@ -172,7 +152,7 @@ interface IReportStreamEventService { * Retrieves data about the input and output report for a particular pipeline step * * @param childReportId the id of the ReportFile - * @param childBodyUrl the blob URL for the output report + * @param childBodyUrl the blob URL for the ouput report * @param parentReportId the optional parent report id. A report outputted from the ReportFunction will not have a parent * @param pipelineStepName the pipeline step that is generated the child report * @param topic the [Topic] that the report is in @@ -183,7 +163,7 @@ interface IReportStreamEventService { childBodyUrl: String, parentReportId: UUID?, pipelineStepName: TaskAction, - topic: Topic?, + topic: Topic, ): ReportEventData /** @@ -295,28 +275,6 @@ class ReportStreamEventService( ).send() } - override fun sendSubmissionProcessingError( - eventName: ReportStreamEventName, - pipelineStepName: TaskAction, - error: String, - submissionId: ReportId, - bodyUrl: String, - initializer: ReportStreamReportProcessingErrorEventBuilder.() -> Unit, - ) { - ReportStreamReportProcessingErrorEventBuilder( - this, - azureEventService, - eventName, - submissionId, - bodyUrl, - theTopic = null, - pipelineStepName, - error - ).apply( - initializer - ).send() - } - override fun sendItemEvent( eventName: ReportStreamEventName, childReport: Report, @@ -394,7 +352,7 @@ class ReportStreamEventService( childBodyUrl: String, parentReportId: UUID?, pipelineStepName: TaskAction, - topic: Topic?, + topic: Topic, ): ReportEventData { val submittedReportIds = if (parentReportId != null) { val rootReports = reportService.getRootReports(parentReportId) diff --git a/prime-router/src/main/kotlin/cli/ConvertFileCommands.kt b/prime-router/src/main/kotlin/cli/ConvertFileCommands.kt index bc3268c59cd..59f1408b7c1 100644 --- a/prime-router/src/main/kotlin/cli/ConvertFileCommands.kt +++ b/prime-router/src/main/kotlin/cli/ConvertFileCommands.kt @@ -74,8 +74,6 @@ class ConvertFileCommands( inputFile.inputStream(), FileSource(inputFile.nameWithoutExtension) ).report - // Throws exception if itemCount is null - checkNotNull(report.itemCount) { "Input file has no items" } val fields = fieldNames.split(",") val rows = mutableListOf>() for (i in 0 until report.itemCount) { diff --git a/prime-router/src/main/kotlin/cli/PIIRemovalCommands.kt b/prime-router/src/main/kotlin/cli/PIIRemovalCommands.kt index 6a9c48aac39..c74cb829cc1 100644 --- a/prime-router/src/main/kotlin/cli/PIIRemovalCommands.kt +++ b/prime-router/src/main/kotlin/cli/PIIRemovalCommands.kt @@ -1,6 +1,5 @@ package gov.cdc.prime.router.cli -import com.fasterxml.jackson.databind.json.JsonMapper import com.github.ajalt.clikt.core.CliktCommand import com.github.ajalt.clikt.core.CliktError import com.github.ajalt.clikt.parameters.options.option @@ -57,16 +56,8 @@ class PIIRemovalCommands : CliktCommand( if (inputFile.extension.uppercase() != "FHIR") { throw CliktError("File ${inputFile.absolutePath} is not a FHIR file.") } - val bundle = FhirTranscoder.decode(contents) + var bundle = FhirTranscoder.decode(contents) - // Write the output to the screen or a file. - if (outputFile != null) { - outputFile!!.writeText(removePii(bundle), Charsets.UTF_8) - } - echo("Wrote output to ${outputFile!!.absolutePath}") - } - - fun removePii(bundle: Bundle): String { bundle.entry.map { it.resource }.filterIsInstance() .forEach { patient -> patient.name.forEach { name -> @@ -85,16 +76,16 @@ class PIIRemovalCommands : CliktCommand( bundle.entry.map { it.resource }.filterIsInstance() .forEach { organization -> - organization.address.forEach { address -> - address.line = mutableListOf(StringType(getFakeValueForElementCall("STREET"))) - } - organization.telecom.forEach { telecom -> - handleTelecom(telecom) - } - organization.contact.forEach { contact -> - handleOrganizationalContact(contact) - } + organization.address.forEach { address -> + address.line = mutableListOf(StringType(getFakeValueForElementCall("STREET"))) + } + organization.telecom.forEach { telecom -> + handleTelecom(telecom) + } + organization.contact.forEach { contact -> + handleOrganizationalContact(contact) } + } bundle.entry.map { it.resource }.filterIsInstance() .forEach { practitioner -> @@ -112,14 +103,18 @@ class PIIRemovalCommands : CliktCommand( } } - val bundleAfterTransform = FhirTransformer( - "classpath:/metadata/fhir_transforms/common/remove-pii-enrichment.yml" - ).process(bundle) + bundle = FhirTransformer("classpath:/metadata/fhir_transforms/common/remove-pii-enrichment.yml").process(bundle) val jsonObject = JacksonMapperUtilities.defaultMapper - .readValue(FhirTranscoder.encode(bundleAfterTransform), Any::class.java) - val prettyText = JsonMapper.builder().build().writeValueAsString(jsonObject) - return replaceIds(bundleAfterTransform, prettyText) + .readValue(FhirTranscoder.encode(bundle), Any::class.java) + var prettyText = JacksonMapperUtilities.defaultMapper.writeValueAsString(jsonObject) + prettyText = replaceIds(bundle, prettyText) + + // Write the output to the screen or a file. + if (outputFile != null) { + outputFile!!.writeText(prettyText, Charsets.UTF_8) + } + echo("Wrote output to ${outputFile!!.absolutePath}") } /** @@ -190,10 +185,8 @@ class PIIRemovalCommands : CliktCommand( bundle, path ).forEach { resourceId -> - if (resourceId.primitiveValue() != null) { - val newIdentifier = getFakeValueForElementCall("UUID") - return prettyText.replace(resourceId.primitiveValue(), newIdentifier, true) - } + val newIdentifier = getFakeValueForElementCall("UUID") + return prettyText.replace(resourceId.primitiveValue(), newIdentifier, true) } return prettyText } diff --git a/prime-router/src/main/kotlin/cli/ProcessFhirCommands.kt b/prime-router/src/main/kotlin/cli/ProcessFhirCommands.kt index 32321a12871..95b2ebf85f4 100644 --- a/prime-router/src/main/kotlin/cli/ProcessFhirCommands.kt +++ b/prime-router/src/main/kotlin/cli/ProcessFhirCommands.kt @@ -18,13 +18,8 @@ import fhirengine.engine.CustomFhirPathFunctions import fhirengine.engine.CustomTranslationFunctions import gov.cdc.prime.router.ActionLogger import gov.cdc.prime.router.Hl7Configuration -import gov.cdc.prime.router.Metadata import gov.cdc.prime.router.MimeFormat -import gov.cdc.prime.router.Receiver import gov.cdc.prime.router.azure.BlobAccess -import gov.cdc.prime.router.azure.ConditionStamper -import gov.cdc.prime.router.azure.LookupTableConditionMapper -import gov.cdc.prime.router.cli.CommandUtilities.Companion.abort import gov.cdc.prime.router.cli.helpers.HL7DiffHelper import gov.cdc.prime.router.common.Environment import gov.cdc.prime.router.common.JacksonMapperUtilities @@ -38,7 +33,6 @@ import gov.cdc.prime.router.fhirengine.translation.hl7.utils.CustomContext import gov.cdc.prime.router.fhirengine.translation.hl7.utils.FhirPathUtils import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.fhirengine.utils.HL7Reader -import gov.cdc.prime.router.fhirengine.utils.getObservations import org.hl7.fhir.r4.model.Base import org.hl7.fhir.r4.model.Bundle import org.hl7.fhir.r4.model.Extension @@ -69,7 +63,7 @@ class ProcessFhirCommands : CliktCommand( * The format to output the data. */ private val outputFormat by option("--output-format", help = "output format") - .choice(MimeFormat.HL7.toString(), MimeFormat.FHIR.toString()) + .choice(MimeFormat.HL7.toString(), MimeFormat.FHIR.toString()).required() /** * String of file names @@ -91,27 +85,6 @@ class ProcessFhirCommands : CliktCommand( "-r", "--receiver-schema", help = "Receiver schema location. Required for HL7 output." ) - /** - * Name of the receiver settings to use - */ - private val receiverName by option( - "--receiver-name", help = "Name of the receiver settings to use" - ) - - /** - * Name of the org settings to use - */ - private val orgName by option( - "--org", help = "Name of the org settings to use" - ) - - /** - * Environment that specifies where to get the receiver settings - */ - private val environment by option( - "--receiver-setting-env", help = "Environment that specifies where to get the receiver settings" - ) - /** * Sender schema location */ @@ -130,81 +103,29 @@ class ProcessFhirCommands : CliktCommand( val actionLogger = ActionLogger() // Check on the extension of the file for supported operations val inputFileType = inputFile.extension.uppercase() - val receiver = getReceiver() - when { // HL7 to FHIR conversion - inputFileType == "HL7" && ( - outputFormat == MimeFormat.FHIR.toString() || - (receiver != null && receiver.format == MimeFormat.FHIR) - ) -> { + inputFileType == "HL7" && outputFormat == MimeFormat.FHIR.toString() -> { var fhirMessage = convertHl7ToFhir(contents).first fhirMessage = applyEnrichmentSchemas(fhirMessage) - if (receiver != null && receiver.enrichmentSchemaNames.isNotEmpty()) { - receiver.enrichmentSchemaNames.forEach { currentSchema -> - fhirMessage = FhirTransformer(currentSchema).process(fhirMessage) - } - } outputResult( handleSenderAndReceiverTransforms(fhirMessage), actionLogger ) } // FHIR to HL7 conversion - (inputFileType == "FHIR" || inputFileType == "JSON") && ( - outputFormat == MimeFormat.HL7.toString() || - (receiver != null && receiver.format == MimeFormat.HL7) - ) -> { - if (receiver == null) { - return outputResult(convertFhirToHl7(contents)) - } - - var bundle = FhirTranscoder.decode(contents) - if (receiver.enrichmentSchemaNames.isNotEmpty()) { - receiver.enrichmentSchemaNames.forEach { currentSchema -> - bundle = FhirTransformer(currentSchema).process(bundle) - } - } - outputResult( - convertFhirToHl7( - FhirTranscoder.encode(bundle), - receiver.translation as Hl7Configuration, - receiver - ) - ) + (inputFileType == "FHIR" || inputFileType == "JSON") && outputFormat == MimeFormat.HL7.toString() -> { + outputResult(convertFhirToHl7(contents)) } // FHIR to FHIR conversion - (inputFileType == "FHIR" || inputFileType == "JSON") && ( - outputFormat == MimeFormat.FHIR.toString() || - (receiver != null && receiver.format == MimeFormat.FHIR) - ) -> { - var bundle = FhirTranscoder.decode(contents) - if (receiver != null) { - if (receiver.enrichmentSchemaNames.isNotEmpty()) { - receiver.enrichmentSchemaNames.forEach { currentSchema -> - bundle = FhirTransformer(currentSchema).process(bundle) - } - } - } - outputResult(convertFhirToFhir(FhirTranscoder.encode(bundle)), actionLogger) + (inputFileType == "FHIR" || inputFileType == "JSON") && outputFormat == MimeFormat.FHIR.toString() -> { + outputResult(convertFhirToFhir(contents), actionLogger) } // HL7 to FHIR to HL7 conversion - inputFileType == "HL7" && ( - outputFormat == MimeFormat.HL7.toString() || - (receiver != null && receiver.format == MimeFormat.HL7) - ) -> { - var (bundle, inputMessage) = convertHl7ToFhir(contents) - - if (receiver != null) { - if (receiver.enrichmentSchemaNames.isNotEmpty()) { - receiver.enrichmentSchemaNames.forEach { currentSchema -> - bundle = FhirTransformer(currentSchema).process(bundle) - } - } - } - + inputFileType == "HL7" && outputFormat == MimeFormat.HL7.toString() -> { + val (bundle, inputMessage) = convertHl7ToFhir(contents) val output = convertFhirToHl7(FhirTranscoder.encode(bundle)) outputResult(output) if (diffHl7Output != null) { @@ -219,103 +140,41 @@ class ProcessFhirCommands : CliktCommand( } } - fun getReceiver(): Receiver? { - if (!environment.isNullOrBlank() && !receiverName.isNullOrBlank() && !orgName.isNullOrBlank()) { - if (!outputFormat.isNullOrBlank()) { - throw CliktError( - "Please specify either a receiver OR an output format. Not both." - ) - } - val foundEnvironment = Environment.get(environment!!) - val accessToken = OktaCommand.fetchAccessToken(foundEnvironment.oktaApp) - ?: abort( - "Invalid access token. " + - "Run ./prime login to fetch/refresh your access " + - "token for the $foundEnvironment environment." - ) - val organizations = GetMultipleSettings().getAll( - environment = foundEnvironment, - accessToken = accessToken, - specificOrg = orgName, - exactMatch = true - ) - - val receivers = organizations[0].receivers.filter { receiver -> receiver.name == receiverName } - if (receivers.isNotEmpty()) { - return receivers[0] - } - } else if (outputFormat.isNullOrBlank()) { - throw CliktError( - "Output format is required if the environment, receiver, and org " + - "are not specified. " - ) - } - return null - } - - private val defaultHL7Configuration = Hl7Configuration( - receivingApplicationOID = null, - receivingFacilityOID = null, - messageProfileId = null, - receivingApplicationName = null, - receivingFacilityName = null, - receivingOrganization = null, - ) - /** * Convert a FHIR bundle as a [jsonString] to an HL7 message. * @return an HL7 message */ - private fun convertFhirToHl7( - jsonString: String, - hl7Configuration: Hl7Configuration = defaultHL7Configuration, - receiver: Receiver? = null, - ): Message { + private fun convertFhirToHl7(jsonString: String): Message { var fhirMessage = FhirTranscoder.decode(jsonString) fhirMessage = applyEnrichmentSchemas(fhirMessage) return when { - receiverSchema == null && (receiver == null || receiver.schemaName.isBlank()) -> + receiverSchema == null -> // Receiver schema required because if it's coming out as HL7, it would be getting any transform info // for that from a receiver schema. - throw CliktError("You must specify a receiver schema using --receiver-schema.") + throw CliktError(" You must specify a receiver schema using --receiver-schema.") - receiverSchema != null -> { + else -> { val bundle = applySenderTransforms(fhirMessage) - val stamper = ConditionStamper(LookupTableConditionMapper(Metadata.getInstance())) - fhirMessage.getObservations().forEach { observation -> - stamper.stampObservation(observation) - } FhirToHl7Converter( receiverSchema!!, - BlobAccess.BlobContainerMetadata.build("metadata", Environment.get().storageEnvVar), + BlobAccess.BlobContainerMetadata.build("metadata", Environment.get().blobEnvVar), context = FhirToHl7Context( CustomFhirPathFunctions(), config = HL7TranslationConfig( - hl7Configuration, - receiver + Hl7Configuration( + receivingApplicationOID = null, + receivingFacilityOID = null, + messageProfileId = null, + receivingApplicationName = null, + receivingFacilityName = null, + receivingOrganization = null, + ), + null ), translationFunctions = CustomTranslationFunctions(), ) ).process(bundle) } - receiver != null && receiver.schemaName.isNotBlank() -> { - val bundle = applySenderTransforms(fhirMessage) - FhirToHl7Converter( - receiver.schemaName, - BlobAccess.BlobContainerMetadata.build("metadata", Environment.get().storageEnvVar), - context = FhirToHl7Context( - CustomFhirPathFunctions(), - config = HL7TranslationConfig( - hl7Configuration, - receiver - ), - translationFunctions = CustomTranslationFunctions(), - ) - ).process(bundle) - } - else -> { - throw CliktError("Error state reached when trying to apply the transforms.") - } } } @@ -324,10 +183,6 @@ class ProcessFhirCommands : CliktCommand( */ private fun convertFhirToFhir(jsonString: String): Bundle { var fhirMessage = FhirTranscoder.decode(jsonString) - val stamper = ConditionStamper(LookupTableConditionMapper(Metadata.getInstance())) - fhirMessage.getObservations().forEach { observation -> - stamper.stampObservation(observation) - } fhirMessage = applyEnrichmentSchemas(fhirMessage) if (receiverSchema == null && senderSchema == null) { // Must have at least one schema or else why are you doing this @@ -365,17 +220,10 @@ class ProcessFhirCommands : CliktCommand( } val hl7profile = HL7Reader.getMessageProfile(hl7message.toString()) // search hl7 profile map and create translator with config path if found - val fhirMessage = when (val configPath = HL7Reader.profileDirectoryMap[hl7profile]) { - null -> HL7toFhirTranslator(inputSchema).translate(hl7message) - else -> HL7toFhirTranslator(configPath).translate(hl7message) + return when (val configPath = HL7Reader.profileDirectoryMap[hl7profile]) { + null -> Pair(HL7toFhirTranslator(inputSchema).translate(hl7message), hl7message) + else -> Pair(HL7toFhirTranslator(configPath).translate(hl7message), hl7message) } - - val stamper = ConditionStamper(LookupTableConditionMapper(Metadata.getInstance())) - fhirMessage.getObservations().forEach { observation -> - stamper.stampObservation(observation) - } - - return Pair(fhirMessage, hl7message) } /** diff --git a/prime-router/src/main/kotlin/cli/SettingCommands.kt b/prime-router/src/main/kotlin/cli/SettingCommands.kt index 6df51ce8d49..676fb373112 100644 --- a/prime-router/src/main/kotlin/cli/SettingCommands.kt +++ b/prime-router/src/main/kotlin/cli/SettingCommands.kt @@ -1049,22 +1049,12 @@ class GetMultipleSettings : SettingCommand( } } - fun getAll( - environment: Environment, - accessToken: String = oktaAccessToken, - specificOrg: String? = filter, - exactMatch: Boolean = false, - ): List { + private fun getAll(environment: Environment, accessToken: String): List { // get organizations val organizationJson = getMany(environment, accessToken, SettingType.ORGANIZATION, settingName = "") var organizations = jsonMapper.readValue(organizationJson, Array::class.java) - if (specificOrg != null) { - if (!exactMatch) { - organizations = - organizations.filter { it.name.startsWith(specificOrg, ignoreCase = true) }.toTypedArray() - } else { - organizations = organizations.filter { it.name.equals(specificOrg, ignoreCase = true) }.toTypedArray() - } + if (filter != null) { + organizations = organizations.filter { it.name.startsWith(filter!!, ignoreCase = true) }.toTypedArray() } // get senders and receivers per org diff --git a/prime-router/src/main/kotlin/cli/tests/BasicTests.kt b/prime-router/src/main/kotlin/cli/tests/BasicTests.kt index 25333e9bc11..428e97c2df2 100644 --- a/prime-router/src/main/kotlin/cli/tests/BasicTests.kt +++ b/prime-router/src/main/kotlin/cli/tests/BasicTests.kt @@ -205,7 +205,7 @@ class End2EndUniversalPipeline : CoolTest() { expectedResults: List>, ): Boolean { var passed = true - val blobConnectionString = Environment.get().storageEnvVar + val blobConnectionString = Environment.get().blobEnvVar val blobContainerMetadata: BlobAccess.BlobContainerMetadata = BlobAccess.BlobContainerMetadata.build("reports", blobConnectionString) diff --git a/prime-router/src/main/kotlin/cli/tests/RemovePIITest.kt b/prime-router/src/main/kotlin/cli/tests/RemovePIITest.kt index ffe7cb3b1bb..f8ba88c2d41 100644 --- a/prime-router/src/main/kotlin/cli/tests/RemovePIITest.kt +++ b/prime-router/src/main/kotlin/cli/tests/RemovePIITest.kt @@ -16,8 +16,6 @@ import org.hl7.fhir.r4.model.ServiceRequest import org.hl7.fhir.r4.model.Specimen import java.io.File import java.nio.file.Paths -import kotlin.io.path.Path -import kotlin.io.path.deleteIfExists class RemovePIITest : CoolTest() { /** @@ -43,10 +41,9 @@ class RemovePIITest : CoolTest() { */ override suspend fun run(environment: Environment, options: CoolTestOptions): Boolean { ugly("Starting remove PII test") - val inputFilePath = Paths.get("").toAbsolutePath().toString() + - "/src/main/resources/clitests/compare-test-files/fakePII.fhir" + val inputFilePath = Paths.get("").toAbsolutePath().toString() + "/src/main/kotlin/cli/tests/fakePII.fhir" val outputFilePath = Paths.get("").toAbsolutePath().toString() + - "/src/main/resources/clitests/compare-test-files/piiRemoved.fhir" + "/src/main/kotlin/cli/tests/piiRemoved.fhir" PIIRemovalCommands().test( "-i $inputFilePath -o $outputFilePath" @@ -59,48 +56,40 @@ class RemovePIITest : CoolTest() { if (!testIdsRemoved(inputBundle, outputContent)) { ugly("Not all IDs removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testPatientPIIRemoved(inputBundle, outputBundle)) { ugly("Not all patient PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testOrganizationPIIRemoved(inputBundle, outputBundle)) { ugly("Not all organization PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testPractitionerPIIRemoved(inputBundle, outputBundle)) { ugly("Not all practitioner PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testServiceRequestPIIRemoved(inputBundle, outputBundle)) { ugly("Not all service request PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testObservationPIIRemoved(inputBundle, outputBundle)) { ugly("Not all observation PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } if (!testSpecimenPIIRemoved(inputBundle, outputBundle)) { ugly("Not all specimen PII removed. Test failed.") - Path(outputFilePath).deleteIfExists() return false } ugly("PII removal test passed") - Path(outputFilePath).deleteIfExists() return true } diff --git a/prime-router/src/main/kotlin/cli/tests/SyncTranslationSchemasTest.kt b/prime-router/src/main/kotlin/cli/tests/SyncTranslationSchemasTest.kt index 6c40638fb58..1e752c9f71b 100644 --- a/prime-router/src/main/kotlin/cli/tests/SyncTranslationSchemasTest.kt +++ b/prime-router/src/main/kotlin/cli/tests/SyncTranslationSchemasTest.kt @@ -30,15 +30,13 @@ class SyncTranslationSchemasTest : CoolTest() { private val destinationConnectionString = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;" + "AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" + - "BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" + - "TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" + "BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;" @Suppress("ktlint:standard:max-line-length") private val sourceConnectionString = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;" + "AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" + - "BlobEndpoint=http://localhost:11000/devstoreaccount1;QueueEndpoint=http://localhost:11001/devstoreaccount1;" + - "TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" + "BlobEndpoint=http://localhost:11000/devstoreaccount1;QueueEndpoint=http://localhost:11001/devstoreaccount1;" private fun setupCleanState( sourceBlobContainerMetadata: BlobAccess.BlobContainerMetadata, diff --git a/prime-router/src/main/resources/clitests/compare-test-files/fakePII.fhir b/prime-router/src/main/kotlin/cli/tests/fakePII.fhir similarity index 100% rename from prime-router/src/main/resources/clitests/compare-test-files/fakePII.fhir rename to prime-router/src/main/kotlin/cli/tests/fakePII.fhir diff --git a/prime-router/src/main/kotlin/common/AzureHttpUtils.kt b/prime-router/src/main/kotlin/common/AzureHttpUtils.kt index 211fd6a8c4c..ec9e3f89d7e 100644 --- a/prime-router/src/main/kotlin/common/AzureHttpUtils.kt +++ b/prime-router/src/main/kotlin/common/AzureHttpUtils.kt @@ -3,19 +3,8 @@ package gov.cdc.prime.router.common import com.microsoft.azure.functions.HttpRequestMessage import gov.cdc.prime.router.azure.db.Tables -/** - * Utility object that provides methods for handling Azure HTTP requests. - * This object contains helper functions to extract the sender's IP address - * from HTTP request headers. - */ object AzureHttpUtils { - /** - * Retrieves the sender's IP address from an [HttpRequestMessage]. - * - * @param request The HTTP request message from which to extract the sender's IP address. - * @return The sender's IP address as a [String], or `null` if not found. - */ fun getSenderIP(request: HttpRequestMessage<*>): String? { return ( ( @@ -24,19 +13,4 @@ object AzureHttpUtils { )?.take(Tables.ACTION.SENDER_IP.dataType.length()) ?: request.headers["x-azure-clientip"] ) } - - /** - * Retrieves the sender's IP address from a map of HTTP headers. - * - * @param headers A map of HTTP headers from which to extract the sender's IP address. - * @return The sender's IP address as a [String], or `null` if not found. - */ - fun getSenderIP(headers: Map): String? { - return ( - ( - headers["x-forwarded-for"]?.split(",") - ?.firstOrNull() - )?.take(Tables.ACTION.SENDER_IP.dataType.length()) ?: headers["x-azure-clientip"] - ) - } } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/common/Environment.kt b/prime-router/src/main/kotlin/common/Environment.kt index 2cae4d3c817..2ca09e075f0 100644 --- a/prime-router/src/main/kotlin/common/Environment.kt +++ b/prime-router/src/main/kotlin/common/Environment.kt @@ -12,7 +12,7 @@ enum class Environment( val envName: String, val url: URL, val oktaApp: OktaCommand.OktaApp? = null, - val storageEnvVar: String = "AzureWebJobsStorage", + val blobEnvVar: String = "AzureWebJobsStorage", ) { LOCAL( "local", diff --git a/prime-router/src/main/kotlin/common/piiremoved.json b/prime-router/src/main/kotlin/common/piiremoved.json deleted file mode 100644 index 13866b5888f..00000000000 --- a/prime-router/src/main/kotlin/common/piiremoved.json +++ /dev/null @@ -1,1930 +0,0 @@ -{ - "resourceType": { - "isString": true, - "content": "Bundle", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": { - "value": { - "isString": true, - "content": "e9941fc2-6096-48a6-8b75-15e91dc80ca7", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "type": { - "isString": true, - "content": "message", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "timestamp": { - "isString": true, - "content": "2023-10-18T22:20:22.347Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "entry": [ - { - "fullUrl": { - "isString": true, - "content": "MessageHeader/c7414da3-edc1-4a3e-9c5c-8d7a8e5cf775", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "MessageHeader", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "c7414da3-edc1-4a3e-9c5c-8d7a8e5cf775", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "meta": { - "tag": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0103", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "T", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Training", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "eventCoding": { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0003", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "R01", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "ORU/ACK - Unsolicited transmission of an observation message", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "destination": [ - { - "name": { - "isString": true, - "content": "PRIME ReportStream", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "endpoint": { - "isString": true, - "content": "https://prime.cdc.gov/api/reports?option=SkipInvalidItems", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "sender": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "source": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-binary-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueString": { - "isString": true, - "content": "e3d085e", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueInstant": { - "isString": true, - "content": "2023-10-18T21:06:03Z", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueReference": { - "reference": { - "isString": true, - "content": "Organization/07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "software": { - "isString": true, - "content": "PRIME SimpleReport", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "version": { - "isString": true, - "content": "e3d085e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "endpoint": { - "isString": true, - "content": "https://simplereport.gov", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "focus": [ - { - "reference": { - "isString": true, - "content": "Provenance/cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "DiagnosticReport/e9941fc2-6096-48a6-8b75-15e91dc80ca7", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Provenance/cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Provenance", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "recorded": { - "isString": true, - "content": "2023-10-18T22:20:22.347Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "activity": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0003", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "R01", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "ORU/ACK - Unsolicited transmission of an observation message", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "agent": [ - { - "who": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "DiagnosticReport/e9941fc2-6096-48a6-8b75-15e91dc80ca7", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "DiagnosticReport", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "e9941fc2-6096-48a6-8b75-15e91dc80ca7", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "e9941fc2-6096-48a6-8b75-15e91dc80ca7", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "basedOn": [ - { - "reference": { - "isString": true, - "content": "ServiceRequest/b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95941-1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2023-10-18T22:20:22+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "specimen": [ - { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "result": [ - { - "reference": { - "isString": true, - "content": "Observation/29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Patient", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "extension": [ - { - "url": { - "isString": true, - "content": "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "ASKU", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "refused", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0189", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Not Hispanic or Latino", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Not Hispanic or Latino", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "identifier": [ - { - "value": { - "isString": true, - "content": "f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "name": [ - { - "family": { - "isString": true, - "content": " Feil", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "given": [ - { - "isString": true, - "content": "Meghann", - "coerceToInlineType$kotlinx_serialization_json": null - } - ] - } - ], - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12755593677", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "home", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "system": { - "isString": true, - "content": "email", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "AdrienneOlson@gmail.com", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "home", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "gender": { - "isString": true, - "content": "female", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "birthDate": { - "isString": true, - "content": "1968-01-20", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "address": [ - { - "line": [ - { - "isString": true, - "content": "3177 Purdy Hills", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Boonville", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Dallas", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "65704", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "managingOrganization": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Organization", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0301", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "CLIA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "value": { - "isString": true, - "content": "12D3456789", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "name": { - "isString": true, - "content": "Carl Potts", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12779455296", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "system": { - "isString": true, - "content": "email", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "JacquettaShields@gmail.com", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "address": [ - { - "line": [ - { - "isString": true, - "content": "51877 Deckow Freeway", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Chaffee", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Atchison", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "64504", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Practitioner/48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Practitioner", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "name": [ - { - "family": { - "isString": true, - "content": " II", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "given": [ - { - "isString": true, - "content": "Scottie", - "coerceToInlineType$kotlinx_serialization_json": null - } - ] - } - ], - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12122221722", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "address": [ - { - "line": [ - { - "isString": true, - "content": "781 Freddie Union", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Fair play", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Grundy", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "63742", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Specimen", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "7fc4aee2-c426-4b2b-953c-86c877ff9bd0", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "697989009", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Anterior nares swab", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "receivedTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "collection": { - "collectedDateTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "ServiceRequest/b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "ServiceRequest", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-control", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0119", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "RE", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-effective-date", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueDateTime": { - "isString": true, - "content": "2023-10-18T22:20:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "status": { - "isString": true, - "content": "completed", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "intent": { - "isString": true, - "content": "order", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95941-1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "requester": { - "reference": { - "isString": true, - "content": "PractitionerRole/2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "supportingInfo": [ - { - "reference": { - "isString": true, - "content": "Observation/2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Device", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "00884999048034", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "manufacturer": { - "isString": true, - "content": "Abbott", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "deviceName": [ - { - "name": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "isString": true, - "content": "model-name", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "PractitionerRole/2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "PractitionerRole", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "practitioner": { - "reference": { - "isString": true, - "content": "Practitioner/48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "organization": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Organization/07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Organization", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "name": { - "isString": true, - "content": "SimpleReport", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "85477-8", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Flu A", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1972-09-06T05:50:13.070Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1979-09-18T13:15:22.544Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCoding": { - "code": { - "isString": true, - "content": "Alinity m Resp-4-Plex_Abbott Molecular Inc.", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "85478-6", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Flu B", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "2009-02-11T21:43:11.728Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2013-05-28T23:49:42.304Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCoding": { - "code": { - "isString": true, - "content": "Alinity m Resp-4-Plex_Abbott Molecular Inc.", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "94500-6", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "COVID-19", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1958-10-15T17:14:24.631Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2020-06-14T10:13:51.979Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95419-8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Has symptoms related to condition of interest", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Has symptoms related to condition of interest", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1950-12-04T07:15:53.646Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2003-04-14T14:47:13.472Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "UNK", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "unknown", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95418-0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Employed in a healthcare setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Employed in a healthcare setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "2009-02-09T19:25:29.132Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2013-01-21T12:13:59.159Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/ValueSet/v2-0136", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "No", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95421-4", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Resides in a congregate care setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Resides in a congregate care setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/f23cff4a-971b-48d9-8d99-3890d390c3a4", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1961-11-19T07:14:16.093Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2019-10-20T16:00:22.324Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/ValueSet/v2-0136", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "No", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ] -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/common/piithere.json b/prime-router/src/main/kotlin/common/piithere.json deleted file mode 100644 index 0fa1f11ae26..00000000000 --- a/prime-router/src/main/kotlin/common/piithere.json +++ /dev/null @@ -1,1930 +0,0 @@ -{ - "resourceType": { - "isString": true, - "content": "Bundle", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": { - "value": { - "isString": true, - "content": "ac108756-2162-470c-8a00-a189b3e94a54", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "type": { - "isString": true, - "content": "message", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "timestamp": { - "isString": true, - "content": "2023-10-18T22:20:22.347Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "entry": [ - { - "fullUrl": { - "isString": true, - "content": "MessageHeader/c7414da3-edc1-4a3e-9c5c-8d7a8e5cf775", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "MessageHeader", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "c7414da3-edc1-4a3e-9c5c-8d7a8e5cf775", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "meta": { - "tag": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0103", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "T", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Training", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "eventCoding": { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0003", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "R01", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "ORU/ACK - Unsolicited transmission of an observation message", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "destination": [ - { - "name": { - "isString": true, - "content": "PRIME ReportStream", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "endpoint": { - "isString": true, - "content": "https://prime.cdc.gov/api/reports?option=SkipInvalidItems", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "sender": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "source": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-binary-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueString": { - "isString": true, - "content": "e3d085e", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueInstant": { - "isString": true, - "content": "2023-10-18T21:06:03Z", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueReference": { - "reference": { - "isString": true, - "content": "Organization/07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "software": { - "isString": true, - "content": "PRIME SimpleReport", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "version": { - "isString": true, - "content": "e3d085e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "endpoint": { - "isString": true, - "content": "https://simplereport.gov", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "focus": [ - { - "reference": { - "isString": true, - "content": "Provenance/cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "DiagnosticReport/ac108756-2162-470c-8a00-a189b3e94a54", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Provenance/cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Provenance", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "cad7f8ea-6bd0-417f-8efd-7154228654e8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "recorded": { - "isString": true, - "content": "2023-10-18T22:20:22.347Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "activity": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0003", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "R01", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "ORU/ACK - Unsolicited transmission of an observation message", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "agent": [ - { - "who": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "DiagnosticReport/ac108756-2162-470c-8a00-a189b3e94a54", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "DiagnosticReport", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "ac108756-2162-470c-8a00-a189b3e94a54", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "ac108756-2162-470c-8a00-a189b3e94a54", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "basedOn": [ - { - "reference": { - "isString": true, - "content": "ServiceRequest/b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95941-1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "2023-10-18T22:20:22+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "specimen": [ - { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "result": [ - { - "reference": { - "isString": true, - "content": "Observation/29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Patient", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "extension": [ - { - "url": { - "isString": true, - "content": "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "ASKU", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "refused", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0189", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Not Hispanic or Latino", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Not Hispanic or Latino", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "identifier": [ - { - "value": { - "isString": true, - "content": "283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "name": [ - { - "family": { - "isString": true, - "content": " I", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "given": [ - { - "isString": true, - "content": "Deane", - "coerceToInlineType$kotlinx_serialization_json": null - } - ] - } - ], - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12124126721", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "home", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "system": { - "isString": true, - "content": "email", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "ChongDenesik@gmail.com", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "home", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "gender": { - "isString": true, - "content": "female", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "birthDate": { - "isString": true, - "content": "2017-01-30", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "address": [ - { - "line": [ - { - "isString": true, - "content": "863 Glady Rue", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Myrtle", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Texas", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "65263", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "managingOrganization": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Organization", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0301", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "CLIA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "value": { - "isString": true, - "content": "12D3456789", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "name": { - "isString": true, - "content": "Carl Potts", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12505245506", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "system": { - "isString": true, - "content": "email", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "MozelleMarksIII@gmail.com", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "address": [ - { - "line": [ - { - "isString": true, - "content": "661 Ondricka Point", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Avilla", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Lawrence", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "64126", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Practitioner/48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Practitioner", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "name": [ - { - "family": { - "isString": true, - "content": " Graham", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "given": [ - { - "isString": true, - "content": "Ashleigh", - "coerceToInlineType$kotlinx_serialization_json": null - } - ] - } - ], - "telecom": [ - { - "system": { - "isString": true, - "content": "phone", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "value": { - "isString": true, - "content": "12040411872", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "use": { - "isString": true, - "content": "work", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "address": [ - { - "line": [ - { - "isString": true, - "content": "168 Moore Groves", - "coerceToInlineType$kotlinx_serialization_json": null - } - ], - "city": { - "isString": true, - "content": "Rosendale", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "district": { - "isString": true, - "content": "Iron", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "state": { - "isString": true, - "content": "MO", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "postalCode": { - "isString": true, - "content": "64145", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "country": { - "isString": true, - "content": "USA", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Specimen", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "7fc4aee2-c426-4b2b-953c-86c877ff9bd0", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "697989009", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Anterior nares swab", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "receivedTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "collection": { - "collectedDateTime": { - "isString": true, - "content": "2023-10-18T22:05:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "ServiceRequest/b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "ServiceRequest", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "b0ba1f7e-f36e-4fc6-9f88-5ee8b3de58a1", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-control", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0119", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "RE", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-effective-date", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueDateTime": { - "isString": true, - "content": "2023-10-18T22:20:20+00:00", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "status": { - "isString": true, - "content": "completed", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "intent": { - "isString": true, - "content": "order", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95941-1", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "requester": { - "reference": { - "isString": true, - "content": "PractitionerRole/2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "supportingInfo": [ - { - "reference": { - "isString": true, - "content": "Observation/2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - { - "reference": { - "isString": true, - "content": "Observation/efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Device", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "value": { - "isString": true, - "content": "00884999048034", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "manufacturer": { - "isString": true, - "content": "Abbott", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "deviceName": [ - { - "name": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "isString": true, - "content": "model-name", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "PractitionerRole/2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "PractitionerRole", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "2d79a27c-2a8f-4f4c-a913-da434cac0203", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "practitioner": { - "reference": { - "isString": true, - "content": "Practitioner/48db8ab7-c884-4cf7-9a4f-b5fe6efb37da", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "organization": { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Organization/07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Organization", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "07640c5d-87cd-488b-9343-a226c5166539", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "name": { - "isString": true, - "content": "SimpleReport", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "29574070-adfc-4d53-a48f-5ddcc382614e", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "85477-8", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Flu A", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "2003-12-25T07:46:58.110Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1991-08-11T15:05:25.378Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCoding": { - "code": { - "isString": true, - "content": "Alinity m Resp-4-Plex_Abbott Molecular Inc.", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "99a3d501-90c1-467b-b4a3-568f5af5178d", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "85478-6", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Flu B", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1996-05-19T23:25:45.871Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1961-11-24T16:11:02.627Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "extension": [ - { - "url": { - "isString": true, - "content": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCoding": { - "code": { - "isString": true, - "content": "Alinity m Resp-4-Plex_Abbott Molecular Inc.", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - ], - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "e7fdd44c-9625-469d-b891-7a7e706680a0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "94500-6", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "COVID-19", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1966-10-31T11:23:28.181Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1971-05-26T06:18:40.872Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "performer": [ - { - "reference": { - "isString": true, - "content": "Organization/9e22cfde-e704-4922-a247-b1a6ac0f43bc", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://snomed.info/sct", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "260373001", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Detected", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "interpretation": [ - { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v2-0078", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "A", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Abnormal", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - ], - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "method": { - "coding": [ - { - "display": { - "isString": true, - "content": "Alinity m", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "specimen": { - "reference": { - "isString": true, - "content": "Specimen/52a582e4-d389-42d0-b738-bee51cf5244d", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "device": { - "reference": { - "isString": true, - "content": "Device/a72e8edb-bb54-47b1-83ed-938aaed01122", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "2ddc518f-ee1c-3cf2-8126-de380f388293", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95419-8", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Has symptoms related to condition of interest", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Has symptoms related to condition of interest", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1999-10-19T14:50:51.489Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1981-08-18T12:23:05.985Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "UNK", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "unknown", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "71280434-d4a7-3488-bc8b-5a0b76f71437", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95418-0", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Employed in a healthcare setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Employed in a healthcare setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1967-06-09T22:05:58.750Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1975-10-23T13:33:40.186Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/ValueSet/v2-0136", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "No", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - }, - { - "fullUrl": { - "isString": true, - "content": "Observation/efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "resource": { - "resourceType": { - "isString": true, - "content": "Observation", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "id": { - "isString": true, - "content": "efd7b2e6-7f1b-3e6f-a970-bcf20941cd6a", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "identifier": [ - { - "use": { - "isString": true, - "content": "official", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "type": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "81959-9", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Public health laboratory ask at order entry panel", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ], - "status": { - "isString": true, - "content": "final", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://loinc.org", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "95421-4", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "Resides in a congregate care setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ], - "text": { - "isString": true, - "content": "Resides in a congregate care setting", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "subject": { - "reference": { - "isString": true, - "content": "Patient/283f16c8-0a61-487f-af1b-50fe0dbdb2a8", - "coerceToInlineType$kotlinx_serialization_json": null - } - }, - "effectiveDateTime": { - "isString": true, - "content": "1946-04-06T02:01:36.795Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "issued": { - "isString": true, - "content": "1983-07-07T22:56:38.488Z", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "valueCodeableConcept": { - "coding": [ - { - "system": { - "isString": true, - "content": "http://terminology.hl7.org/ValueSet/v2-0136", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "code": { - "isString": true, - "content": "N", - "coerceToInlineType$kotlinx_serialization_json": null - }, - "display": { - "isString": true, - "content": "No", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - }, - "note": [ - { - "text": { - "isString": true, - "content": "I am some random text", - "coerceToInlineType$kotlinx_serialization_json": null - } - } - ] - } - } - ] -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/azure/FHIRFunctions.kt b/prime-router/src/main/kotlin/fhirengine/azure/FHIRFunctions.kt index 3d50e1bf9e9..b4ae24f5c31 100644 --- a/prime-router/src/main/kotlin/fhirengine/azure/FHIRFunctions.kt +++ b/prime-router/src/main/kotlin/fhirengine/azure/FHIRFunctions.kt @@ -4,7 +4,6 @@ import com.microsoft.azure.functions.annotation.BindingName import com.microsoft.azure.functions.annotation.FunctionName import com.microsoft.azure.functions.annotation.QueueTrigger import com.microsoft.azure.functions.annotation.StorageAccount -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogger import gov.cdc.prime.router.azure.ActionHistory import gov.cdc.prime.router.azure.DataAccessTransaction @@ -16,13 +15,10 @@ import gov.cdc.prime.router.common.BaseEngine import gov.cdc.prime.router.fhirengine.engine.FHIRConverter import gov.cdc.prime.router.fhirengine.engine.FHIRDestinationFilter import gov.cdc.prime.router.fhirengine.engine.FHIREngine -import gov.cdc.prime.router.fhirengine.engine.FHIRReceiver import gov.cdc.prime.router.fhirengine.engine.FHIRReceiverFilter import gov.cdc.prime.router.fhirengine.engine.FHIRTranslator -import gov.cdc.prime.router.fhirengine.engine.FhirReceiveQueueMessage -import gov.cdc.prime.router.fhirengine.engine.PrimeRouterQueueMessage +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.engine.ReportPipelineMessage -import gov.cdc.prime.router.fhirengine.engine.initializeQueueMessages import org.apache.commons.lang3.StringUtils import org.apache.logging.log4j.kotlin.Logging @@ -33,23 +29,6 @@ class FHIRFunctions( private val queueAccess: QueueAccess = QueueAccess, ) : Logging { - /** - * An azure function for ingesting and recording submissions - */ - @FunctionName("receive-fhir") - @StorageAccount("AzureWebJobsStorage") - fun receive( - @QueueTrigger(name = "message", queueName = QueueMessage.elrReceiveQueueName) - message: String, - // Number of times this message has been dequeued - @BindingName("DequeueCount") dequeueCount: Int = 1, - ) { - logger.info( - "message consumed from elr-fhir-receive queue" - ) - process(message, dequeueCount, FHIRReceiver(), ActionHistory(TaskAction.receive)) - } - /** * An azure function for ingesting full-ELR HL7 data and converting it to FHIR */ @@ -120,7 +99,7 @@ class FHIRFunctions( ) { val messagesToDispatch = runFhirEngine(message, dequeueCount, fhirEngine, actionHistory) messagesToDispatch.forEach { - (it as PrimeRouterQueueMessage).send(queueAccess) + it.send(queueAccess) } } @@ -158,23 +137,8 @@ class FHIRFunctions( logger.debug( "${StringUtils.removeEnd(engineType, "e")}ing message: $message for the $dequeueCount time" ) - // initialize the json types in PrimeRouterQueueMessage - initializeQueueMessages() - return when (val queueMessage = QueueMessage.deserialize(message)) { - is QueueMessage.ReceiveQueueMessage -> { - FhirReceiveQueueMessage( - queueMessage.reportId, - queueMessage.blobURL, - queueMessage.digest, - queueMessage.blobSubFolderName, - queueMessage.headers - ) - } - else -> { - queueMessage as ReportPipelineMessage - } - } + return QueueMessage.deserialize(message) as ReportPipelineMessage } /** diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index a831daa3b7d..319e485e2d6 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -11,8 +11,6 @@ import fhirengine.engine.CustomFhirPathFunctions import fhirengine.engine.IProcessedItem import fhirengine.engine.ProcessedFHIRItem import fhirengine.engine.ProcessedHL7Item -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogDetail import gov.cdc.prime.router.ActionLogScope import gov.cdc.prime.router.ActionLogger @@ -94,19 +92,22 @@ class FHIRConverter( message: T, actionLogger: ActionLogger, actionHistory: ActionHistory, - ): List = when (message) { - is FhirConvertQueueMessage -> { - fhirEngineRunResults(message, message.schemaName, actionLogger, actionHistory) - } - else -> { - throw RuntimeException( - "Message was not a FhirConvert and cannot be processed: $message" - ) + ): List { + return when (message) { + is FhirConvertQueueMessage -> { + fhirEngineRunResults(message, message.schemaName, actionLogger, actionHistory) + } + + else -> { + throw RuntimeException( + "Message was not a FhirConvert and cannot be processed: $message" + ) + } } } private fun fhirEngineRunResults( - queueMessage: FhirConvertQueueMessage, + queueMessage: ReportPipelineMessage, schemaName: String, actionLogger: ActionLogger, actionHistory: ActionHistory, @@ -261,14 +262,14 @@ class FHIRConverter( ) } - FHIREngineRunResult( + FHIREngineRunResult( routeEvent, report, blobInfo.blobUrl, FhirDestinationFilterQueueMessage( report.id, blobInfo.blobUrl, - BlobUtils.digestToString(blobInfo.digest), + BlobAccess.digestToString(blobInfo.digest), queueMessage.blobSubFolderName, queueMessage.topic ) @@ -350,12 +351,12 @@ class FHIRConverter( */ internal fun process( format: MimeFormat, - queueMessage: FhirConvertQueueMessage, + queueMessage: ReportPipelineMessage, actionLogger: ActionLogger, routeReportWithInvalidItems: Boolean = true, ): List> { val validator = queueMessage.topic.validator - val rawReport = BlobAccess.downloadBlob(queueMessage.blobURL, queueMessage.digest) + val rawReport = queueMessage.downloadContent() return if (rawReport.isBlank()) { actionLogger.error(InvalidReportMessage("Provided raw data is empty.")) emptyList() @@ -645,7 +646,8 @@ class FHIRConverter( * Using this function instead of calling the constructor directly simplifies the process of mocking the * transformer in tests. */ - fun getTransformerFromSchema(schemaName: String): FhirTransformer? = if (schemaName.isNotBlank()) { + fun getTransformerFromSchema(schemaName: String): FhirTransformer? { + return if (schemaName.isNotBlank()) { withLoggingContext(mapOf("schemaName" to schemaName)) { logger.info("Apply a sender transform to the items in the report") } @@ -653,4 +655,5 @@ class FHIRConverter( } else { null } + } } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRDestinationFilter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRDestinationFilter.kt index e834b6feea4..d8120485d4b 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRDestinationFilter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRDestinationFilter.kt @@ -1,8 +1,6 @@ package gov.cdc.prime.router.fhirengine.engine import fhirengine.engine.CustomFhirPathFunctions -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogger import gov.cdc.prime.router.CustomerStatus import gov.cdc.prime.router.Metadata @@ -90,7 +88,7 @@ class FHIRDestinationFilter( * [actionHistory] ensures all activities are logged. */ private fun fhirEngineRunResults( - queueMessage: FhirDestinationFilterQueueMessage, + queueMessage: ReportPipelineMessage, actionHistory: ActionHistory, ): List { val contextMap = mapOf( @@ -108,7 +106,7 @@ class FHIRDestinationFilter( val fhirJson = LogMeasuredTime.measureAndLogDurationWithReturnedValue( "Downloaded content from queue message" ) { - BlobAccess.downloadBlob(queueMessage.blobURL, queueMessage.digest) + queueMessage.downloadContent() } val bundle = FhirTranscoder.decode(fhirJson) val bodyString = FhirTranscoder.encode(bundle) @@ -209,7 +207,7 @@ class FHIRDestinationFilter( FhirReceiverFilterQueueMessage( report.id, blobInfo.blobUrl, - BlobUtils.digestToString(blobInfo.digest), + BlobAccess.digestToString(blobInfo.digest), queueMessage.blobSubFolderName, queueMessage.topic, receiver.fullName diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIREngine.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIREngine.kt index 6ec0e6dabdc..e498f806a3c 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIREngine.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIREngine.kt @@ -1,6 +1,5 @@ package gov.cdc.prime.router.fhirengine.engine -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogger import gov.cdc.prime.router.InvalidReportMessage import gov.cdc.prime.router.Metadata @@ -123,14 +122,6 @@ abstract class FHIREngine( // create the correct FHIREngine type for the action being taken return when (taskAction) { - TaskAction.receive -> FHIRReceiver( - metadata ?: Metadata.getInstance(), - settingsProvider!!, - databaseAccess ?: databaseAccessSingleton, - blobAccess ?: BlobAccess(), - azureEventService ?: AzureEventServiceImpl(), - reportService ?: ReportService(), - ) TaskAction.process -> FHIRConverter( metadata ?: Metadata.getInstance(), settingsProvider!!, diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiver.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiver.kt deleted file mode 100644 index 2a12444e552..00000000000 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiver.kt +++ /dev/null @@ -1,378 +0,0 @@ -package gov.cdc.prime.router.fhirengine.engine - -import ca.uhn.hl7v2.model.Message -import com.microsoft.azure.functions.HttpStatus -import gov.cdc.prime.reportstream.shared.QueueMessage -import gov.cdc.prime.reportstream.shared.Submission -import gov.cdc.prime.router.ActionLogger -import gov.cdc.prime.router.ClientSource -import gov.cdc.prime.router.CustomerStatus -import gov.cdc.prime.router.InvalidParamMessage -import gov.cdc.prime.router.InvalidReportMessage -import gov.cdc.prime.router.Metadata -import gov.cdc.prime.router.MimeFormat -import gov.cdc.prime.router.Options -import gov.cdc.prime.router.Report -import gov.cdc.prime.router.Sender -import gov.cdc.prime.router.SettingsProvider -import gov.cdc.prime.router.azure.ActionHistory -import gov.cdc.prime.router.azure.BlobAccess -import gov.cdc.prime.router.azure.DatabaseAccess -import gov.cdc.prime.router.azure.Event -import gov.cdc.prime.router.azure.ProcessEvent -import gov.cdc.prime.router.azure.SubmissionTableService -import gov.cdc.prime.router.azure.db.Tables -import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.observability.context.MDCUtils -import gov.cdc.prime.router.azure.observability.context.withLoggingContext -import gov.cdc.prime.router.azure.observability.event.AzureEventService -import gov.cdc.prime.router.azure.observability.event.AzureEventServiceImpl -import gov.cdc.prime.router.azure.observability.event.ReportStreamEventName -import gov.cdc.prime.router.azure.observability.event.ReportStreamEventProperties -import gov.cdc.prime.router.common.AzureHttpUtils.getSenderIP -import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder -import gov.cdc.prime.router.fhirengine.utils.HL7Reader -import gov.cdc.prime.router.report.ReportService -import org.jooq.Field -import java.time.OffsetDateTime - -/** - * FHIRReceiver is responsible for processing messages from the elr-fhir-receive azure queue - * and storing them for the next step in the pipeline. - * - * @param metadata Mockable metadata instance. - * @param settings Mockable settings provider. - * @param db Mockable database access. - * @param blob Mockable blob storage access. - * @param azureEventService Service for handling Azure events. - * @param reportService Service for handling report-related operations. - * @param submissionTableService Service for inserting to the submission azure storage table. - */ -class FHIRReceiver( - metadata: Metadata = Metadata.getInstance(), - settings: SettingsProvider = this.settingsProviderSingleton, - db: DatabaseAccess = this.databaseAccessSingleton, - blob: BlobAccess = BlobAccess(), - azureEventService: AzureEventService = AzureEventServiceImpl(), - reportService: ReportService = ReportService(), - val submissionTableService: SubmissionTableService = SubmissionTableService.getInstance(), -) : FHIREngine(metadata, settings, db, blob, azureEventService, reportService) { - - override val finishedField: Field = Tables.TASK.PROCESSED_AT - - override val engineType: String = "Receive" - - private val clientIdHeader = "client_id" - private val contentTypeHeader = "content-type" - - /** - * Processes a message of type [QueueMessage]. This message can be in either HL7 or FHIR format and will be placed - * on a queue for further processing. - * - * @param message The incoming message to be logged and processed. - * @param actionLogger Logger to track actions and errors. - * @param actionHistory Tracks the history of actions performed. - * @return A list of results from the FHIR engine run. - */ - override fun doWork( - message: T, - actionLogger: ActionLogger, - actionHistory: ActionHistory, - ): List = when (message) { - is FhirReceiveQueueMessage -> processFhirReceiveQueueMessage(message, actionLogger, actionHistory) - else -> throw RuntimeException("Message was not a FhirReceive and cannot be processed: $message") - } - - /** - * Processes the FHIR receive queue message. - * - * @param queueMessage The queue message containing details about the report. - * @param actionLogger The logger used to track actions and errors. - * @param actionHistory The action history related to receiving the report. - * @return A list of FHIR engine run results. - */ - private fun processFhirReceiveQueueMessage( - queueMessage: FhirReceiveQueueMessage, - actionLogger: ActionLogger, - actionHistory: ActionHistory, - ): List { - val contextMap = createLoggingContextMap(queueMessage, actionHistory) - // Use the logging context for tracing - withLoggingContext(contextMap) { - actionLogger.setReportId(queueMessage.reportId) - val sender = getSender(queueMessage, actionLogger, actionHistory) ?: return emptyList() - - // Process the message if no errors occurred - return handleSuccessfulProcessing(queueMessage, sender, actionLogger, actionHistory) - } - } - - /** - * Creates the logging context map. - * - * @param queueMessage The queue message containing details about the report. - * @param actionHistory The action history related to receiving the report. - * @return The logging context map. - */ - private fun createLoggingContextMap( - queueMessage: FhirReceiveQueueMessage, - actionHistory: ActionHistory, - ): Map = mapOf( - MDCUtils.MDCProperty.ACTION_NAME to actionHistory.action.actionName.name, - MDCUtils.MDCProperty.REPORT_ID to queueMessage.reportId, - MDCUtils.MDCProperty.BLOB_URL to queueMessage.blobURL, - ) - - /** - * Retrieves the sender based on the queue message and logs any relevant errors. - * - * @param queueMessage The queue message containing details about the report. - * @param actionLogger The logger used to track actions and errors. - * @param actionHistory The action history related to receiving the report. - * @return The sender, or null if the sender was not found or is inactive. - */ - private fun getSender( - queueMessage: FhirReceiveQueueMessage, - actionLogger: ActionLogger, - actionHistory: ActionHistory, - ): Sender? { - val clientId = queueMessage.headers[clientIdHeader] - val sender = clientId?.takeIf { it.isNotBlank() }?.let { settings.findSender(it) } - - actionHistory.trackActionParams(queueMessage.headers.toString()) - - // Handle case where sender is not found - return if (sender == null) { - // Send an error event - reportEventService.sendSubmissionProcessingError( - ReportStreamEventName.REPORT_NOT_RECEIVABLE, - TaskAction.receive, - "Sender is not found in matching client id: ${queueMessage.headers[clientIdHeader]}.", - queueMessage.reportId, - queueMessage.blobURL - ) { - params( - actionLogger.errors.associateBy { ReportStreamEventProperties.PROCESSING_ERROR } - .plus( - mapOf( - ReportStreamEventProperties.REQUEST_PARAMETERS to queueMessage.headers.toString(), - ) - ) - ) - } - - // Insert the rejection into the submission table - val submission = - Submission( - queueMessage.reportId.toString(), "Rejected", - queueMessage.blobURL, - "Sender not found matching client_id: ${queueMessage.headers[clientIdHeader]}" - ) - submissionTableService.insertSubmission(submission) - null - } else { - // Handle case where sender is inactive - if (sender.customerStatus == CustomerStatus.INACTIVE) { - // Track the action result and log the error - actionHistory.trackActionResult(HttpStatus.NOT_ACCEPTABLE) - actionLogger.error( - InvalidParamMessage("Sender has customer status INACTIVE: " + queueMessage.headers[clientIdHeader]) - ) - } - - // Track sender information - actionHistory.trackActionSenderInfo(sender.fullName, queueMessage.headers["payloadname"]) - actionHistory.trackActionResult(HttpStatus.CREATED) - sender - } - } - - /** - * Handles successful processing of the queue message. - * - * @param queueMessage The queue message containing details about the report. - * @param sender The sender information. - * @param actionHistory The action history related to receiving the report. - * @return A list of FHIR engine run results. - */ - private fun handleSuccessfulProcessing( - queueMessage: FhirReceiveQueueMessage, - sender: Sender, - actionLogger: ActionLogger, - actionHistory: ActionHistory, - ): List { - // Get content from blob storage and create report - val report = validateSubmissionMessage(sender, actionLogger, queueMessage) ?: return emptyList() - - // Determine the mime format of the message - val mimeFormat = - MimeFormat.valueOfFromMimeType( - queueMessage.headers[contentTypeHeader]?.substringBefore(';') ?: "" - ) - - val blobInfo = BlobAccess.BlobInfo( - mimeFormat, - queueMessage.blobURL, - queueMessage.digest.toByteArray() - ) - - actionHistory.trackExternalInputReport( - report, - blobInfo - ) - - // Send an event indicating the report was received - reportEventService.sendReportEvent( - eventName = ReportStreamEventName.REPORT_RECEIVED, - childReport = report, - pipelineStepName = TaskAction.receive - ) { - params( - listOfNotNull( - ReportStreamEventProperties.REQUEST_PARAMETERS to queueMessage.headers.toString(), - ReportStreamEventProperties.SENDER_NAME to sender.fullName, - ReportStreamEventProperties.FILE_LENGTH to queueMessage.headers["content-length"].toString(), - getSenderIP(queueMessage.headers)?.let { ReportStreamEventProperties.SENDER_IP to it }, - ReportStreamEventProperties.ITEM_FORMAT to mimeFormat - ).toMap() - ) - } - - // Insert the acceptance into the submissions table - val tableEntity = Submission( - queueMessage.reportId.toString(), - "Accepted", - queueMessage.blobURL, - actionLogger.errors.takeIf { it.isNotEmpty() }?.map { it.detail.message }?.toString() - ) - submissionTableService.insertSubmission(tableEntity) - - return if (actionLogger.errors.isNotEmpty()) { - // Send an event indicating the report was received - reportEventService.sendReportProcessingError( - ReportStreamEventName.REPORT_NOT_PROCESSABLE, - report, - TaskAction.receive, - "Submitted report was either empty or could not be parsed." - ) { - params( - actionLogger.errors.associateBy { ReportStreamEventProperties.PROCESSING_ERROR } - .plus( - mapOf( - ReportStreamEventProperties.REQUEST_PARAMETERS to queueMessage.headers.toString(), - ) - ) - ) - } - emptyList() - } else { - // Create a route event - val routeEvent = ProcessEvent(Event.EventAction.CONVERT, report.id, Options.None, emptyMap(), emptyList()) - - // Return the result of the FHIR engine run - listOf( - FHIREngineRunResult( - routeEvent, - report, - queueMessage.blobURL, - FhirConvertQueueMessage( - report.id, - queueMessage.blobURL, - queueMessage.digest, - queueMessage.blobSubFolderName, - sender.topic, - sender.schemaName - ) - ) - ) - } - } - - private fun validateSubmissionMessage( - sender: Sender, - actionLogger: ActionLogger, - queueMessage: FhirReceiveQueueMessage, - ): Report? { - val rawReport = BlobAccess.downloadBlob(queueMessage.blobURL, queueMessage.digest) - return if (rawReport.isBlank()) { - actionLogger.error(InvalidReportMessage("Provided raw data is empty.")) - null - } else { - val report: Report - val sources = listOf(ClientSource(organization = sender.organizationName, client = sender.name)) - - when (sender.format) { - MimeFormat.HL7 -> { - val messages: List = HL7Reader(actionLogger).getMessages(rawReport) - val isBatch: Boolean = HL7Reader(actionLogger).isBatch(rawReport, messages.size) - // create a Report for this incoming HL7 message to use for tracking in the database - - report = Report( - if (isBatch) MimeFormat.HL7_BATCH else MimeFormat.HL7, - sources, - messages.size, - metadata = metadata, - nextAction = TaskAction.convert, - topic = sender.topic, - id = queueMessage.reportId, - bodyURL = queueMessage.blobURL - ) - - // check for valid message type - messages.forEachIndexed { idx, element -> - MessageType.validateMessageType(element, actionLogger, idx + 1) - } - } - - MimeFormat.FHIR -> { - val bundles = FhirTranscoder.getBundles(rawReport, actionLogger) - report = Report( - MimeFormat.FHIR, - sources, - bundles.size, - metadata = metadata, - nextAction = TaskAction.convert, - topic = sender.topic, - id = queueMessage.reportId, - bodyURL = queueMessage.blobURL - ) - } - - else -> { - actionLogger.error(InvalidReportMessage("Unsupported sender format: ${sender.format}")) - reportEventService.sendSubmissionProcessingError( - ReportStreamEventName.REPORT_NOT_PROCESSABLE, - TaskAction.receive, - "Unsupported sender format ${sender.format}.", - queueMessage.reportId, - queueMessage.blobURL - ) { - params( - actionLogger.errors.associateBy { ReportStreamEventProperties.PROCESSING_ERROR } - .plus( - mapOf( - ReportStreamEventProperties.REQUEST_PARAMETERS to queueMessage.headers.toString(), - ReportStreamEventProperties.SENDER_NAME to sender.fullName, - ReportStreamEventProperties.FILE_LENGTH to queueMessage.headers["content-length"] - .toString(), - ReportStreamEventProperties.SENDER_IP to (getSenderIP(queueMessage.headers) ?: ""), - ReportStreamEventProperties.ITEM_FORMAT to sender.format - ) - ) - ) - } - // Insert the acceptance into the submissions table - val tableEntity = Submission( - queueMessage.reportId.toString(), - "Rejected", - queueMessage.blobURL, - actionLogger.errors.takeIf { it.isNotEmpty() }?.map { it.detail.message }?.toString() - ) - submissionTableService.insertSubmission(tableEntity) - throw IllegalStateException("Unsupported sender format: ${sender.format}") - } - } - report - } - } -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiverFilter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiverFilter.kt index cc732026df9..eb6313974b0 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiverFilter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRReceiverFilter.kt @@ -2,8 +2,6 @@ package gov.cdc.prime.router.fhirengine.engine import com.fasterxml.jackson.annotation.JsonProperty import fhirengine.engine.CustomFhirPathFunctions -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogDetail import gov.cdc.prime.router.ActionLogScope import gov.cdc.prime.router.ActionLogger @@ -342,7 +340,7 @@ class FHIRReceiverFilter( // download and parse FHIR document val fhirJson = LogMeasuredTime.measureAndLogDurationWithReturnedValue( "Downloaded content from queue message" - ) { BlobAccess.downloadBlob(queueMessage.blobURL, queueMessage.digest) } + ) { queueMessage.downloadContent() } val bundle = FhirTranscoder.decode(fhirJson) actionHistory.trackActionReceiverInfo(receiver.organizationName, receiver.name) @@ -391,7 +389,7 @@ class FHIRReceiverFilter( FhirTranslateQueueMessage( report.id, blobInfo.blobUrl, - BlobUtils.digestToString(blobInfo.digest), + BlobAccess.digestToString(blobInfo.digest), queueMessage.blobSubFolderName, queueMessage.topic, receiver.fullName diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt index 506c9b2cfd7..7e31a8a7e50 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt @@ -6,7 +6,6 @@ import ca.uhn.hl7v2.model.Segment import ca.uhn.hl7v2.util.Terser import fhirengine.engine.CustomFhirPathFunctions import fhirengine.engine.CustomTranslationFunctions -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLogger import gov.cdc.prime.router.CustomerStatus import gov.cdc.prime.router.Hl7Configuration @@ -64,17 +63,18 @@ class FHIRTranslator( actionLogger: ActionLogger, actionHistory: ActionHistory, ): List { - when (message) { - is FhirTranslateQueueMessage -> { - val contextMap = mapOf( - MDCUtils.MDCProperty.ACTION_NAME to actionHistory.action.actionName.name, - MDCUtils.MDCProperty.REPORT_ID to message.reportId, - MDCUtils.MDCProperty.TOPIC to message.topic, - MDCUtils.MDCProperty.BLOB_URL to message.blobURL - ) - withLoggingContext(contextMap) { - logger.trace("Starting translate work") - actionHistory.trackExistingInputReport(message.reportId) + message as ReportPipelineMessage + val contextMap = mapOf( + MDCUtils.MDCProperty.ACTION_NAME to actionHistory.action.actionName.name, + MDCUtils.MDCProperty.REPORT_ID to message.reportId, + MDCUtils.MDCProperty.TOPIC to message.topic, + MDCUtils.MDCProperty.BLOB_URL to message.blobURL + ) + withLoggingContext(contextMap) { + logger.trace("Starting translate work") + actionHistory.trackExistingInputReport(message.reportId) + when (message) { + is FhirTranslateQueueMessage -> { val receiver = settings.findReceiver(message.receiverFullName) ?: throw RuntimeException("Receiver with name ${message.receiverFullName} was not found") actionHistory.trackActionReceiverInfo(receiver.organizationName, receiver.name) @@ -84,13 +84,13 @@ class FHIRTranslator( listOf(sendTranslated(message, receiver, actionHistory)) } } - } - else -> { - // Handle the case where casting failed - throw RuntimeException( - "Message was not a FhirTranslateQueueMessage and cannot be " + - "processed by FHIRTranslator: $message" - ) + + else -> { + throw RuntimeException( + "Message was not a FhirTranslateQueueMessage and cannot be " + + "processed by FHIRTranslator: $message" + ) + } } } } @@ -145,10 +145,7 @@ class FHIRTranslator( actionHistory: ActionHistory, ): FHIREngineRunResult { logger.trace("Preparing to send translated message") - val bodyBytes = - getByteArrayFromBundle( - receiver, FhirTranscoder.decode(BlobAccess.downloadBlob(message.blobURL, message.digest)) - ) + val bodyBytes = getByteArrayFromBundle(receiver, FhirTranscoder.decode(message.downloadContent())) val (report, event, blobInfo) = Report.generateReportAndUploadBlob( Event.EventAction.BATCH, @@ -224,7 +221,7 @@ class FHIRTranslator( val converter = FhirToHl7Converter( receiver.schemaName, - BlobAccess.BlobContainerMetadata.build("metadata", Environment.get().storageEnvVar), + BlobAccess.BlobContainerMetadata.build("metadata", Environment.get().blobEnvVar), context = FhirToHl7Context(CustomFhirPathFunctions(), config, CustomTranslationFunctions()) ) val hl7Message = converter.process(bundle) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/MessageType.kt b/prime-router/src/main/kotlin/fhirengine/engine/MessageType.kt deleted file mode 100644 index 7251f9d5460..00000000000 --- a/prime-router/src/main/kotlin/fhirengine/engine/MessageType.kt +++ /dev/null @@ -1,64 +0,0 @@ -package gov.cdc.prime.router.fhirengine.engine - -import ca.uhn.hl7v2.model.Message -import gov.cdc.prime.router.ActionLogger -import gov.cdc.prime.router.InvalidHL7Message -import fhirengine.translation.hl7.structures.nistelr251.segment.MSH as NIST_MSH - -/** - * Class representing a specific HL7 message type. - * - * This class is used to validate that a given HL7 message matches the expected message type. - * - * @property expectedType The HL7 message type this instance represents. - */ -enum class MessageType { - - ORU_R01, - ORM_O01, - OML_O21, - ; - - companion object { - - /** - * Creates a MessageType instance from a string representation. - * - * @param type The string representation of the HL7 message type. - * @return The corresponding MessageType instance, or null if the type is unsupported. - */ - private fun fromString(type: String): MessageType? { - return when (type) { - "ORU_R01" -> ORU_R01 - "ORM_O01" -> ORM_O01 - "OML_O21" -> OML_O21 - else -> null - } - } - - /** - * Validates the type of the given message. - * - * This method retrieves the message type from the message and checks if it matches any of the supported types. - * If the type is unsupported, an error is logged. - * - * @param message The HL7 message to be validated. - * @param actionLogs Logger to record the result of the validation. - * @param itemIndex The index of the item being processed, used for logging. - */ - fun validateMessageType(message: Message, actionLogs: ActionLogger, itemIndex: Int) { - // Determine the message type string from the MSH segment - val messageTypeStr = when (val msh = message.get("MSH")) { - is NIST_MSH -> msh.messageType.messageStructure.toString() - is ca.uhn.hl7v2.model.v251.segment.MSH -> msh.messageType.messageStructure.toString() - is ca.uhn.hl7v2.model.v27.segment.MSH -> msh.messageType.messageStructure.toString() - else -> "" - } - - // Convert the string representation to a MessageType instance and validate it - val messageType = fromString(messageTypeStr) - messageType ?: actionLogs.getItemLogger(itemIndex) - .error(InvalidHL7Message("Ignoring unsupported HL7 message type $messageType")) - } - } -} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/engine/PrimeRouterQueueMessage.kt b/prime-router/src/main/kotlin/fhirengine/engine/QueueMessage.kt similarity index 51% rename from prime-router/src/main/kotlin/fhirengine/engine/PrimeRouterQueueMessage.kt rename to prime-router/src/main/kotlin/fhirengine/engine/QueueMessage.kt index 6350a676a33..032ce14fc5c 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/PrimeRouterQueueMessage.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/QueueMessage.kt @@ -3,14 +3,24 @@ package gov.cdc.prime.router.fhirengine.engine import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo import com.fasterxml.jackson.annotation.JsonTypeName -import gov.cdc.prime.reportstream.shared.QueueMessage +import com.fasterxml.jackson.databind.DeserializationFeature +import com.fasterxml.jackson.databind.json.JsonMapper +import com.fasterxml.jackson.databind.jsontype.BasicPolymorphicTypeValidator +import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder +import com.fasterxml.jackson.module.kotlin.readValue import gov.cdc.prime.router.Options import gov.cdc.prime.router.ReportId import gov.cdc.prime.router.Topic +import gov.cdc.prime.router.azure.BlobAccess import gov.cdc.prime.router.azure.Event import gov.cdc.prime.router.azure.QueueAccess +import java.util.Base64 import java.util.UUID +// This is a size limit dictated by our infrastructure in azure +// https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted +private const val MESSAGE_SIZE_LIMIT = 64 * 1000 + /** * An interface for Messages to be put on an Azure Queue */ @@ -24,39 +34,84 @@ import java.util.UUID JsonSubTypes.Type(ProcessEventQueueMessage::class, name = "process"), JsonSubTypes.Type(ReportEventQueueMessage::class, name = "report") ) -abstract class PrimeRouterQueueMessage : QueueMessage { +abstract class QueueMessage { + abstract val messageQueueName: String + fun send(queueAccess: QueueAccess) { if (this.messageQueueName.isNotEmpty()) { queueAccess.sendMessage(this.messageQueueName, serialize()) } } + + fun serialize(): String { + val bytes = mapper.writeValueAsBytes(this) + check(bytes.size < MESSAGE_SIZE_LIMIT) { "Message is too big for the queue." } + return String(Base64.getEncoder().encode(bytes)) + } + + companion object { + private val ptv = BasicPolymorphicTypeValidator.builder() + .build() + val mapper: JsonMapper = jacksonMapperBuilder() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .polymorphicTypeValidator(ptv) + .activateDefaultTyping(ptv) + .build() + + fun deserialize(s: String): QueueMessage { + return mapper.readValue(s) + } + + const val elrConvertQueueName = "elr-fhir-convert" + const val elrDestinationFilterQueueName = "elr-fhir-destination-filter" + const val elrReceiverFilterQueueName = "elr-fhir-receiver-filter" + const val elrTranslationQueueName = "elr-fhir-translate" + const val elrSendQueueName = "send" + } + + override fun toString(): String { + return mapper.writeValueAsString(this) + } } -abstract class ReportPipelineMessage : - QueueMessage.ReportInformation, - PrimeRouterQueueMessage() +interface WithDownloadableReport { + val blobURL: String + val digest: String -@JsonTypeName("receive") -data class FhirReceiveQueueMessage( - override val reportId: ReportId, - override val blobURL: String, - override val digest: String, - override val blobSubFolderName: String, - override val headers: Map = emptyMap(), -) : ReportPipelineMessage(), QueueMessage.ReceiveInformation { - override val messageQueueName = QueueMessage.Companion.elrReceiveQueueName + /** + * Download the file associated with a RawSubmission message + */ + fun downloadContent(): String { + val blobContent = BlobAccess.downloadBlobAsByteArray(this.blobURL) + val localDigest = BlobAccess.digestToString(BlobAccess.sha256Digest(blobContent)) + check(this.digest == localDigest) { + "FHIR - Downloaded file does not match expected file\n${this.digest} | $localDigest" + } + return String(blobContent) + } +} + +interface ReportIdentifyingInformation { + val blobSubFolderName: String + val reportId: ReportId + val topic: Topic } +abstract class ReportPipelineMessage : + ReportIdentifyingInformation, + WithDownloadableReport, + QueueMessage() + @JsonTypeName("convert") data class FhirConvertQueueMessage( override val reportId: ReportId, override val blobURL: String, override val digest: String, override val blobSubFolderName: String, - var topic: Topic, - var schemaName: String = "", + override val topic: Topic, + val schemaName: String = "", ) : ReportPipelineMessage() { - override val messageQueueName = QueueMessage.Companion.elrConvertQueueName + override val messageQueueName = elrConvertQueueName } @JsonTypeName("destination-filter") @@ -65,9 +120,9 @@ data class FhirDestinationFilterQueueMessage( override val blobURL: String, override val digest: String, override val blobSubFolderName: String, - val topic: Topic, + override val topic: Topic, ) : ReportPipelineMessage() { - override val messageQueueName = QueueMessage.Companion.elrDestinationFilterQueueName + override val messageQueueName = elrDestinationFilterQueueName } @JsonTypeName("receiver-filter") @@ -76,10 +131,10 @@ data class FhirReceiverFilterQueueMessage( override val blobURL: String, override val digest: String, override val blobSubFolderName: String, - val topic: Topic, + override val topic: Topic, val receiverFullName: String, ) : ReportPipelineMessage() { - override val messageQueueName = QueueMessage.Companion.elrReceiverFilterQueueName + override val messageQueueName = elrReceiverFilterQueueName } @JsonTypeName("translate") @@ -88,13 +143,13 @@ data class FhirTranslateQueueMessage( override val blobURL: String, override val digest: String, override val blobSubFolderName: String, - val topic: Topic, + override val topic: Topic, val receiverFullName: String, ) : ReportPipelineMessage() { - override val messageQueueName = QueueMessage.Companion.elrTranslationQueueName + override val messageQueueName = elrTranslationQueueName } -abstract class WithEventAction : PrimeRouterQueueMessage() { +abstract class WithEventAction : QueueMessage() { abstract val eventAction: Event.EventAction } @@ -115,7 +170,7 @@ data class ReportEventQueueMessage( val reportId: UUID, val at: String, ) : WithEventAction() { - override val messageQueueName = QueueMessage.Companion.elrSendQueueName + override val messageQueueName = elrSendQueueName } @JsonTypeName("process") @@ -128,22 +183,4 @@ data class ProcessEventQueueMessage( val at: String, ) : WithEventAction() { override val messageQueueName = "" -} - -// Register submodule subtypes -fun registerPrimeRouterQueueMessageSubtypes() { - QueueMessage.ObjectMapperProvider.registerSubtypes( - FhirConvertQueueMessage::class.java, - FhirDestinationFilterQueueMessage::class.java, - FhirReceiverFilterQueueMessage::class.java, - FhirTranslateQueueMessage::class.java, - BatchEventQueueMessage::class.java, - ProcessEventQueueMessage::class.java, - ReportEventQueueMessage::class.java - ) -} - -// Call this function at the appropriate initialization point -fun initializeQueueMessages() { - registerPrimeRouterQueueMessageSubtypes() } \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/translation/hl7/FhirTransformer.kt b/prime-router/src/main/kotlin/fhirengine/translation/hl7/FhirTransformer.kt index ecfe4571007..8720b3ed611 100644 --- a/prime-router/src/main/kotlin/fhirengine/translation/hl7/FhirTransformer.kt +++ b/prime-router/src/main/kotlin/fhirengine/translation/hl7/FhirTransformer.kt @@ -36,7 +36,7 @@ class FhirTransformer( schema: String, blobConnectionInfo: BlobAccess.BlobContainerMetadata = BlobAccess.BlobContainerMetadata.build( "metadata", - Environment.get().storageEnvVar + Environment.get().blobEnvVar ), ) : this( schemaRef = fhirTransformSchemaFromFile(schema, blobConnectionInfo), diff --git a/prime-router/src/main/kotlin/transport/RESTTransport.kt b/prime-router/src/main/kotlin/transport/RESTTransport.kt index 7f7f0c8e448..46bc89ce262 100644 --- a/prime-router/src/main/kotlin/transport/RESTTransport.kt +++ b/prime-router/src/main/kotlin/transport/RESTTransport.kt @@ -113,7 +113,6 @@ class RESTTransport(private val httpClient: HttpClient? = null) : ITransport { if (restTransportInfo.authType == "apiKey") { val apiKeyCredential = credential as UserApiKeyCredential - httpHeaders["shared-api-key"] = apiKeyCredential.apiKey httpHeaders["System_ID"] = apiKeyCredential.user httpHeaders["Key"] = apiKeyCredential.apiKey accessToken = apiKeyCredential.apiKey diff --git a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-address.yml b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-address.yml index 4f3244f0067..52117eab502 100644 --- a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-address.yml +++ b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-address.yml @@ -2,9 +2,8 @@ elements: # removing the street address is more complicated because it is a list so we will do this in code - name: pii-removal-street-address2 - condition: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address").extension.where(url = "XAD.2").empty().not()' value: [ 'getFakeValueForElement("STREET_ADDRESS_2")' ] - bundleProperty: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address").extension.where(url = "XAD.2").value' + bundleProperty: '%resource.extension(%`rsext-xad-address`).extension.where(url = "XAD.2").value' - name: pii-removal-city value: [ 'getFakeValueForElement("CITY",%resource.state)' ] diff --git a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-name.yml b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-name.yml index 546e4581574..4968f5eac5a 100644 --- a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-name.yml +++ b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-name.yml @@ -6,6 +6,5 @@ elements: # removing a given name is more complicated because it is a list so we will do this in code - name: pii-removal-middle-name - condition: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name").exists()' value: [ 'getFakeValueForElement("PERSON_GIVEN_NAME")' ] - bundleProperty: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name").extension("XPN.2").value[x]' \ No newline at end of file + bundleProperty: '%resource.extension(%`rsext-xpn-human-name`).extension.where(url="XPN.3").value' \ No newline at end of file diff --git a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-telecom.yml b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-telecom.yml index ce9dc465a8b..fef6b43d8a6 100644 --- a/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-telecom.yml +++ b/prime-router/src/main/resources/metadata/fhir_transforms/common/remove-pii-telecom.yml @@ -2,7 +2,7 @@ elements: - name: pii-removal-phone-area-code condition: "%resource.where(system = 'phone')" value: [ 'getFakeValueForElement("TELEPHONE").substring(0,3)' ] - bundleProperty: '%resource.extension(`https://reportstream.cdc.gov/fhir/StructureDefinition/contactpoint-area`).value[x]' + bundleProperty: '%resource.extension(%`ext-contactpoint-area`).value' - name: pii-removal-local-phone condition: "%resource.where(system = 'phone')" diff --git a/prime-router/src/main/resources/metadata/fhir_transforms/common/suppress-device-information.yml b/prime-router/src/main/resources/metadata/fhir_transforms/common/suppress-device-information.yml deleted file mode 100644 index f3d3ffdb557..00000000000 --- a/prime-router/src/main/resources/metadata/fhir_transforms/common/suppress-device-information.yml +++ /dev/null @@ -1,27 +0,0 @@ -## Suppresses Device information OBX-18-1,OBX-18-2,OBX-18-3 -elements: - ##OBX-18-1 - - name: suppress-device-name - resource: 'Bundle.entry.resource.ofType(Device).identifier' - value: [ '""' ] - bundleProperty: '%resource.value' - - ##OBX-18-2 - - name: suppess-device-namespace_id - resource: 'Bundle.entry.resource.ofType(Device).identifier' - condition: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority").extension("https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id").exists()' - bundleProperty: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority").extension("https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id").value[x]' - value: [ '""' ] - - ##OBX-18-3 - - name: suppress-device-universal-id - resource: 'Bundle.entry.resource.ofType(Device).identifier' - condition: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority").extension("https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id").exists()' - bundleProperty: '%resource.extension("https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority").extension("https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id").value[x]' - value: [ '""' ] - - ##OBX-18-3 different mappings - - name: suppress-device-type-id - resource: 'Bundle.entry.resource.ofType(Device).identifier' - bundleProperty: '%resource.type.coding.code' - value: [ '""' ] \ No newline at end of file diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/Common/observation-to-nte/unwanted-conditions-to-notes.yml b/prime-router/src/main/resources/metadata/hl7_mapping/receivers/Common/observation-to-nte/unwanted-conditions-to-notes.yml deleted file mode 100644 index 072c2eb82a4..00000000000 --- a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/Common/observation-to-nte/unwanted-conditions-to-notes.yml +++ /dev/null @@ -1,42 +0,0 @@ -# $schema: ./../../../../../../../../metadata/json_schema/fhir/fhir-to-hl7-mapping.json - -constants: - commentCondition: '%resource.code.coding.code.exists() and %resource.code.text.exists()' - -elements: - - name: note-id - value: [ '%noteIndex + 1' ] - hl7Spec: [ '%{hl7NotePath}/NTE(%{noteIndex})-1' ] - - - name: note-source - value: [ '%resource.extension(%`rsext-note-source`).value' ] - hl7Spec: [ '%{hl7NotePath}/NTE(%{noteIndex})-2' ] - - - name: unwanted-condition-source - condition: '%commentCondition' - value: ['"O"'] - hl7Spec: [ '%{hl7NotePath}/NTE(%{noteIndex})-2' ] - - - name: unwanted-condition-comment-string - condition: '%commentCondition' - value: [ '"OBX filtered for identifier = " + %resource.code.coding.code + " - " + %resource.code.text + "; value = " + %resource.value.coding.code + " - " + %resource.value.coding.display + ". OBX was removed due to your jurisdictional reporting rules indicating this result is not reportable."' ] - hl7Spec: [ '%{hl7NotePath}/NTE(%{noteIndex})-3' ] - - - name: note-comment - condition: '%context.author.exists().not() or (%context.author.exists() and %context.author.is(string).not())' - resource: '%resource.text.union(%resource.extension(%`rsext-note-comment`).tail().value)' - resourceIndex: stIndex - constants: - stField: '%{hl7NotePath}/NTE(%{noteIndex})-3(%{stIndex})' - schema: classpath:/metadata/hl7_mapping/datatypes/annotation/ST.yml - - - name: note-comment-author-string - condition: '%resource.author.exists() and %resource.author.is(string)' - value: [ '%resource.text + " Authored by: " + %resource.author' ] - hl7Spec: [ '%{hl7NotePath}/NTE(%{noteIndex})-3' ] - - - name: note-comment-type-identifier - resource: '%resource.extension(%`rsext-note-type`).value' - constants: - cweField: '%{hl7NotePath}/NTE(%{noteIndex})-4' - schema: classpath:/metadata/hl7_mapping/datatypes/codeableConcept/CWE.yml diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml b/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml deleted file mode 100644 index 197d135adfb..00000000000 --- a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml +++ /dev/null @@ -1,59 +0,0 @@ -hl7Class: ca.uhn.hl7v2.model.v251.message.ORU_R01 - -extends: classpath:/metadata/hl7_mapping/ORU_R01/ORU_R01-base.yml -elements: - # MSH 3-1 - - name: nj-sending-application-namespace-id - value: [ '"CDC PRIME - Atlanta, Georgia (Dekalb)"' ] - hl7Spec: [ MSH-3-1 ] - - # MSH 3-2 - - name: nj-sending-application-universal-id - value: [ '"2.16.840.1.114222.4.1.237821"' ] - hl7Spec: [ MSH-3-2 ] - - # MSH 3-3 - - name: nj-sending-application-universal-id-type - value: [ '"ISO"' ] - hl7Spec: [ MSH-3-3 ] - - # MSH 4-1 - - name: nj-reporting-facility-name - value: [ '"CDC PRIME"' ] - hl7Spec: [ MSH-4-1 ] - - # MSH 4-2 - - name: nj-reporting-facility-id - value: [ '"11D2030855"' ] - hl7Spec: [ MSH-4-2 ] - - # MSH 4-3 - - name: nj-reporting-facility-id-type - value: [ '"CLIA"' ] - hl7Spec: [ MSH-4-3 ] - - # MSH 5 - - name: nj-receiving-application-namespace-id - value: [ '"ELRS"' ] - hl7Spec: [ MSH-5-1 ] - - - name: nj-receiving-application-universal-id - value: [ '"2.16.840.1.113883.3.1299.5.1.6.1"' ] - hl7Spec: [ MSH-5-2 ] - - - name: nj-receiving-application-universal-id-type - value: [ '"ISO"' ] - hl7Spec: [ MSH-5-3 ] - - # MSH 6 - - name: nj-receiving-facility-namespace-id - value: [ '"NJDOH"' ] - hl7Spec: [ MSH-6-1 ] - - - name: nj-receiving-facility-universal-id - value: [ '"2.16.840.1.113883.3.1299"' ] - hl7Spec: [ MSH-6-2 ] - - - name: nj-receiving-facility-universal-id-type - value: [ '"ISO"' ] - hl7Spec: [ MSH-6-3 ] \ No newline at end of file diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/Test/test-receiver-transform.yml b/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/Test/test-receiver-transform.yml deleted file mode 100644 index 54f92f330cc..00000000000 --- a/prime-router/src/main/resources/metadata/hl7_mapping/receivers/STLTs/Test/test-receiver-transform.yml +++ /dev/null @@ -1,15 +0,0 @@ -hl7Class: ca.uhn.hl7v2.model.v251.message.ORU_R01 - -extends: classpath:/metadata/hl7_mapping/ORU_R01/ORU_R01-base.yml - -elements: - - - name: observation-result-with-aoe - resource: "%resource.result.resolve().where(code.coding.extension('https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code').value.where(code in ('55735004' | '840539006'))) | %resource.basedOn.resolve().supportingInfo.resolve()" - - - name: order-note - resource: "%resource.basedOn.resolve().note | %resource.result.resolve().where(code.coding.extension('https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code').value.where(code in ('55735004' | '840539006')).exists().not())" - schema: classpath:/metadata/hl7_mapping/receivers/Common/observation-to-nte/unwanted-conditions-to-notes.yml - - - diff --git a/prime-router/src/test/kotlin/SubmissionReceiverTests.kt b/prime-router/src/test/kotlin/SubmissionReceiverTests.kt index 5f3b70619fa..981269d6625 100644 --- a/prime-router/src/test/kotlin/SubmissionReceiverTests.kt +++ b/prime-router/src/test/kotlin/SubmissionReceiverTests.kt @@ -3,7 +3,6 @@ package gov.cdc.prime.router import assertk.assertFailure import assertk.assertThat import assertk.assertions.isInstanceOf -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.azure.ActionHistory import gov.cdc.prime.router.azure.BlobAccess import gov.cdc.prime.router.azure.DatabaseAccess @@ -12,6 +11,7 @@ import gov.cdc.prime.router.azure.ReportWriter import gov.cdc.prime.router.azure.WorkflowEngine import gov.cdc.prime.router.azure.db.enums.TaskAction import gov.cdc.prime.router.common.BaseEngine +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.serializers.CsvSerializer import gov.cdc.prime.router.serializers.Hl7Serializer import gov.cdc.prime.router.serializers.ReadResult diff --git a/prime-router/src/test/kotlin/azure/ActionHistoryTests.kt b/prime-router/src/test/kotlin/azure/ActionHistoryTests.kt index 1d23f1c0356..93f9f67c299 100644 --- a/prime-router/src/test/kotlin/azure/ActionHistoryTests.kt +++ b/prime-router/src/test/kotlin/azure/ActionHistoryTests.kt @@ -9,7 +9,6 @@ import assertk.assertions.isNotNull import assertk.assertions.isNull import assertk.assertions.isTrue import com.microsoft.azure.functions.HttpMethod -import gov.cdc.prime.reportstream.shared.BlobUtils import gov.cdc.prime.router.ActionLog import gov.cdc.prime.router.ActionLogLevel import gov.cdc.prime.router.ClientSource @@ -130,11 +129,7 @@ class ActionHistoryTests { val actionHistory1 = ActionHistory(TaskAction.receive) val blobInfo1 = BlobAccess.BlobInfo(MimeFormat.CSV, "myUrl", byteArrayOf(0x11, 0x22)) val payloadName = "quux" - actionHistory1.trackExternalInputReport( - report1, - blobInfo1, - payloadName - ) + actionHistory1.trackExternalInputReport(report1, blobInfo1, payloadName) assertNotNull(actionHistory1.reportsReceived[report1.id]) val reportFile = actionHistory1.reportsReceived[report1.id]!! assertThat(reportFile.schemaName).isEqualTo("one") @@ -148,12 +143,7 @@ class ActionHistoryTests { assertThat(actionHistory1.action.externalName).isEqualTo(payloadName) // not allowed to track the same report twice. - assertFailure { - actionHistory1.trackExternalInputReport( - report1, - blobInfo1 - ) - } + assertFailure { actionHistory1.trackExternalInputReport(report1, blobInfo1) } } @Test @@ -455,10 +445,9 @@ class ActionHistoryTests { OffsetDateTime.now() ) mockkObject(BlobAccess.Companion) - mockkObject(BlobUtils) val blobUrls = mutableListOf() every { BlobAccess.uploadBlob(capture(blobUrls), any()) } returns "http://blobUrl" - every { BlobUtils.sha256Digest(any()) } returns byteArrayOf() + every { BlobAccess.sha256Digest(any()) } returns byteArrayOf() every { BlobAccess.uploadBody(any(), any(), any(), any(), Event.EventAction.NONE) } answers { callOriginal() } val header = mockk() every { @@ -695,10 +684,9 @@ class ActionHistoryTests { OffsetDateTime.now() ) mockkObject(BlobAccess.Companion) - mockkObject(BlobUtils) val blobUrls = mutableListOf() every { BlobAccess.uploadBlob(capture(blobUrls), any()) } returns "http://blobUrl" - every { BlobUtils.sha256Digest(any()) } returns byteArrayOf() + every { BlobAccess.sha256Digest(any()) } returns byteArrayOf() every { BlobAccess.uploadBody(any(), any(), any(), any(), Event.EventAction.NONE) } answers { callOriginal() } val header = mockk() every { diff --git a/prime-router/src/test/kotlin/azure/BlobAccessTests.kt b/prime-router/src/test/kotlin/azure/BlobAccessTests.kt index bdda5a8abdd..31a90ac3a25 100644 --- a/prime-router/src/test/kotlin/azure/BlobAccessTests.kt +++ b/prime-router/src/test/kotlin/azure/BlobAccessTests.kt @@ -20,7 +20,6 @@ import com.azure.storage.blob.BlobServiceClientBuilder import com.azure.storage.blob.models.BlobDownloadContentResponse import com.azure.storage.blob.models.BlobDownloadResponse import com.azure.storage.blob.models.BlobItem -import gov.cdc.prime.reportstream.shared.BlobUtils import gov.cdc.prime.router.BlobStoreTransportType import gov.cdc.prime.router.Metadata import gov.cdc.prime.router.MimeFormat @@ -550,14 +549,14 @@ class BlobAccessTests { Event.EventAction.NONE ) } returns - BlobAccess.BlobInfo(report1.bodyFormat, testUrl, BlobUtils.sha256Digest(testBytes)) + BlobAccess.BlobInfo(report1.bodyFormat, testUrl, BlobAccess.sha256Digest(testBytes)) val testBlob = BlobAccess() val result = testBlob.uploadReport(report1, testBytes) assertThat(result.format).isEqualTo(testFormat) assertThat(result.blobUrl).isEqualTo(testUrl) - assertThat(result.digest).isEqualTo(BlobUtils.sha256Digest(testBytes)) + assertThat(result.digest).isEqualTo(BlobAccess.sha256Digest(testBytes)) } @Test @@ -598,7 +597,7 @@ class BlobAccessTests { assertThat(result.format).isEqualTo(testFormat) // test blobUrl is as expected for the EventAction assertThat(result.blobUrl).contains(BlobAccess.directoryForAction(it)) - assertThat(result.digest).isEqualTo(BlobUtils.sha256Digest(testBytes)) + assertThat(result.digest).isEqualTo(BlobAccess.sha256Digest(testBytes)) } } @@ -778,7 +777,7 @@ class BlobAccessTests { @Test fun `test build container metadata`() { - val defaultEnvVar = Environment.get().storageEnvVar + val defaultEnvVar = Environment.get().blobEnvVar val testEnvVar = "testenv" val testContainer = "testcontainer" diff --git a/prime-router/src/test/kotlin/azure/EventTest.kt b/prime-router/src/test/kotlin/azure/EventTest.kt index 58c66f86f45..63080779d27 100644 --- a/prime-router/src/test/kotlin/azure/EventTest.kt +++ b/prime-router/src/test/kotlin/azure/EventTest.kt @@ -12,7 +12,7 @@ class EventTest { fun `test reportEvent encode and decode`() { val event = ReportEvent(Event.EventAction.SEND, UUID.randomUUID(), false) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -20,7 +20,7 @@ class EventTest { fun `test reportEvent encode and decode with time`() { val event = ReportEvent(Event.EventAction.SEND, UUID.randomUUID(), false, OffsetDateTime.now()) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -28,7 +28,7 @@ class EventTest { fun `test reportEvent encode and decode as empty`() { val event = ReportEvent(Event.EventAction.SEND, UUID.randomUUID(), true) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -36,7 +36,7 @@ class EventTest { fun `test reportEvent encode and decode as empty with time`() { val event = ReportEvent(Event.EventAction.SEND, UUID.randomUUID(), true, OffsetDateTime.now()) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -44,7 +44,7 @@ class EventTest { fun `test receiverEvent encode and decode`() { val event = BatchEvent(Event.EventAction.BATCH, "test", false) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -52,7 +52,7 @@ class EventTest { fun `test batchEvent encode and decode with time`() { val event = BatchEvent(Event.EventAction.BATCH, "test", false, OffsetDateTime.now()) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -60,7 +60,7 @@ class EventTest { fun `test batchEvent encode and decode as empty`() { val event = BatchEvent(Event.EventAction.BATCH, "test", true) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -68,7 +68,7 @@ class EventTest { fun `test batchEvent encode and decode as empty with time`() { val event = BatchEvent(Event.EventAction.BATCH, "test", true, OffsetDateTime.now()) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } @@ -78,7 +78,7 @@ class EventTest { val reportId = UUID.randomUUID() val event = ProcessEvent(Event.EventAction.PROCESS, reportId, Options.None, emptyMap(), emptyList(), at) val message = event.toQueueMessage() - val returnEvent = Event.parsePrimeRouterQueueMessage(message) + val returnEvent = Event.parseQueueMessage(message) assertThat(returnEvent).isEqualTo(event) } } \ No newline at end of file diff --git a/prime-router/src/test/kotlin/azure/ReportFunctionTests.kt b/prime-router/src/test/kotlin/azure/ReportFunctionTests.kt index c431198cd5f..74ed50419a3 100644 --- a/prime-router/src/test/kotlin/azure/ReportFunctionTests.kt +++ b/prime-router/src/test/kotlin/azure/ReportFunctionTests.kt @@ -34,8 +34,6 @@ import gov.cdc.prime.router.TopicReceiver import gov.cdc.prime.router.UniversalPipelineSender import gov.cdc.prime.router.azure.BlobAccess.BlobContainerMetadata import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.db.tables.pojos.ReportFile -import gov.cdc.prime.router.cli.PIIRemovalCommands import gov.cdc.prime.router.history.DetailedSubmissionHistory import gov.cdc.prime.router.history.azure.SubmissionsFacade import gov.cdc.prime.router.serializers.Hl7Serializer @@ -844,139 +842,4 @@ class ReportFunctionTests { ) + "]" ) } - - @Test - fun `No report`() { - val mockDb = mockk() - val reportId = UUID.randomUUID() - every { mockDb.fetchReportFile(reportId, null, null) } throws (IllegalStateException()) - val metadata = UnitTestUtils.simpleMetadata - val settings = FileSettings().loadOrganizations(oneOrganization) - val actionHistory = spyk(ActionHistory(TaskAction.receive)) - val result = ReportFunction( - makeEngine(metadata, settings), - actionHistory - ).processDownloadReport( - MockHttpRequestMessage(), - reportId, - true, - "local", - mockDb - ) - assert(result.status.value() == 400) - } - - @Test - fun `Report found, PII removal`() { - val reportFile = ReportFile() - reportFile.bodyUrl = "fakeurl.fhir" - mockkObject(AuthenticatedClaims) - val mockDb = mockk() - mockkClass(BlobAccess::class) - mockkObject(BlobAccess.Companion) - every { BlobAccess.Companion.getBlobConnection(any()) } returns "testconnection" - val blobConnectionInfo = mockk() - every { blobConnectionInfo.getBlobEndpoint() } returns "http://endpoint/metadata" - every { BlobAccess.downloadBlobAsByteArray(any()) } returns fhirReport.toByteArray(Charsets.UTF_8) - val reportId = UUID.randomUUID() - every { mockDb.fetchReportFile(reportId, null, null) } returns reportFile - val piiRemovalCommands = mockkClass(PIIRemovalCommands::class) - every { piiRemovalCommands.removePii(any()) } returns fhirReport - - val metadata = UnitTestUtils.simpleMetadata - val settings = FileSettings().loadOrganizations(oneOrganization) - val actionHistory = spyk(ActionHistory(TaskAction.receive)) - - val result = ReportFunction(makeEngine(metadata, settings), actionHistory).processDownloadReport( - MockHttpRequestMessage(), - reportId, - true, - "local", - mockDb, - piiRemovalCommands - ) - - assert(result.body.toString().contains("1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347")) - } - - @Test - fun `Report found, asked for no removal on prod`() { - val reportFile = ReportFile() - reportFile.bodyUrl = "fakeurl.fhir" - mockkObject(AuthenticatedClaims) - val mockDb = mockk() - mockkClass(BlobAccess::class) - mockkObject(BlobAccess.Companion) - every { BlobAccess.Companion.getBlobConnection(any()) } returns "testconnection" - val blobConnectionInfo = mockk() - every { blobConnectionInfo.getBlobEndpoint() } returns "http://endpoint/metadata" - every { BlobAccess.downloadBlobAsByteArray(any()) } returns fhirReport.toByteArray(Charsets.UTF_8) - every { mockDb.fetchReportFile(reportId = any(), null, null) } returns reportFile - - val metadata = UnitTestUtils.simpleMetadata - val settings = FileSettings().loadOrganizations(oneOrganization) - val actionHistory = spyk(ActionHistory(TaskAction.receive)) - - val result = ReportFunction(makeEngine(metadata, settings), actionHistory).processDownloadReport( - MockHttpRequestMessage(), - UUID.randomUUID(), - false, - "prod", - mockDb - ) - - assert(result.status.equals(HttpStatus.BAD_REQUEST)) - } - - @Test - fun `valid access token, report found, no PII removal`() { - val reportFile = ReportFile() - reportFile.bodyUrl = "fakeurl.fhir" - mockkObject(AuthenticatedClaims) - val mockDb = mockk() - mockkClass(BlobAccess::class) - mockkObject(BlobAccess.Companion) - every { BlobAccess.Companion.getBlobConnection(any()) } returns "testconnection" - val blobConnectionInfo = mockk() - every { blobConnectionInfo.getBlobEndpoint() } returns "http://endpoint/metadata" - every { BlobAccess.downloadBlobAsByteArray(any()) } returns fhirReport.toByteArray(Charsets.UTF_8) - every { mockDb.fetchReportFile(reportId = any(), null, null) } returns reportFile - - val metadata = UnitTestUtils.simpleMetadata - val settings = FileSettings().loadOrganizations(oneOrganization) - val actionHistory = spyk(ActionHistory(TaskAction.receive)) - - val result = ReportFunction(makeEngine(metadata, settings), actionHistory).processDownloadReport( - MockHttpRequestMessage(), - UUID.randomUUID(), - false, - "local", - mockDb - ) - - assert(result.body.toString().contains("1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347")) - } - - @Test - fun `valid access token, report found, body URL not FHIR`() { - val reportFile = ReportFile() - reportFile.bodyUrl = "fakeurl.hl7" - mockkObject(AuthenticatedClaims) - val mockDb = mockk() - every { mockDb.fetchReportFile(reportId = any(), null, null) } returns reportFile - - val metadata = UnitTestUtils.simpleMetadata - val settings = FileSettings().loadOrganizations(oneOrganization) - val actionHistory = spyk(ActionHistory(TaskAction.receive)) - - val result = ReportFunction(makeEngine(metadata, settings), actionHistory).processDownloadReport( - MockHttpRequestMessage(), - UUID.randomUUID(), - false, - "local", - mockDb - ) - - assert(result.status.equals(HttpStatus.BAD_REQUEST)) - } } \ No newline at end of file diff --git a/prime-router/src/test/kotlin/azure/WorkflowEngineTests.kt b/prime-router/src/test/kotlin/azure/WorkflowEngineTests.kt index a3cb73ffe24..65967d70739 100644 --- a/prime-router/src/test/kotlin/azure/WorkflowEngineTests.kt +++ b/prime-router/src/test/kotlin/azure/WorkflowEngineTests.kt @@ -221,13 +221,13 @@ class WorkflowEngineTests { Event.EventAction.RECEIVE ) }.returns(BlobAccess.BlobInfo(MimeFormat.CSV, "http://anyblob.com", "".toByteArray())) - every { actionHistory.trackExternalInputReport(any(), any(), any()) }.returns(Unit) + every { actionHistory.trackExternalInputReport(any(), any()) }.returns(Unit) val engine = makeEngine(metadata, settings) engine.recordReceivedReport(report1, "body".toByteArray(), sender, actionHistory) verify(exactly = 1) { - actionHistory.trackExternalInputReport(any(), any(), any()) + actionHistory.trackExternalInputReport(any(), any()) BlobAccess.Companion.uploadBody(any(), any(), any(), any(), any()) } confirmVerified(blobMock) diff --git a/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt b/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt index 7a40dd6272b..1d64542a0e4 100644 --- a/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt +++ b/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt @@ -173,13 +173,6 @@ object UniversalPipelineTestUtils { topic = Topic.FULL_ELR, schemaName = "classpath:/metadata/fhir_transforms/senders/test-sender-transform.yml" ) - val csvSenderWithNoTransform = UniversalPipelineSender( - "elr-csv-sender", - "phd", - MimeFormat.CSV, - CustomerStatus.ACTIVE, - topic = Topic.FULL_ELR, - ) val hl7SenderWithNoTransform = UniversalPipelineSender( "hl7-elr-no-transform", "phd", @@ -201,12 +194,6 @@ object UniversalPipelineTestUtils { CustomerStatus.ACTIVE, topic = Topic.FULL_ELR, ) - val fhirSenderWithNoTransformInactive = UniversalPipelineSender( - "fhir-elr-no-transform-inactive", - "phd", - MimeFormat.FHIR, - topic = Topic.FULL_ELR, - ) val fhirSenderWithSendOriginal = UniversalPipelineSender( "fhir-elr-send_original", "phd", @@ -226,10 +213,8 @@ object UniversalPipelineTestUtils { senders = listOf( hl7Sender, fhirSender, - csvSenderWithNoTransform, hl7SenderWithNoTransform, fhirSenderWithNoTransform, - fhirSenderWithNoTransformInactive, senderWithValidation ), receivers = listOf( @@ -275,7 +260,6 @@ object UniversalPipelineTestUtils { assertThat(itemLineages).hasSize(expected) assertThat(itemLineages.map { it.childIndex }).isEqualTo(MutableList(expected) { 1 }) - // itemCount is on the report created by the test. It will not be null. if (parent.itemCount > 1) { assertThat(itemLineages.map { it.parentIndex }).isEqualTo((1..expected).toList()) } else { diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt index a7e9795e1cf..194cf38f3dc 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt @@ -7,8 +7,6 @@ import assertk.assertions.hasSize import assertk.assertions.isEqualTo import assertk.assertions.isEqualToIgnoringGivenProperties import assertk.assertions.matchesPredicate -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.FileSettings import gov.cdc.prime.router.Metadata import gov.cdc.prime.router.MimeFormat @@ -64,6 +62,7 @@ import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer import gov.cdc.prime.router.db.ReportStreamTestDatabaseSetupExtension import gov.cdc.prime.router.fhirengine.engine.FHIRConverter import gov.cdc.prime.router.fhirengine.engine.FhirDestinationFilterQueueMessage +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.history.DetailedActionLog import gov.cdc.prime.router.metadata.LookupTable @@ -129,28 +128,18 @@ class FHIRConverterIntegrationTests { ) } - private fun generateQueueMessage( - report: Report, - blobContents: String, - sender: Sender, - headers: Map? = null, - ): String { - val headersString = headers?.entries?.joinToString(separator = ",\n") { (key, value) -> - """"$key": "$value"""" - } ?: "" - + private fun generateQueueMessage(report: Report, blobContents: String, sender: Sender): String { return """ - { - "type": "convert", - "reportId": "${report.id}", - "blobURL": "${report.bodyURL}", - "digest": "${BlobUtils.digestToString(BlobUtils.sha256Digest(blobContents.toByteArray()))}", - "blobSubFolderName": "${sender.fullName}", - "topic": "${sender.topic.jsonVal}", - "schemaName": "${sender.schemaName}" - ${if (headersString.isNotEmpty()) ",\n$headersString" else ""} - } - """.trimIndent() + { + "type": "convert", + "reportId": "${report.id}", + "blobURL": "${report.bodyURL}", + "digest": "${BlobAccess.digestToString(BlobAccess.sha256Digest(blobContents.toByteArray()))}", + "blobSubFolderName": "${sender.fullName}", + "topic": "${sender.topic.jsonVal}", + "schemaName": "${sender.schemaName}" + } + """.trimIndent() } @BeforeEach @@ -309,7 +298,7 @@ class FHIRConverterIntegrationTests { FhirDestinationFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(BlobUtils.sha256Digest(fhirBundle)), + BlobAccess.digestToString(BlobAccess.sha256Digest(fhirBundle)), hl7SenderWithNoTransform.fullName, hl7SenderWithNoTransform.topic ) @@ -474,7 +463,7 @@ class FHIRConverterIntegrationTests { FhirDestinationFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(BlobUtils.sha256Digest(fhirBundle.toByteArray())), + BlobAccess.digestToString(BlobAccess.sha256Digest(fhirBundle.toByteArray())), fhirSenderWithNoTransform.fullName, fhirSenderWithNoTransform.topic ) @@ -625,7 +614,7 @@ class FHIRConverterIntegrationTests { FhirDestinationFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(BlobUtils.sha256Digest(fhirBundle)), + BlobAccess.digestToString(BlobAccess.sha256Digest(fhirBundle)), senderWithValidation.fullName, senderWithValidation.topic ) @@ -677,7 +666,6 @@ class FHIRConverterIntegrationTests { "phd.marsotc-hl7-sender" ) ) - @Suppress("ktlint:standard:max-line-length") assertThat(event.params).isEqualTo( mapOf( ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.HL7, @@ -748,7 +736,7 @@ class FHIRConverterIntegrationTests { FhirDestinationFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(BlobUtils.sha256Digest(fhirBundle)), + BlobAccess.digestToString(BlobAccess.sha256Digest(fhirBundle)), hl7Sender.fullName, hl7Sender.topic ) diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRDestinationFilterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRDestinationFilterIntegrationTests.kt index 0d7aa55ebed..c34a3f04caa 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRDestinationFilterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRDestinationFilterIntegrationTests.kt @@ -8,8 +8,6 @@ import assertk.assertions.isEqualTo import assertk.assertions.isEqualToIgnoringGivenProperties import assertk.assertions.isInstanceOf import assertk.assertions.isNull -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLog import gov.cdc.prime.router.CustomerStatus import gov.cdc.prime.router.DeepOrganization @@ -42,6 +40,7 @@ import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer import gov.cdc.prime.router.db.ReportStreamTestDatabaseSetupExtension import gov.cdc.prime.router.fhirengine.engine.FHIRDestinationFilter import gov.cdc.prime.router.fhirengine.engine.FhirReceiverFilterQueueMessage +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.history.db.ReportGraph import gov.cdc.prime.router.metadata.LookupTable @@ -129,7 +128,7 @@ class FHIRDestinationFilterIntegrationTests : Logging { "type": "${action.literal}", "reportId": "${report.id}", "blobURL": "${report.bodyURL}", - "digest": "${BlobUtils.digestToString(BlobUtils.sha256Digest(blobContents.toByteArray()))}", + "digest": "${BlobAccess.digestToString(BlobAccess.sha256Digest(blobContents.toByteArray()))}", "blobSubFolderName": "${sender.fullName}", "topic": "${sender.topic.jsonVal}", "schemaName": "${sender.schemaName}" @@ -227,7 +226,7 @@ class FHIRDestinationFilterIntegrationTests : Logging { FhirReceiverFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(report.blobDigest), + BlobAccess.digestToString(report.blobDigest), "phd.fhir-elr-no-transform", UniversalPipelineTestUtils.fhirSenderWithNoTransform.topic, "phd.x" @@ -235,7 +234,7 @@ class FHIRDestinationFilterIntegrationTests : Logging { FhirReceiverFilterQueueMessage( report.reportId, report.bodyUrl, - BlobUtils.digestToString(report.blobDigest), + BlobAccess.digestToString(report.blobDigest), "phd.fhir-elr-no-transform", UniversalPipelineTestUtils.fhirSenderWithNoTransform.topic, "phd.y" @@ -318,7 +317,7 @@ class FHIRDestinationFilterIntegrationTests : Logging { val expectedQueueMessage = FhirReceiverFilterQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", UniversalPipelineTestUtils.fhirSenderWithNoTransform.topic, "phd.x" diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverFilterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverFilterIntegrationTests.kt index bc73514cff2..6c765de0b73 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverFilterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverFilterIntegrationTests.kt @@ -9,8 +9,6 @@ import assertk.assertions.isInstanceOf import assertk.assertions.isNull import assertk.assertions.isZero import assertk.assertions.matchesPredicate -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.ActionLog import gov.cdc.prime.router.ActionLogLevel import gov.cdc.prime.router.ActionLogScope @@ -48,6 +46,7 @@ import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer import gov.cdc.prime.router.db.ReportStreamTestDatabaseSetupExtension import gov.cdc.prime.router.fhirengine.engine.FHIRReceiverFilter import gov.cdc.prime.router.fhirengine.engine.FhirTranslateQueueMessage +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.fhirengine.utils.deleteResource import gov.cdc.prime.router.fhirengine.utils.getObservations @@ -228,7 +227,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { "type": "${TaskAction.receiver_filter.literal}", "reportId": "${report.id}", "blobURL": "${report.bodyURL}", - "digest": "${BlobUtils.digestToString(BlobUtils.sha256Digest(blobContents.toByteArray()))}", + "digest": "${BlobAccess.digestToString(BlobAccess.sha256Digest(blobContents.toByteArray()))}", "blobSubFolderName": "${sender.fullName}", "topic": "${sender.topic.jsonVal}", "receiverFullName": "$receiverName" @@ -305,7 +304,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { val expectedRouteQueueMessage = FhirTranslateQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", Topic.FULL_ELR, receiver.fullName @@ -477,7 +476,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { val expectedQueueMessage = FhirTranslateQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", Topic.FULL_ELR, receiver.fullName @@ -667,7 +666,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { val expectedRouteQueueMessage = FhirTranslateQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", Topic.FULL_ELR, receiver.fullName @@ -953,7 +952,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { val expectedRouteQueueMessage = FhirTranslateQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", Topic.FULL_ELR, receiver.fullName @@ -1028,7 +1027,7 @@ class FHIRReceiverFilterIntegrationTests : Logging { val expectedRouteQueueMessage = FhirTranslateQueueMessage( routedReport.reportId, routedReport.bodyUrl, - BlobUtils.digestToString(routedReport.blobDigest), + BlobAccess.digestToString(routedReport.blobDigest), "phd.fhir-elr-no-transform", Topic.FULL_ELR, "phd.x" diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverIntegrationTests.kt deleted file mode 100644 index 763a1f03a7b..00000000000 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRReceiverIntegrationTests.kt +++ /dev/null @@ -1,872 +0,0 @@ -package gov.cdc.prime.router.fhirengine.azure - -import assertk.assertThat -import assertk.assertions.hasSize -import assertk.assertions.isEmpty -import assertk.assertions.isEqualTo -import assertk.assertions.isEqualToIgnoringGivenProperties -import assertk.assertions.isNull -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.router.FileSettings -import gov.cdc.prime.router.MimeFormat -import gov.cdc.prime.router.Sender -import gov.cdc.prime.router.Topic -import gov.cdc.prime.router.azure.ActionHistory -import gov.cdc.prime.router.azure.BlobAccess -import gov.cdc.prime.router.azure.QueueAccess -import gov.cdc.prime.router.azure.SubmissionTableService -import gov.cdc.prime.router.azure.TableAccess -import gov.cdc.prime.router.azure.WorkflowEngine -import gov.cdc.prime.router.azure.db.Tables -import gov.cdc.prime.router.azure.db.enums.ActionLogType -import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.db.tables.pojos.ReportFile -import gov.cdc.prime.router.azure.observability.event.LocalAzureEventServiceImpl -import gov.cdc.prime.router.azure.observability.event.ReportEventData -import gov.cdc.prime.router.azure.observability.event.ReportStreamEventName -import gov.cdc.prime.router.azure.observability.event.ReportStreamEventProperties -import gov.cdc.prime.router.azure.observability.event.ReportStreamReportEvent -import gov.cdc.prime.router.common.TestcontainersUtils -import gov.cdc.prime.router.common.UniversalPipelineTestUtils.csvSenderWithNoTransform -import gov.cdc.prime.router.common.UniversalPipelineTestUtils.fhirSenderWithNoTransform -import gov.cdc.prime.router.common.UniversalPipelineTestUtils.fhirSenderWithNoTransformInactive -import gov.cdc.prime.router.common.UniversalPipelineTestUtils.hl7SenderWithNoTransform -import gov.cdc.prime.router.common.UniversalPipelineTestUtils.universalPipelineOrganization -import gov.cdc.prime.router.common.cleanHL7Record -import gov.cdc.prime.router.common.invalidMalformedFHIRRecord -import gov.cdc.prime.router.common.unparseableHL7Record -import gov.cdc.prime.router.common.validFHIRRecord1 -import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer -import gov.cdc.prime.router.db.ReportStreamTestDatabaseSetupExtension -import gov.cdc.prime.router.fhirengine.engine.FHIRReceiver -import gov.cdc.prime.router.history.DetailedActionLog -import gov.cdc.prime.router.history.DetailedReport -import gov.cdc.prime.router.unittest.UnitTestUtils -import io.mockk.clearAllMocks -import io.mockk.every -import io.mockk.mockkObject -import io.mockk.unmockkAll -import io.mockk.verify -import org.jooq.impl.DSL -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.testcontainers.junit.jupiter.Container -import org.testcontainers.junit.jupiter.Testcontainers -import java.time.OffsetDateTime -import java.util.UUID -import kotlin.test.assertNotNull - -@Testcontainers -@ExtendWith(ReportStreamTestDatabaseSetupExtension::class) -class FHIRReceiverIntegrationTests { - - @Container - val azuriteContainer = TestcontainersUtils.createAzuriteContainer( - customImageName = "azurite_fhirreceiverintegration", - customEnv = mapOf( - "AZURITE_ACCOUNTS" to "devstoreaccount1:keydevstoreaccount1" - ) - ) - - private val azureEventService = LocalAzureEventServiceImpl() - private lateinit var submissionTableService: SubmissionTableService - - private fun createFHIRFunctionsInstance(): FHIRFunctions { - val settings = FileSettings().loadOrganizations(universalPipelineOrganization) - val metadata = UnitTestUtils.simpleMetadata - val workflowEngine = WorkflowEngine - .Builder() - .metadata(metadata) - .settingsProvider(settings) - .databaseAccess(ReportStreamTestDatabaseContainer.testDatabaseAccess) - .build() - return FHIRFunctions(workflowEngine, databaseAccess = ReportStreamTestDatabaseContainer.testDatabaseAccess) - } - - private fun createFHIRReceiver(): FHIRReceiver { - val settings = FileSettings().loadOrganizations(universalPipelineOrganization) - val metadata = UnitTestUtils.simpleMetadata - return FHIRReceiver( - metadata, - settings, - ReportStreamTestDatabaseContainer.testDatabaseAccess, - azureEventService = azureEventService, - submissionTableService = submissionTableService - ) - } - - private fun generateReceiveQueueMessage( - reportId: String, - blobURL: String, - blobContents: String, - sender: Sender, - headers: Map, - ): String { - val headersStringMap = headers.entries.joinToString(separator = ",\n") { (key, value) -> - """"$key": "$value"""" - } - val headersString = "[\"java.util.LinkedHashMap\",{$headersStringMap}]" - - return """{"type":"receive-fhir","blobURL":"$blobURL", - "digest":"${BlobUtils.digestToString(BlobUtils.sha256Digest(blobContents.toByteArray()))}", - "blobSubFolderName":"${sender.fullName}","reportId":"$reportId","headers":$headersString} - """.trimIndent() - } - - @BeforeEach - fun beforeEach() { - clearAllMocks() - mockkObject(QueueAccess) - every { QueueAccess.sendMessage(any(), any()) } returns Unit - mockkObject(BlobAccess) - every { BlobAccess getProperty "defaultBlobMetadata" } returns getBlobContainerMetadata() - mockkObject(BlobAccess.BlobContainerMetadata) - every { BlobAccess.BlobContainerMetadata.build(any(), any()) } returns getBlobContainerMetadata() - - mockkObject(TableAccess) - every { TableAccess.getConnectionString() } returns getConnString() - - submissionTableService = SubmissionTableService.getInstance() - submissionTableService.reset() - } - - @AfterEach - fun afterEach() { - unmockkAll() - } - - private fun getBlobContainerMetadata(): BlobAccess.BlobContainerMetadata = BlobAccess.BlobContainerMetadata( - "container1", - getConnString() - ) - - private fun getConnString(): String { - @Suppress("ktlint:standard:max-line-length") - return """DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=keydevstoreaccount1;BlobEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10000)}/devstoreaccount1;QueueEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10001)}/devstoreaccount1;TableEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10002)}/devstoreaccount1;""" - } - - @Test - fun `should handle inactive sender gracefully`() { - val receivedReportContents = - listOf(validFHIRRecord1) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/happy-path.fhir", - receivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/fhir+ndjson;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to fhirSenderWithNoTransformInactive.fullName, - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - receivedReportContents, - fhirSenderWithNoTransformInactive, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs.first()).transform { it.detail.message } - .isEqualTo("Sender has customer status INACTIVE: phd.fhir-elr-no-transform-inactive") - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(DetailedReport::class.java) - - assertThat(actionLogs.count()).isEqualTo(1) - assertThat(reportFile.count()).isEqualTo(1) - } - - verify(exactly = 0) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission(reportId.toString(), "Accepted") - - assertNotNull(tableRow) - assertThat(tableRow.detail).isEqualTo( - "[Sender has customer status INACTIVE: phd.fhir-elr-no-transform-inactive]" - ) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.FHIR, - ReportStreamEventProperties.SENDER_NAME to fhirSenderWithNoTransformInactive.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_NOT_PROCESSABLE]!!).hasSize(1) - val notProcessableEvent = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_NOT_PROCESSABLE]!!.last() as ReportStreamReportEvent - assertThat(notProcessableEvent.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(notProcessableEvent.params).isEqualTo( - mapOf( - ReportStreamEventProperties.PROCESSING_ERROR to - "Submitted report was either empty or could not be parsed.", - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `should handle sender not found gracefully`() { - val submissionMessageContents = validFHIRRecord1 - val submissionBlobUrl = "http://anyblob.com" - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/fhir+ndjson;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to "unknown_sender", - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - submissionBlobUrl, - submissionMessageContents, - fhirSenderWithNoTransformInactive, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs).isEmpty() - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(DetailedReport::class.java) - - assertThat(reportFile).isEmpty() - } - - verify(exactly = 0) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Rejected" - ) - - assertNotNull(tableRow) - assertThat(tableRow.detail).isEqualTo("Sender not found matching client_id: unknown_sender") - assertThat(tableRow.bodyURL).isEqualTo(submissionBlobUrl) - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_NOT_RECEIVABLE]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_NOT_RECEIVABLE]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - null, - submissionBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.PROCESSING_ERROR to - "Sender is not found in matching client id: unknown_sender.", - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `should successfully process valid FHIR message`() { - val receivedReportContents = - listOf(validFHIRRecord1) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/happy-path.fhir", - receivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/fhir+ndjson;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to fhirSenderWithNoTransform.fullName, - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - receivedReportContents, - fhirSenderWithNoTransform, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs).isEmpty() - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(ReportFile::class.java) - - assertThat(reportFile).hasSize(1) - reportFile.first().apply { - assertThat(nextAction).isEqualTo(TaskAction.convert) - assertThat(receivingOrg).isEqualTo(null) - assertThat(receivingOrgSvc).isEqualTo(null) - assertThat(schemaName).isEqualTo("None") - assertThat(schemaTopic).isEqualTo(Topic.FULL_ELR) - assertThat(bodyFormat).isEqualTo("FHIR") - assertThat(sendingOrg).isEqualTo("phd") - assertThat(sendingOrgClient).isEqualTo("fhir-elr-no-transform") - } - } - - verify(exactly = 1) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Accepted" - ) - - assertNotNull(tableRow) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - assertThat(tableRow.detail).isNull() - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.FHIR, - ReportStreamEventProperties.SENDER_NAME to fhirSenderWithNoTransform.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `should successfully process valid HL7 message`() { - val receivedReportContents = - listOf(cleanHL7Record) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/happy-path.hl7", - receivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/hl7-v2;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to hl7SenderWithNoTransform.fullName, - "content-length" to "100" - ) - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - receivedReportContents, - hl7SenderWithNoTransform, - headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs).isEmpty() - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(ReportFile::class.java) - - assertThat(reportFile).hasSize(1) - reportFile.first().apply { - assertThat(nextAction).isEqualTo(TaskAction.convert) - assertThat(receivingOrg).isEqualTo(null) - assertThat(receivingOrgSvc).isEqualTo(null) - assertThat(schemaName).isEqualTo("None") - assertThat(schemaTopic).isEqualTo(Topic.FULL_ELR) - assertThat(bodyFormat).isEqualTo("HL7") - assertThat(sendingOrg).isEqualTo("phd") - assertThat(sendingOrgClient).isEqualTo("hl7-elr-no-transform") - } - } - - verify(exactly = 1) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Accepted" - ) - - assertNotNull(tableRow) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - assertThat(tableRow.detail).isNull() - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.HL7, - ReportStreamEventProperties.SENDER_NAME to hl7SenderWithNoTransform.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `test process invalid FHIR message`() { - val invalidReceivedReportContents = - listOf(invalidMalformedFHIRRecord) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/fail-path.fhir", - invalidReceivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/fhir+ndjson;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to fhirSenderWithNoTransform.fullName, - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - invalidReceivedReportContents, - fhirSenderWithNoTransform, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs.count()).isEqualTo(1) - assertThat(actionLogs.first().detail.message).isEqualTo("1: Unable to parse FHIR data.") - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(ReportFile::class.java) - - assertThat(reportFile).hasSize(1) - reportFile.first().apply { - assertThat(nextAction).isEqualTo(TaskAction.convert) - assertThat(receivingOrg).isEqualTo(null) - assertThat(receivingOrgSvc).isEqualTo(null) - assertThat(schemaName).isEqualTo("None") - assertThat(schemaTopic).isEqualTo(Topic.FULL_ELR) - assertThat(bodyFormat).isEqualTo("FHIR") - assertThat(sendingOrg).isEqualTo("phd") - assertThat(sendingOrgClient).isEqualTo("fhir-elr-no-transform") - } - } - - verify(exactly = 0) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Accepted" - ) - - assertNotNull(tableRow) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - assertThat(tableRow.detail).isEqualTo("[1: Unable to parse FHIR data.]") - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.FHIR, - ReportStreamEventProperties.SENDER_NAME to fhirSenderWithNoTransform.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `test process invalid HL7 message`() { - val invalidReceivedReportContents = - listOf(unparseableHL7Record) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/fail-path.hl7", - invalidReceivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/hl7-v2;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to hl7SenderWithNoTransform.fullName, - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - invalidReceivedReportContents, - hl7SenderWithNoTransform, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs.count()).isEqualTo(2) - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(ReportFile::class.java) - - assertThat(reportFile).hasSize(1) - reportFile.first().apply { - assertThat(nextAction).isEqualTo(TaskAction.convert) - assertThat(receivingOrg).isEqualTo(null) - assertThat(receivingOrgSvc).isEqualTo(null) - assertThat(schemaName).isEqualTo("None") - assertThat(schemaTopic).isEqualTo(Topic.FULL_ELR) - assertThat(bodyFormat).isEqualTo("HL7") - assertThat(sendingOrg).isEqualTo("phd") - assertThat(sendingOrgClient).isEqualTo("hl7-elr-no-transform") - } - } - - verify(exactly = 0) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Accepted" - ) - - assertNotNull(tableRow) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - assertThat(tableRow.detail).isEqualTo("[Failed to parse message, Failed to parse message]") - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_RECEIVED]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - Topic.FULL_ELR, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.HL7, - ReportStreamEventProperties.SENDER_NAME to hl7SenderWithNoTransform.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString() - ) - ) - } - - @Test - fun `test process CSV message`() { - val invalidReceivedReportContents = - listOf(unparseableHL7Record) - .joinToString("\n") - val receiveBlobUrl = BlobAccess.uploadBlob( - "receive/fail-path.hl7", - invalidReceivedReportContents.toByteArray(), - getBlobContainerMetadata() - ) - - val reportId = UUID.randomUUID() - val headers = mapOf( - "content-type" to "application/hl7-v2;test", - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to csvSenderWithNoTransform.fullName, - "content-length" to "100" - ) - - val receiveQueueMessage = generateReceiveQueueMessage( - reportId.toString(), - receiveBlobUrl, - invalidReceivedReportContents, - csvSenderWithNoTransform, - headers = headers - ) - - val fhirFunctions = createFHIRFunctionsInstance() - - var exception: Exception? = null - try { - fhirFunctions.process( - receiveQueueMessage, - 1, - createFHIRReceiver(), - ActionHistory(TaskAction.receive) - ) - } catch (e: Exception) { - exception = e - } - - assertThat(exception!!.javaClass.name).isEqualTo("java.lang.IllegalStateException") - - ReportStreamTestDatabaseContainer.testDatabaseAccess.transact { txn -> - val actionLogs = DSL.using(txn).select(Tables.ACTION_LOG.asterisk()) - .from(Tables.ACTION_LOG) - .where(Tables.ACTION_LOG.REPORT_ID.eq(reportId)) - .and(Tables.ACTION_LOG.TYPE.eq(ActionLogType.error)) - .fetchInto(DetailedActionLog::class.java) - - assertThat(actionLogs.count()).isEqualTo(0) - - val reportFile = DSL.using(txn).select(Tables.REPORT_FILE.asterisk()) - .from(Tables.REPORT_FILE) - .where(Tables.REPORT_FILE.REPORT_ID.eq(reportId)) - .fetchInto(ReportFile::class.java) - - assertThat(reportFile).isEmpty() - } - - verify(exactly = 0) { - QueueAccess.sendMessage(any(), any()) - } - - val tableRow = submissionTableService.getSubmission( - reportId.toString(), - "Rejected" - ) - - assertNotNull(tableRow) - assertThat(tableRow.bodyURL).isEqualTo(receiveBlobUrl) - assertThat(tableRow.detail).isEqualTo("[Unsupported sender format: CSV]") - - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.REPORT_NOT_PROCESSABLE]!!).hasSize(1) - val event = - azureEventService - .reportStreamEvents[ReportStreamEventName.REPORT_NOT_PROCESSABLE]!!.last() as ReportStreamReportEvent - assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( - ReportEventData( - reportId, - null, - emptyList(), - null, - receiveBlobUrl, - TaskAction.receive, - OffsetDateTime.now() - ), - ReportEventData::timestamp - ) - assertThat(event.params).isEqualTo( - mapOf( - ReportStreamEventProperties.ITEM_FORMAT to MimeFormat.CSV, - ReportStreamEventProperties.SENDER_NAME to csvSenderWithNoTransform.fullName, - ReportStreamEventProperties.FILE_LENGTH to headers["content-length"], - ReportStreamEventProperties.SENDER_IP to headers["x-azure-clientip"], - ReportStreamEventProperties.REQUEST_PARAMETERS to headers.toString(), - ReportStreamEventProperties.PROCESSING_ERROR to "Unsupported sender format CSV." - ) - ) - } -} \ No newline at end of file diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt index d4d3d517d6b..d203856028e 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt @@ -6,8 +6,6 @@ import assertk.assertions.isNotEqualTo import assertk.assertions.isNotNull import assertk.assertions.isNull import assertk.assertions.isTrue -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage import gov.cdc.prime.router.DeepOrganization import gov.cdc.prime.router.FileSettings import gov.cdc.prime.router.MimeFormat @@ -29,6 +27,7 @@ import gov.cdc.prime.router.common.UniversalPipelineTestUtils.fetchChildReports import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer import gov.cdc.prime.router.db.ReportStreamTestDatabaseSetupExtension import gov.cdc.prime.router.fhirengine.engine.FHIRTranslator +import gov.cdc.prime.router.fhirengine.engine.QueueMessage import gov.cdc.prime.router.history.db.ReportGraph import gov.cdc.prime.router.metadata.LookupTable import gov.cdc.prime.router.report.ReportService @@ -117,7 +116,7 @@ class FHIRTranslatorIntegrationTests : Logging { "type": "${TaskAction.translate.literal}", "reportId": "${report.id}", "blobURL": "${report.bodyURL}", - "digest": "${BlobUtils.digestToString(BlobUtils.sha256Digest(blobContents.toByteArray()))}", + "digest": "${BlobAccess.digestToString(BlobAccess.sha256Digest(blobContents.toByteArray()))}", "blobSubFolderName": "${sender.fullName}", "topic": "${sender.topic.jsonVal}", "receiverFullName": "$receiverName" diff --git a/prime-router/src/test/kotlin/fhirengine/azure/SubmissionTableServiceIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/SubmissionTableServiceIntegrationTests.kt deleted file mode 100644 index 75790e601cc..00000000000 --- a/prime-router/src/test/kotlin/fhirengine/azure/SubmissionTableServiceIntegrationTests.kt +++ /dev/null @@ -1,107 +0,0 @@ -package gov.cdc.prime.router.fhirengine.azure - -import gov.cdc.prime.reportstream.shared.Submission -import gov.cdc.prime.router.azure.SubmissionTableService -import gov.cdc.prime.router.azure.TableAccess -import gov.cdc.prime.router.common.TestcontainersUtils -import io.mockk.clearAllMocks -import io.mockk.every -import io.mockk.mockkObject -import io.mockk.unmockkAll -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.testcontainers.junit.jupiter.Container -import org.testcontainers.junit.jupiter.Testcontainers -import java.util.UUID -import kotlin.test.assertNotNull - -@Testcontainers -class SubmissionTableServiceIntegrationTests { - - @Container - val azuriteContainer = TestcontainersUtils.createAzuriteContainer( - customImageName = "azurite_fhirreceiverintegration", - customEnv = mapOf( - "AZURITE_ACCOUNTS" to "devstoreaccount1:keydevstoreaccount1" - ) - ) - - private lateinit var submissionTableService: SubmissionTableService - - @BeforeEach - fun beforeEach() { - clearAllMocks() - - mockkObject(TableAccess) - every { TableAccess.getConnectionString() } returns getConnString() - - submissionTableService = SubmissionTableService.getInstance() - submissionTableService.reset() - } - - @AfterEach - fun afterEach() { - unmockkAll() - } - - private fun getConnString(): String { - @Suppress("ktlint:standard:max-line-length") - return """DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=keydevstoreaccount1;BlobEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10000)}/devstoreaccount1;QueueEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10001)}/devstoreaccount1;TableEndpoint=http://${azuriteContainer.host}:${azuriteContainer.getMappedPort(10002)}/devstoreaccount1;""" - } - - /** - * Test to ensure that multiple submissions can be inserted and retrieved correctly - * in a thread-safe manner. - * - * 10 different submissions will be inserted concurrently, followed by retrievals to ensure - * that all submissions were properly stored and retrieved from the "submission" table. - */ - @Test - fun `test concurrent reset and submissions with simple threads`() { - // List to hold submission objects - val submissions = List(10) { - val submissionId = UUID.randomUUID().toString() - val status = "Accepted" - val url = "https://anyblob.com" - Submission(submissionId, status, url) // Create new Submission instance - } - - // List to hold the created threads - val threads = mutableListOf() - - // Create and start 50 threads - for (i in 1..50) { - val thread = Thread { - // Each thread randomly picks one of the submissions to insert - val submission = submissions.random() - - try { - submissionTableService.insertSubmission(submission) - submissionTableService.reset() // Reset `tableAccess` - println("Thread ${Thread.currentThread().name} inserted and reset successfully") - } catch (e: Exception) { - println("Thread ${Thread.currentThread().name} encountered an error: ${e.message}") - } - } - thread.start() - threads.add(thread) // Keep track of the thread - } - - // Wait for all threads to complete using `join()` - for (thread in threads) { - thread.join() - } - - // After all threads complete, verify that submissions were inserted successfully - submissions.forEach { submission -> - val retrievedSubmission = submissionTableService.getSubmission(submission.submissionId, submission.status) - assertNotNull(retrievedSubmission, "Submission should not be null") - assertEquals(submission.submissionId, retrievedSubmission.submissionId) - assertEquals(submission.status, retrievedSubmission.status) - } - - println("Test passed! Concurrent submission and reset operations are thread-safe.") - } -} \ No newline at end of file diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FHIRReceiverTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FHIRReceiverTests.kt deleted file mode 100644 index 8edc912f5f1..00000000000 --- a/prime-router/src/test/kotlin/fhirengine/engine/FHIRReceiverTests.kt +++ /dev/null @@ -1,273 +0,0 @@ -package gov.cdc.prime.router.fhirengine.engine - -import assertk.assertThat -import assertk.assertions.hasSize -import assertk.assertions.isEqualTo -import com.microsoft.azure.functions.HttpStatus -import gov.cdc.prime.reportstream.shared.Submission -import gov.cdc.prime.router.ActionLog -import gov.cdc.prime.router.ActionLogDetail -import gov.cdc.prime.router.ActionLogger -import gov.cdc.prime.router.CovidSender -import gov.cdc.prime.router.CustomerStatus -import gov.cdc.prime.router.DeepOrganization -import gov.cdc.prime.router.FileSettings -import gov.cdc.prime.router.InvalidParamMessage -import gov.cdc.prime.router.Metadata -import gov.cdc.prime.router.MimeFormat -import gov.cdc.prime.router.Organization -import gov.cdc.prime.router.Receiver -import gov.cdc.prime.router.Schema -import gov.cdc.prime.router.SettingsProvider -import gov.cdc.prime.router.Topic -import gov.cdc.prime.router.azure.ActionHistory -import gov.cdc.prime.router.azure.BlobAccess -import gov.cdc.prime.router.azure.DatabaseAccess -import gov.cdc.prime.router.azure.SubmissionTableService -import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.db.tables.pojos.Action -import gov.cdc.prime.router.common.cleanHL7Record -import gov.cdc.prime.router.report.ReportService -import io.mockk.clearAllMocks -import io.mockk.every -import io.mockk.mockk -import io.mockk.mockkClass -import io.mockk.mockkObject -import io.mockk.spyk -import io.mockk.unmockkAll -import io.mockk.verify -import org.jooq.tools.jdbc.MockConnection -import org.jooq.tools.jdbc.MockDataProvider -import org.jooq.tools.jdbc.MockResult -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.BeforeEach -import java.util.UUID -import kotlin.test.Test - -class FHIRReceiverTest { - - // Common mock objects and setup - val dataProvider = MockDataProvider { emptyArray() } - val connection = MockConnection(dataProvider) - val accessSpy = spyk(DatabaseAccess(connection)) - val blobMock = mockkClass(BlobAccess::class) - val reportService: ReportService = mockk() - private val submissionTableService: SubmissionTableService = mockk() - - val oneOrganization = DeepOrganization( - "co-phd", - "test", - Organization.Jurisdiction.FEDERAL, - receivers = listOf(Receiver("elr", "co-phd", Topic.TEST, CustomerStatus.INACTIVE, "one")) - ) - val settings = FileSettings().loadOrganizations(oneOrganization) - val one = Schema(name = "None", topic = Topic.FULL_ELR, elements = emptyList()) - val metadata = Metadata(schema = one) - - private fun makeFhirReceiver(metadata: Metadata, settings: SettingsProvider): FHIRReceiver { - return FHIRReceiver( - metadata, - settings, - accessSpy, - blobMock, - reportService = reportService, - submissionTableService = submissionTableService - ) - -// FHIREngine.Builder().metadata(metadata).settingsProvider(settings).databaseAccess(accessSpy) -// .reportService(reportService).blobAccess(blobMock).build(taskAction) - } - - @BeforeEach - fun reset() { - clearAllMocks() - } - - @AfterEach - fun tearDown() { - unmockkAll() - } - - data class FHIRTestSetup( - val engine: FHIRReceiver, - val actionLogger: ActionLogger, - val actionHistory: ActionHistory, - val message: FhirReceiveQueueMessage, - ) - - private fun setupMocksForProcessingTest( - clientId: String, - contentType: String, - customerStatus: CustomerStatus, - hasErrors: Boolean, - reportID: UUID = UUID.randomUUID(), - - ): FHIRTestSetup { - mockkObject(BlobAccess) - val actionHistory = mockk() - val actionLogger = mockk() - val sender = CovidSender( - "Test Sender", - "test", - MimeFormat.HL7, - schemaName = "one", - customerStatus = customerStatus - ) - - val engine = spyk(makeFhirReceiver(metadata, settings)) - val message = mockk(relaxed = true) - val action = Action() - action.actionName = TaskAction.receive - - val headers = mapOf( - "x-azure-clientip" to "0.0.0.0", - "payloadname" to "test_message", - "client_id" to clientId, - "content-type" to contentType - ) - - every { message.headers } returns headers - every { message.reportId } returns reportID - every { actionLogger.hasErrors() } returns hasErrors - every { actionLogger.setReportId(any()) } returns actionLogger - every { actionLogger.error(any()) } returns Unit - every { engine.settings.findSender(any()) } returns sender - every { actionHistory.trackActionResult(any()) } returns Unit - every { actionHistory.trackActionParams(any()) } returns Unit - every { actionHistory.trackActionSenderInfo(any(), any()) } returns Unit - every { actionHistory.trackExternalInputReport(any(), any()) } returns Unit - every { actionHistory.trackLogs(any>()) } returns Unit - every { submissionTableService.insertSubmission(any()) } returns Unit - every { actionHistory.action } returns action - every { BlobAccess.downloadBlob(any(), any()) }.returns(cleanHL7Record) - - return FHIRTestSetup(engine, actionLogger, actionHistory, message) - } - - @Test - fun `test handle sender not found`() { - val fhirSetup = - setupMocksForProcessingTest( - "unknown_client_id", - "application/hl7-v2;test", - CustomerStatus.ACTIVE, - true - ) - val engine = fhirSetup.engine - val queueMessage = fhirSetup.message - val actionLogger = ActionLogger() - val actionHistory = fhirSetup.actionHistory - - every { engine.settings.findSender(any()) } returns null - - accessSpy.transact { txn -> - engine.run(queueMessage, actionLogger, actionHistory, txn) - } - - assertThat(actionLogger.errors).hasSize(0) - - val reportId = queueMessage.reportId.toString() - val blobURL = queueMessage.blobURL - verify(exactly = 1) { - Submission( - reportId, - "Rejected", - blobURL, - "Sender not found matching client_id: unknown_client_id" - ) - submissionTableService.insertSubmission(any()) - } - } - - @Test - fun `test handle inactive sender`() { - val fhirSetup = - setupMocksForProcessingTest( - "known_client_id", - "application/hl7-v2;test", - CustomerStatus.INACTIVE, - true - ) - val engine = fhirSetup.engine - val queueMessage = fhirSetup.message - val actionLogger = ActionLogger() - val actionHistory = fhirSetup.actionHistory - - accessSpy.transact { txn -> - engine.run(queueMessage, actionLogger, actionHistory, txn) - } - - assertThat(actionLogger.errors).hasSize(1) - - assertThat( - actionLogger.errors[0].equals( - actionLogger.errors[0].equals( - InvalidParamMessage("Sender has customer status INACTIVE: unknown_client_id") - ) - ) - ) - - verify(exactly = 1) { - submissionTableService.insertSubmission(any()) - actionHistory.trackActionResult(HttpStatus.NOT_ACCEPTABLE) - actionHistory.trackActionSenderInfo("test.Test Sender", "test_message") - } - } - - @Test - fun `test successful processing`() { - val reportID = UUID.randomUUID() - val fhirSetup = - setupMocksForProcessingTest( - "known_client_id", - "application/hl7-v2;test", - CustomerStatus.ACTIVE, - false, - reportID - ) - val engine = fhirSetup.engine - val queueMessage = fhirSetup.message - val actionLogger = fhirSetup.actionLogger - val actionHistory = fhirSetup.actionHistory - every { actionLogger.errors } returns emptyList() - - accessSpy.transact { txn -> - engine.run(queueMessage, actionLogger, actionHistory, txn) - } - - verify(exactly = 1) { - actionHistory.trackActionResult(HttpStatus.CREATED) - actionHistory.trackActionSenderInfo("test.Test Sender", "test_message") - actionHistory.trackExternalInputReport(any(), any()) - submissionTableService.insertSubmission(any()) - } - } - - @Test - fun `test invalid MIME type`() { - val fhirSetup = - setupMocksForProcessingTest( - "known_client_id", - "invalid/mime-type", - CustomerStatus.ACTIVE, - true - ) - val engine = fhirSetup.engine - val queueMessage = fhirSetup.message - val actionLogger = ActionLogger() - val actionHistory = fhirSetup.actionHistory - - var exception: Exception? = null - try { - accessSpy.transact { txn -> - engine.run(queueMessage, actionLogger, actionHistory, txn) - } - } catch (e: Exception) { - exception = e - } - - assertThat(exception!!.javaClass.name).isEqualTo("java.lang.IllegalArgumentException") - assertThat(actionLogger.errors).hasSize(1) - assertThat(actionLogger.errors[0].detail.message).isEqualTo("Unexpected MIME type invalid/mime-type.") - } -} \ No newline at end of file diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt index 6b48d2e7260..b0f4a4025e4 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt @@ -172,7 +172,7 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val message = spyk( FhirConvertQueueMessage( - UUID.randomUUID(), BLOB_URL, "test", BLOB_SUB_FOLDER_NAME, Topic.FULL_ELR, + UUID.randomUUID(), BLOB_URL, "test", BLOB_SUB_FOLDER_NAME, topic = Topic.FULL_ELR, SCHEMA_NAME ) ) @@ -184,7 +184,7 @@ class FhirConverterTests { every { actionLogger.getItemLogger(any(), any()) } returns actionLogger every { actionLogger.warn(any>()) } just runs every { actionLogger.setReportId(any()) } returns actionLogger - every { BlobAccess.downloadBlob(any(), any()) }.returns(validHl7) + every { message.downloadContent() }.returns(validHl7) every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.HL7 every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), bodyFormat.toString(), bodyUrl, any()) }.returns(Unit) @@ -227,7 +227,7 @@ class FhirConverterTests { BLOB_FHIR_URL, "test", BLOB_SUB_FOLDER_NAME, - Topic.FULL_ELR, + topic = Topic.FULL_ELR, SCHEMA_NAME ) ) @@ -239,7 +239,7 @@ class FhirConverterTests { every { actionLogger.getItemLogger(any(), any()) } returns actionLogger every { actionLogger.warn(any>()) } just runs every { actionLogger.setReportId(any()) } returns actionLogger - every { BlobAccess.downloadBlob(any(), any()) } + every { message.downloadContent() } .returns(File(VALID_DATA_URL).readText()) every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.FHIR every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" @@ -296,7 +296,7 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val message = spyk( FhirConvertQueueMessage( - UUID.randomUUID(), BLOB_FHIR_URL, "test", BLOB_SUB_FOLDER_NAME, Topic.FULL_ELR, + UUID.randomUUID(), BLOB_FHIR_URL, "test", BLOB_SUB_FOLDER_NAME, topic = Topic.FULL_ELR, SCHEMA_NAME ) ) @@ -306,7 +306,7 @@ class FhirConverterTests { every { actionLogger.hasErrors() } returns false every { actionLogger.setReportId(any()) } returns actionLogger - every { BlobAccess.downloadBlob(any(), any()) } + every { message.downloadContent() } .returns(File("src/test/resources/fhirengine/engine/bundle_multiple_bundles.fhir").readText()) every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.FHIR every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" @@ -386,7 +386,7 @@ class FhirConverterTests { BLOB_FHIR_URL, "test", BLOB_SUB_FOLDER_NAME, - Topic.FULL_ELR, + topic = Topic.FULL_ELR, SCHEMA_NAME ) ) @@ -398,7 +398,7 @@ class FhirConverterTests { every { actionLogger.getItemLogger(any(), any()) } returns actionLogger every { actionLogger.warn(any>()) } just runs every { actionLogger.setReportId(any()) } returns actionLogger - every { BlobAccess.downloadBlob(any(), any()) } returns (fhirRecord) + every { message.downloadContent() } returns (fhirRecord) every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.FHIR every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), bodyFormat.toString(), bodyUrl, any()) }.returns(Unit) @@ -477,7 +477,7 @@ class FhirConverterTests { BLOB_FHIR_URL, "test", BLOB_SUB_FOLDER_NAME, - Topic.FULL_ELR, + topic = Topic.FULL_ELR, SCHEMA_NAME ) ) @@ -489,7 +489,7 @@ class FhirConverterTests { every { actionLogger.getItemLogger(any(), any()) } returns actionLogger every { actionLogger.warn(any>()) } just runs every { actionLogger.setReportId(any()) } returns actionLogger - every { BlobAccess.downloadBlob(any(), any()) } returns (fhirData) + every { message.downloadContent() } returns (fhirData) every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.FHIR every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), bodyFormat.toString(), bodyUrl, any()) }.returns(Unit) @@ -556,12 +556,11 @@ class FhirConverterTests { @Test fun `should log an error and return no bundles if the message is empty`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR - every { BlobAccess.downloadBlob(any(), any()) } returns "" + every { mockMessage.downloadContent() } returns "" val bundles = engine.process(MimeFormat.FHIR, mockMessage, actionLogger) assertThat(bundles).isEmpty() assertThat(actionLogger.errors.map { it.detail.message }).contains("Provided raw data is empty.") @@ -570,7 +569,6 @@ class FhirConverterTests { @Test fun `should handle a parse failure for the entire HL7 batch`() { mockkConstructor(Hl7InputStreamMessageStringIterator::class) - mockkObject(BlobAccess) every { anyConstructed().hasNext() } throws Hl7InputStreamMessageStringIterator.ParseFailureError( @@ -580,10 +578,12 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() - every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 + every { + mockMessage.downloadContent() + } returns simpleHL7 val bundles = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(bundles).isEmpty() assertThat( @@ -595,13 +595,12 @@ class FhirConverterTests { @Test fun `should log an error and return no bundles if the format is not supported`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() - every { BlobAccess.downloadBlob(any(), any()) } returns "test,1,2" + every { mockMessage.downloadContent() } returns "test,1,2" val bundles = engine.process(MimeFormat.CSV, mockMessage, actionLogger) assertThat(bundles).isEmpty() assertThat(actionLogger.errors.map { it.detail.message }) @@ -610,13 +609,12 @@ class FhirConverterTests { @Test fun `should a log FHIR parse error and not return a bundle`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() - every { BlobAccess.downloadBlob(any(), any()) } returns "{\"id\":}" + every { mockMessage.downloadContent() } returns "{\"id\":}" val processedItems = engine.process(MimeFormat.FHIR, mockMessage, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() @@ -628,7 +626,6 @@ class FhirConverterTests { @Test fun `should log a FHIR validation error and not return a bundle`() { - mockkObject(BlobAccess) val fhirValidationResult = mockk() val message = SingleValidationMessage() message.severity = ResultSeverityEnum.ERROR @@ -642,11 +639,11 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() - every { BlobAccess.downloadBlob(any(), any()) } returns "{\"id\":\"1\", \"resourceType\":\"Bundle\"}" + every { mockMessage.downloadContent() } returns "{\"id\":\"1\", \"resourceType\":\"Bundle\"}" val processedItems = engine.process(MimeFormat.FHIR, mockMessage, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() @@ -657,14 +654,13 @@ class FhirConverterTests { @Test fun `should log an HL7 parse error and not return a bundle`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns unparseableHL7 val processedItems = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(processedItems).hasSize(1) @@ -681,7 +677,6 @@ class FhirConverterTests { @Test fun `should log a HL7 validation error and not return a bundle`() { - mockkObject(BlobAccess) val mockValidation = mockk() val mockEntry = mockk() every { mockEntry.classification } returns AbstractItemValidator.ERROR_CLASSIFICATION @@ -695,11 +690,11 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns simpleHL7 val processedItems = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(processedItems).hasSize(1) @@ -716,7 +711,6 @@ class FhirConverterTests { @Test fun `should log a HL7 conversion error and not return a bundle`() { - mockkObject(BlobAccess) mockkObject(HL7toFhirTranslator) val mockHL7toFhirTranslator = mockk() every { mockHL7toFhirTranslator.translate(any()) } throws RuntimeException("Conversion error") @@ -724,11 +718,11 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns simpleHL7 val processedItems = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(processedItems).hasSize(1) @@ -745,14 +739,13 @@ class FhirConverterTests { @Test fun `should optionally support routing some or no items when routeMessageWithInvalidItems is set`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns """{\"id\":} {"id":"1", "resourceType":"Bundle"} """.trimMargin() @@ -773,15 +766,14 @@ class FhirConverterTests { @Test fun `should process an HL7 message`() { - mockkObject(BlobAccess) val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns simpleHL7 val bundles = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(bundles).hasSize(1) @@ -790,18 +782,17 @@ class FhirConverterTests { @Test fun `should process items in parallel`() { - mockkObject(BlobAccess) mockkObject(BaseEngine.Companion) every { BaseEngine.Companion getProperty "sequentialLimit" } returns 2 val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns simpleHL7 + "\n" + simpleHL7 + "\n" + simpleHL7 val bundles = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(bundles).hasSize(3) @@ -812,7 +803,6 @@ class FhirConverterTests { @Test fun `should process an HL7 message with a registered profile`() { - mockkObject(BlobAccess) mockkObject(HL7Reader.Companion) every { HL7Reader.Companion.messageToConfigMap } returns mapOf( HL7Reader.Companion.HL7MessageType( @@ -827,12 +817,12 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() - val mockMessage = mockk(relaxed = true) + val mockMessage = mockk() every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { - BlobAccess.downloadBlob(any(), any()) + mockMessage.downloadContent() } returns simpleHL7 val bundles = engine.process(MimeFormat.HL7, mockMessage, actionLogger) assertThat(bundles).hasSize(1) diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirDestinationFilterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirDestinationFilterTests.kt index cac3f90e718..6e53616a3eb 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirDestinationFilterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirDestinationFilterTests.kt @@ -282,7 +282,7 @@ class FhirDestinationFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_URL).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_URL).readText()) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -312,7 +312,7 @@ class FhirDestinationFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_URL).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_URL).readText()) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -440,7 +440,7 @@ class FhirDestinationFilterTests { // data + mock setup val fhirData = File(VALID_FHIR_URL).readText() mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -477,7 +477,7 @@ class FhirDestinationFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_URL).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_URL).readText()) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) every { engine.findTopicReceivers(any()) } returns emptyList() diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirReceiverFilterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirReceiverFilterTests.kt index 950f828eea0..b9b59aaf7f8 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirReceiverFilterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirReceiverFilterTests.kt @@ -172,7 +172,6 @@ class FhirReceiverFilterTests { actionHistory.reportsOut.clear() actionHistory.actionLogs.clear() azureEventService.clear() - mockkObject(BlobAccess) clearAllMocks() } @@ -206,7 +205,7 @@ class FhirReceiverFilterTests { // act on each message (with assert) messages.forEach { message -> - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) // act + assert accessSpy.transact { txn -> val results = engine.run(message, actionLogger, actionHistory, txn) @@ -259,7 +258,7 @@ class FhirReceiverFilterTests { // act messages.forEach { message -> - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) accessSpy.transact { txn -> val results = engine.run(message, actionLogger, actionHistory, txn) assertThat(results).isEmpty() @@ -311,7 +310,7 @@ class FhirReceiverFilterTests { // act on each message (with assert) messages.forEach { message -> - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) // act + assert accessSpy.transact { txn -> val results = engine.run(message, actionLogger, actionHistory, txn) @@ -365,7 +364,7 @@ class FhirReceiverFilterTests { // act on each message (with assert) messages.forEach { message -> - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) // act + assert accessSpy.transact { txn -> val results = engine.run(message, actionLogger, actionHistory, txn) @@ -412,7 +411,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_FILEPATH).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_FILEPATH).readText()) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -476,7 +475,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(FhirTranscoder.encode(bundle)) + every { message.downloadContent() }.returns(FhirTranscoder.encode(bundle)) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -537,7 +536,7 @@ class FhirReceiverFilterTests { // act on each message (with assert) messages.forEachIndexed { i, message -> - every { BlobAccess.downloadBlob(any(), any()) }.returns(FhirTranscoder.encode(bundle)) + every { message.downloadContent() }.returns(FhirTranscoder.encode(bundle)) // act + assert accessSpy.transact { txn -> val results = engine.run(message, actionLogger, actionHistory, txn) @@ -585,7 +584,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -644,7 +643,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(FhirTranscoder.encode(bundle)) + every { message.downloadContent() }.returns(FhirTranscoder.encode(bundle)) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -689,7 +688,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) @@ -730,7 +729,7 @@ class FhirReceiverFilterTests { // mock setup mockkObject(BlobAccess) mockkStatic(Bundle::filterObservations) - every { BlobAccess.downloadBlob(any(), any()) }.returns(fhirData) + every { message.downloadContent() }.returns(fhirData) every { BlobAccess.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), MimeFormat.FHIR.toString(), BODY_URL, any()) }.returns(Unit) every { any().filterObservations(any(), any()) } returns FhirTranscoder.decode(fhirData) @@ -796,7 +795,7 @@ class FhirReceiverFilterTests { } // mock setup - every { BlobAccess.downloadBlob(any(), any()) }.returns(FhirTranscoder.encode(bundle)) + every { message.downloadContent() }.returns(FhirTranscoder.encode(bundle)) // act + assert accessSpy.transact { txn -> @@ -839,7 +838,7 @@ class FhirReceiverFilterTests { ) // mock setup - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_FILEPATH).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_FILEPATH).readText()) // act + assert accessSpy.transact { txn -> @@ -876,7 +875,7 @@ class FhirReceiverFilterTests { ) // mock setup - every { BlobAccess.downloadBlob(any(), any()) }.returns(File(VALID_FHIR_FILEPATH).readText()) + every { message.downloadContent() }.returns(File(VALID_FHIR_FILEPATH).readText()) // act + assert accessSpy.transact { diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt index b6944b9dce9..382781c60e8 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt @@ -122,7 +122,7 @@ class FhirTranslatorTests { val bodyUrl = BODY_URL every { actionLogger.hasErrors() } returns false - every { BlobAccess.downloadBlob(any(), any()) } + every { message.downloadContent() } .returns(File(VALID_DATA_URL).readText()) every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { @@ -196,7 +196,7 @@ class FhirTranslatorTests { val bodyFormat = MimeFormat.FHIR val bodyUrl = BODY_URL every { actionLogger.hasErrors() } returns false - every { BlobAccess.downloadBlob(any(), any()) } + every { message.downloadContent() } .returns(File(VALID_DATA_URL).readText()) every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { @@ -491,7 +491,7 @@ class FhirTranslatorTests { every { actionLogger.hasErrors() } returns false every { actionLogger.error(any()) } returns Unit - every { BlobAccess.downloadBlob(any(), any()) } + every { message.downloadContent() } .returns(File("src/test/resources/fhirengine/engine/valid_data_with_extensions.fhir").readText()) every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" every { accessSpy.insertTask(any(), bodyFormat.toString(), bodyUrl, any()) }.returns(Unit) diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CNNtoPractitionerTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CNNtoPractitionerTests.kt new file mode 100644 index 00000000000..3e1bc05ce60 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CNNtoPractitionerTests.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251 + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class CNNtoPractitionerTests { + @Test + fun `test correctly handles ISO universal id type`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cnn/cnn-to-Practitioner", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CWEtoCodeableConceptTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CWEtoCodeableConceptTests.kt new file mode 100644 index 00000000000..6453e38099f --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/CWEtoCodeableConceptTests.kt @@ -0,0 +1,105 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251 + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class CWEtoCodeableConceptTests { + @Test + fun `test value in CWE-1`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-3-test-value-cwe1", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-2`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-4-test-value-cwe2", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-3`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-5-test-value-cwe3", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-4`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-6-test-value-cwe4", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-5`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-7-test-value-cwe5", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-6`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-8-test-value-cwe6", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-7`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-9-test-value-cwe7", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-8`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-10-test-value-cwe8", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-9`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/cwe/codeable-concept/cwe-11-test-value-cwe9", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/NDLtoPractitionerRoleTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/NDLtoPractitionerRoleTests.kt new file mode 100644 index 00000000000..2d2328918f0 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/NDLtoPractitionerRoleTests.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251 + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class NDLtoPractitionerRoleTests { + @Test + fun `test translate to NDL to PractitionerRole to NDL`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/ndl/NDL-to-PractitionerRole", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XADtoAddressTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XADtoAddressTests.kt new file mode 100644 index 00000000000..ebfa8d4dd9d --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XADtoAddressTests.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251 + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class XADtoAddressTests { + @Test + fun `xad to address`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/xad/xad-to-address", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XTNToContactPointTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XTNToContactPointTests.kt new file mode 100644 index 00000000000..538c578a618 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251/XTNToContactPointTests.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251 + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class XTNToContactPointTests { + @Test + fun `xtn to contact point`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251/xtn/xtn-to-contact-point", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CQELRtoQuantityTest.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CQELRtoQuantityTest.kt new file mode 100644 index 00000000000..328e1892fa2 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CQELRtoQuantityTest.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251elr + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class CQELRtoQuantityTest { + @Test + fun `test value for CQ_ELR`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cq/cq-to-quantity", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CWEELRtoCodeableConceptTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CWEELRtoCodeableConceptTests.kt new file mode 100644 index 00000000000..264592d3853 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/CWEELRtoCodeableConceptTests.kt @@ -0,0 +1,160 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251elr + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class CWEELRtoCodeableConceptTests { + @Test + fun `test value in CWE-1`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-2`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-3`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-4`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-5`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-6`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-7`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-8`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-9`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-10`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-11`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-12`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-13`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } + + @Test + fun `test value in CWE-14`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/ORUR01ELRFullTest.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/ORUR01ELRFullTest.kt new file mode 100644 index 00000000000..69a67c1d832 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/ORUR01ELRFullTest.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251elr + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class ORUR01ELRFullTest { + @Test + fun `test ORU_R01 all segments`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/orur01/oru_r01-full", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/PRLELRtoServiceRequestTest.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/PRLELRtoServiceRequestTest.kt new file mode 100644 index 00000000000..9d42644564d --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/PRLELRtoServiceRequestTest.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251elr + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class PRLELRtoServiceRequestTest { + @Test + fun `test value for PRL_ELR`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/prl/prl-to-servicerequest", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/XPNELRtoHumanNameTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/XPNELRtoHumanNameTests.kt new file mode 100644 index 00000000000..9d9c6d6a165 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/v251elr/XPNELRtoHumanNameTests.kt @@ -0,0 +1,17 @@ +package gov.cdc.prime.router.datatests.mappinginventory.v251elr + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class XPNELRtoHumanNameTests { + @Test + fun `test translate to HL7 to FHIR to HL7`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty", + profile = "./metadata/HL7/v251-elr", + outputSchema = "classpath:/metadata/hl7_mapping/v251-elr/ORU_R01.yml", + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/kotlin/transport/RESTTransportIntegrationTests.kt b/prime-router/src/testIntegration/kotlin/transport/RESTTransportIntegrationTests.kt index a78b3729a53..94a523c8179 100644 --- a/prime-router/src/testIntegration/kotlin/transport/RESTTransportIntegrationTests.kt +++ b/prime-router/src/testIntegration/kotlin/transport/RESTTransportIntegrationTests.kt @@ -977,64 +977,6 @@ hnm8COa8Kr+bnTqzScpQuOfujHcFEtfcYUGfSS6HusxidwXx+lYi1A== assertThat(retryItems).isNull() } - // Epic localhost end-to-end testing - private val oracleRlNRestTransport = RESTTransportType( - "https://sendURL", - "", - authType = "apiKey", - headers = mapOf( - "Content-Type" to "text/plain", - "shared-api-key" to "From Vault" - ) - ) - - val expectedHttpHeaders = mapOf( - "Content-Type" to "text/plain", - "shared-api-key" to "oracle123", - "System_ID" to "test-user", - "Key" to "oracle123" - ) - - @Test - fun `test transport postReport with valid message to oracle-rln--etor-nbs-results`() { - val header = makeHeader() - val mockRestTransport = spyk(RESTTransport(mockClientAuthOk())) - - // Given: - // lookupDefaultCredential returns mock UserApiKeyCredential object to allow - // the getAuthTokenWIthUserApiKey() to be called. - every { mockRestTransport.lookupDefaultCredential(any()) }.returns( - UserApiKeyCredential( - "test-user", - "oracle123" - ) - ) - - // When: - // RESTTransport is called WITH flexionRestTransportType which has transport.parameters - val retryItems = mockRestTransport.send( - oracleRlNRestTransport, header, reportId, "test", null, - context, actionHistory, mockk(relaxed = true) - ) - - // Then: - // postReport should be called with correct httpheaders' values as given. - verify { - runBlocking { - mockRestTransport.postReport( - any(), - any(), - any(), - expectedHttpHeaders, - any(), - any(), - any() - ) - } - } - assertThat(retryItems).isNull() - } - @Test fun `test post vs put http client`() { val logger = mockkClass(Logger::class) diff --git a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.fhir b/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.fhir deleted file mode 100644 index f983d2590d8..00000000000 --- a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.fhir +++ /dev/null @@ -1 +0,0 @@ -{"resourceType":"Bundle","identifier":{"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"},"type":"message","timestamp":"2024-08-26T22:40:38.928Z","entry":[{"fullUrl":"MessageHeader/c2bc4735-f7b6-44f7-8b4b-471bbd7920c2","resource":{"resourceType":"MessageHeader","id":"c2bc4735-f7b6-44f7-8b4b-471bbd7920c2","meta":{"tag":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0103","code":"P","display":"Production"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header","extension":[{"url":"MSH.15","valueString":"NE"},{"url":"MSH.16","valueString":"NE"},{"url":"MSH.19","valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"ISO"}],"code":"ENG","display":"English"}]}},{"url":"MSH.21","valueIdentifier":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"ELR_Receiver"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"2.16.840.1.113883.9.11"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueString":"ISO"}]}],"value":"PHLabReport-NoAck"}},{"url":"MSH.7","valueInstant":"2024-08-26T22:40:38.928Z"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/character-set","valueString":"UNICODE UTF-8"}],"eventCoding":{"system":"http://terminology.hl7.org/CodeSystem/v2-0003","code":"R01","display":"ORU^R01^ORU_R01"},"destination":[{"name":"PRIME ReportStream","endpoint":"https://prime.cdc.gov/api/reports?option=SkipInvalidItems"}],"sender":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"},"source":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/software-binary-id","valueString":"0.2-SNAPSHOT"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date","valueInstant":"2024-08-26T16:13:26Z"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org","valueReference":{"reference":"Organization/07640c5d-87cd-488b-9343-a226c5166539"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"CDC PRIME - Atlanta"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"2.16.840.1.114222.4.1.237821"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueString":"ISO"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"MSH.3"}],"name":"CDC PRIME - Atlanta: 2.16.840.1.114222.4.1.237821","software":"PRIME ReportStream","version":"0.2-SNAPSHOT","endpoint":"urn:oid:2.16.840.1.114222.4.1.237821"},"focus":[{"reference":"Provenance/5da4765d-f330-4c39-98b9-2e44de1b9732"},{"reference":"DiagnosticReport/ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}]}},{"fullUrl":"Provenance/5da4765d-f330-4c39-98b9-2e44de1b9732","resource":{"resourceType":"Provenance","id":"5da4765d-f330-4c39-98b9-2e44de1b9732","recorded":"2024-08-26T22:40:38.928Z","activity":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0003","code":"R01","display":"ORU/ACK - Unsolicited transmission of an observation message"}]},"agent":[{"who":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}}]}},{"fullUrl":"DiagnosticReport/ecfbc6c0-0c32-4cf8-adc2-9134281110d8","resource":{"resourceType":"DiagnosticReport","id":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8","identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.3"}],"type":{"coding":[{"code":"FILL"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"},{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.2"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]}],"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"PLAC"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}],"basedOn":[{"reference":"ServiceRequest/1c658bf1-fb14-4701-8cb9-98f17956262f"}],"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"97099-6"}]},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"issued":"2024-08-26T22:40:38+00:00","_issued":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueInstant":"2024-08-26T22:40:38+00:00"}]},"specimen":[{"reference":"Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2"}],"result":[{"reference":"Observation/e234fc85-245d-4c25-a109-fa025ad77eb5"},{"reference":"Observation/fda8a9e5-092c-4235-b44b-362e0e01c73d"},{"reference":"Observation/83df8f91-e907-4fb9-ab5c-c81816b8e10b"}]}},{"fullUrl":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86","resource":{"resourceType":"Patient","id":"6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86","extension":[{"url":"http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd","valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"system":"http://terminology.hl7.org/CodeSystem/v3-Race","version":"2.5.1","code":"1002-5","display":"native"}],"text":"native"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group","valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70189"}],"system":"http://terminology.hl7.org/CodeSystem/v2-0189","version":"2.9","code":"N","display":"Not Hispanic or Latino"}],"text":"Not Hispanic or Latino"}}],"identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"PID.3"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier","extension":[{"url":"CX.5","valueString":"PI"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-facility","valueReference":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}}],"value":"6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86","assigner":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}}],"name":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name","extension":[{"url":"XPN.2","valueString":"Adolin"}]}],"use":"official","family":"Kholin","given":["Adolin"]}],"telecom":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point","extension":[{"url":"XTN.1","valueString":"(540) 867 5309"},{"url":"XTN.2","valueString":"PRS"},{"url":"XTN.3","valueString":"CP"},{"url":"XTN.7","valueInteger":8675309},{"url":"XTN.12","valueString":"(540) 867 5309"}]},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-country","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-area","valueInteger":540}],"system":"phone","value":"(540) 867 5309","use":"mobile"}],"gender":"male","birthDate":"2003-12-10","deceasedBoolean":false,"address":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line","extension":[{"url":"SAD.1","valueString":"2251 Airport Rd"}]}]}],"line":["2251 Airport Rd"],"city":"Greenfield","district":"Adair","state":"IA","postalCode":"50849-8101","country":"USA"}],"managingOrganization":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}}},{"fullUrl":"Organization/719ec8ad-cf59-405a-9832-c4065945c130","resource":{"resourceType":"Organization","id":"719ec8ad-cf59-405a-9832-c4065945c130","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type","valueCoding":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueCodeableConcept":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"XON.2"}],"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"code":"L"}]}}],"code":"L"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.25"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"OBX.15"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization","valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueCode":"CLIA"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"code":"12D4567890","display":"Testing Lab"}]}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization","extension":[{"url":"XON.10","valueString":"12D4567890"}]}],"identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"HD.2,HD.3"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"2.16.840.1.113883.4.7"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueString":"ISO"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"CLIA"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system","valueCodeableConcept":{"coding":[{"code":"CLIA"}]}}],"use":"official","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0301","code":"CLIA"}]},"value":"12D4567890"},{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"HD.1"}],"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"XX"}]},"value":"Testing Lab"}],"name":"Testing Lab","telecom":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point","extension":[{"url":"XTN.1","valueString":"(530) 867 5309"},{"url":"XTN.2","valueString":"WPN"},{"url":"XTN.3","valueString":"PH"},{"url":"XTN.7","valueInteger":8675309},{"url":"XTN.12","valueString":"(530) 867 5309"}]},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-country","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-area","valueInteger":530}],"system":"phone","value":"(530) 867 5309","use":"work"}],"address":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line","extension":[{"url":"SAD.1","valueString":"123 Beach Way"}]}]}],"line":["123 Beach Way"],"city":"Denver","state":"CO","postalCode":"80210","country":"USA"}]}},{"fullUrl":"Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9","resource":{"resourceType":"Practitioner","id":"ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xcn-practitioner","extension":[{"url":"XCN.10","valueString":"L"},{"url":"XCN.3","valueString":"Phil"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.12"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"NPI"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"2.16.840.1.113883.4.6"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueString":"ISO"}]}],"identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"NPI"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"urn:oid:2.16.840.1.113883.4.6"}],"type":{"coding":[{"code":"NPI"}]},"system":"NPI","value":"1245319599"}],"name":[{"family":"McTester","given":["Phil"]}],"telecom":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point","extension":[{"url":"XTN.1","valueString":"(530) 867 5309"},{"url":"XTN.2","valueString":"WPN"},{"url":"XTN.3","valueString":"PH"},{"url":"XTN.7","valueInteger":8675309},{"url":"XTN.12","valueString":"(530) 867 5309"}]},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-country","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-area","valueInteger":530}],"system":"phone","value":"(530) 867 5309","use":"work"}],"address":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line","extension":[{"url":"SAD.1","valueString":"321 Ocean Drive"}]}]}],"line":["321 Ocean Drive"],"city":"Denver","state":"CO","postalCode":"80210","country":"USA"}]}},{"fullUrl":"Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2","resource":{"resourceType":"Specimen","id":"dc7af370-fc07-4b00-abc7-9b5dd87cf4d2","identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component","valueString":"SPM.2.1"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/filler-assigned-identifier","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier","valueId":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]}],"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"PGN"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}],"type":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","version":"2.67","code":"258500001","display":"Nasopharyngeal swab"}],"text":"Nasopharyngeal swab"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"receivedTime":"2024-08-26T22:25:30+00:00","collection":{"collectedDateTime":"2024-08-26T22:25:30+00:00","bodySite":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"87100004","display":"Topography unknown (body structure)"}],"text":"Topography unknown (body structure)"}}}},{"fullUrl":"ServiceRequest/1c658bf1-fb14-4701-8cb9-98f17956262f","resource":{"resourceType":"ServiceRequest","id":"1c658bf1-fb14-4701-8cb9-98f17956262f","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/order-control","valueCodeableConcept":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0119","code":"RE"}]}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/order-effective-date","valueDateTime":"2024-08-26T22:40:30+00:00"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/business-event","valueCode":"RE"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request","extension":[{"url":"OBR.2","valueIdentifier":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.2"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]}],"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"PLAC"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}},{"url":"OBR.3","valueIdentifier":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.3"}],"type":{"coding":[{"code":"FILL"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}},{"url":"OBR.16","valueReference":{"reference":"Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number","valueContactPoint":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point","extension":[{"url":"XTN.1","valueString":"(530) 867 5309"},{"url":"XTN.2","valueString":"WPN"},{"url":"XTN.3","valueString":"PH"},{"url":"XTN.7","valueInteger":8675309},{"url":"XTN.12","valueString":"(530) 867 5309"}]},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-country","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-area","valueInteger":530},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.14"}],"system":"phone","value":"(530) 867 5309","use":"work"}},{"url":"OBR.25","valueString":"F"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/orc-common-order","extension":[{"url":"ORC.15","valueDateTime":"2024-08-26T22:40:30+00:00"}]}],"identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.2"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]}],"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"PLAC"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"},{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id","valueString":"Testing Lab"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueString":"12D4567890"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type","valueCode":"CLIA"}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.3"}],"type":{"coding":[{"code":"FILL"}]},"value":"ecfbc6c0-0c32-4cf8-adc2-9134281110d8"}],"status":"completed","intent":"order","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","code":"97099-6","display":"Influenza virus A and B and SARS-CoV-2 (COVID-19) Ag panel - Upper respiratory specimen by Rapid immunoassay"}]},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"requester":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number","valueContactPoint":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point","extension":[{"url":"XTN.1","valueString":"(530) 867 5309"},{"url":"XTN.2","valueString":"WPN"},{"url":"XTN.3","valueString":"PH"},{"url":"XTN.7","valueInteger":8675309},{"url":"XTN.12","valueString":"(530) 867 5309"}]},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-country","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/contactpoint-area","valueInteger":530},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field","valueString":"ORC.14"}],"system":"phone","value":"(530) 867 5309","use":"work"}}],"reference":"PractitionerRole/cec65045-6920-44e3-bc1d-b36321f72acd"},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"supportingInfo":[{"reference":"Observation/ec574855-130e-31a7-9d65-229619169035"},{"reference":"Observation/19288d48-f396-3faa-ab84-a632afb15403"},{"reference":"Observation/c556ead4-b9db-3e23-8a3a-c3803a981c08"},{"reference":"Observation/a0ead307-da3e-3371-96e2-f6b15f80f6ac"},{"reference":"Observation/51e39366-4c8d-3343-83ae-bc833d8aa0ed"}],"note":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/note-type","valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/code-index-name","valueString":"identifier"}],"system":"HL70364","version":"2.5.1","code":"RE","display":"Remark"}]}}],"text":"This is a note"}]}},{"fullUrl":"Device/157d550a-a12a-4367-b80e-53d75ca29053","resource":{"resourceType":"Device","id":"157d550a-a12a-4367-b80e-53d75ca29053","identifier":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id","valueCode":"MNI"}]}],"value":"BD Veritor Plus System_Becton Dickinson"},{"type":{"coding":[{"code":"MNI"}]}}],"manufacturer":"Becton, Dickinson and Company (BD)","deviceName":[{"name":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B","type":"model-name"}]}},{"fullUrl":"PractitionerRole/cec65045-6920-44e3-bc1d-b36321f72acd","resource":{"resourceType":"PractitionerRole","id":"cec65045-6920-44e3-bc1d-b36321f72acd","practitioner":{"reference":"Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9"},"organization":{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}}},{"fullUrl":"Organization/07640c5d-87cd-488b-9343-a226c5166539","resource":{"resourceType":"Organization","id":"07640c5d-87cd-488b-9343-a226c5166539","name":"Centers for Disease Control and Prevention"}},{"fullUrl":"Observation/e234fc85-245d-4c25-a109-fa025ad77eb5","resource":{"resourceType":"Observation","id":"e234fc85-245d-4c25-a109-fa025ad77eb5","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.17","valueCodeableConcept":{"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}]}}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time","valueInstant":"2024-08-26T22:40:30.132Z","_valueInstant":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueInstant":"2024-08-26T22:40:30.132Z"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"6142004","display":"Influenza (disorder)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"541131000124102","display":"Infection caused by novel Influenza A virus variant (disorder)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","code":"80382-5","display":"Influenza virus A Ag [Presence] in Upper respiratory specimen by Rapid immunoassay"}],"text":"Flu A"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"issued":"2024-08-26T22:40:30.132Z","performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70078"}],"system":"http://terminology.hl7.org/CodeSystem/v2-0078","version":"2.7","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)","display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}],"text":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"},"specimen":{"reference":"Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2"},"device":{"reference":"Device/157d550a-a12a-4367-b80e-53d75ca29053"}}},{"fullUrl":"Observation/fda8a9e5-092c-4235-b44b-362e0e01c73d","resource":{"resourceType":"Observation","id":"fda8a9e5-092c-4235-b44b-362e0e01c73d","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.17","valueCodeableConcept":{"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}]}}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time","valueInstant":"2024-08-26T22:40:30.132Z","_valueInstant":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueInstant":"2024-08-26T22:40:30.132Z"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"6142004","display":"Influenza (disorder)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","code":"80383-3","display":"Influenza virus B Ag [Presence] in Upper respiratory specimen by Rapid immunoassay"}],"text":"Flu B"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"issued":"2024-08-26T22:40:30.132Z","performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"260415000","display":"Not detected"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70078"}],"system":"http://terminology.hl7.org/CodeSystem/v2-0078","version":"2.7","code":"N","display":"Normal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)","display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}],"text":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"},"specimen":{"reference":"Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2"},"device":{"reference":"Device/157d550a-a12a-4367-b80e-53d75ca29053"}}},{"fullUrl":"Observation/83df8f91-e907-4fb9-ab5c-c81816b8e10b","resource":{"resourceType":"Observation","id":"83df8f91-e907-4fb9-ab5c-c81816b8e10b","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.17","valueCodeableConcept":{"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}]}}]},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time","valueInstant":"2024-08-26T22:40:30.132Z","_valueInstant":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueInstant":"2024-08-26T22:40:30.132Z"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"840539006","display":"Disease caused by severe acute respiratory syndrome coronavirus 2 (disorder)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","code":"97097-0","display":"SARS-CoV-2 (COVID-19) Ag [Presence] in Upper respiratory specimen by Rapid immunoassay"}],"text":"COVID-19"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"issued":"2024-08-26T22:40:30.132Z","performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70078"}],"system":"http://terminology.hl7.org/CodeSystem/v2-0078","version":"2.7","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}],"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)","display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B"}],"text":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"},"specimen":{"reference":"Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2"},"device":{"reference":"Device/157d550a-a12a-4367-b80e-53d75ca29053"}}},{"fullUrl":"Observation/ec574855-130e-31a7-9d65-229619169035","resource":{"resourceType":"Observation","id":"ec574855-130e-31a7-9d65-229619169035","meta":{"tag":[{"code":"AOE"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.29","valueString":"QST"}]}],"identifier":[{"use":"official","type":{"coding":[{"system":"http://loinc.org","code":"81959-9","display":"Public health laboratory ask at order entry panel"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","version":"2.69","code":"95419-8","display":"Has symptoms related to condition of interest"}],"text":"Has symptoms related to condition of interest"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70136"}],"system":"http://terminology.hl7.org/ValueSet/v2-0136","code":"N","display":"No"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}],"method":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}}},{"fullUrl":"Observation/19288d48-f396-3faa-ab84-a632afb15403","resource":{"resourceType":"Observation","id":"19288d48-f396-3faa-ab84-a632afb15403","meta":{"tag":[{"code":"AOE"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.29","valueString":"QST"}]}],"identifier":[{"use":"official","type":{"coding":[{"system":"http://loinc.org","code":"81959-9","display":"Public health laboratory ask at order entry panel"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","version":"2.68","code":"82810-3","display":"Pregnancy status"}],"text":"Pregnancy status"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"60001007","display":"Not pregnant"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}],"method":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}}},{"fullUrl":"Observation/c556ead4-b9db-3e23-8a3a-c3803a981c08","resource":{"resourceType":"Observation","id":"c556ead4-b9db-3e23-8a3a-c3803a981c08","meta":{"tag":[{"code":"AOE"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.29","valueString":"QST"}]}],"identifier":[{"use":"official","type":{"coding":[{"system":"http://loinc.org","code":"81959-9","display":"Public health laboratory ask at order entry panel"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","version":"2.69","code":"95418-0","display":"Employed in a healthcare setting"}],"text":"Employed in a healthcare setting"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70136"}],"system":"http://terminology.hl7.org/ValueSet/v2-0136","code":"Y","display":"Yes"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}],"method":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}}},{"fullUrl":"Observation/a0ead307-da3e-3371-96e2-f6b15f80f6ac","resource":{"resourceType":"Observation","id":"a0ead307-da3e-3371-96e2-f6b15f80f6ac","meta":{"tag":[{"code":"AOE"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.29","valueString":"QST"}]}],"identifier":[{"use":"official","type":{"coding":[{"system":"http://loinc.org","code":"81959-9","display":"Public health laboratory ask at order entry panel"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","version":"2.69","code":"95421-4","display":"Resides in a congregate care setting"}],"text":"Resides in a congregate care setting"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"HL70136"}],"system":"http://terminology.hl7.org/ValueSet/v2-0136","code":"N","display":"No"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}],"method":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}}},{"fullUrl":"Observation/51e39366-4c8d-3343-83ae-bc833d8aa0ed","resource":{"resourceType":"Observation","id":"51e39366-4c8d-3343-83ae-bc833d8aa0ed","meta":{"tag":[{"code":"AOE"}]},"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation","extension":[{"url":"OBX.2","valueString":"CWE"},{"url":"OBX.11","valueString":"F"},{"url":"OBX.29","valueString":"QST"}]}],"identifier":[{"use":"official","type":{"coding":[{"system":"http://loinc.org","code":"81959-9","display":"Public health laboratory ask at order entry panel"}]}}],"status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"ReportStream","code":"AOE","display":"Ask at order entry question"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"LN"}],"system":"http://loinc.org","code":"76691-5","display":"Gender identity"}],"text":"Gender identity"},"subject":{"reference":"Patient/6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86"},"effectiveDateTime":"2024-08-26T22:25:30+00:00","_effectiveDateTime":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time","valueDateTime":"2024-08-26T22:25:30+00:00"}]},"performer":[{"reference":"Organization/719ec8ad-cf59-405a-9832-c4065945c130"}],"valueCodeableConcept":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system","valueString":"SCT"}],"system":"http://snomed.info/sct","code":"446131000124102","display":"Non-binary gender identity"}]},"interpretation":[{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}],"method":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding","valueString":"coding"}]}]}}}]} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.hl7 b/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.hl7 deleted file mode 100644 index 55972b4236c..00000000000 --- a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/mars_unwanted_condition_to_notes.hl7 +++ /dev/null @@ -1,15 +0,0 @@ -MSH|^~\&|CDC PRIME - Atlanta^2.16.840.1.114222.4.1.237821^ISO|Testing Lab^12D4567890^CLIA|||20240826224038+0000||ORU^R01^ORU_R01|ecfbc6c0-0c32-4cf8-adc2-9134281110d8|P|2.5.1|||NE|NE|USA|UNICODE UTF-8|ENG^English^ISO||PHLabReport-NoAck^ELR_Receiver^2.16.840.1.113883.9.11^ISO -SFT|Centers for Disease Control and Prevention|0.2-SNAPSHOT|PRIME ReportStream|0.2-SNAPSHOT||20240826161326+0000 -PID|1||6b9b4aa8-f333-4ea5-8dfa-2a3cd6b4fd86^^^Testing Lab&12D4567890&CLIA^PI^Testing Lab&12D4567890&CLIA||Kholin^Adolin^^^^^L||20031210|M||1002-5^native^^^^^2.5.1^^native|2251 Airport Rd^^Greenfield^IA^50849-8101^USA^^^Adair||(540) 867 5309^PRS^CP^^1^540^8675309^^^^^(540) 867 5309|||||||||N^Not Hispanic or Latino^HL70189^^^^2.9^^Not Hispanic or Latino||||||||N -ORC|RE|ecfbc6c0-0c32-4cf8-adc2-9134281110d8^Testing Lab^12D4567890^CLIA|ecfbc6c0-0c32-4cf8-adc2-9134281110d8^Testing Lab^12D4567890^CLIA|||||||||1245319599^McTester^Phil^^^^^^NPI&2.16.840.1.113883.4.6&ISO^L^^^NPI||(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|20240826224030+0000||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|321 Ocean Drive^^Denver^CO^80210^USA -OBR|1|ecfbc6c0-0c32-4cf8-adc2-9134281110d8^Testing Lab^12D4567890^CLIA|ecfbc6c0-0c32-4cf8-adc2-9134281110d8^Testing Lab^12D4567890^CLIA|97099-6^Influenza virus A and B and SARS-CoV-2 (COVID-19) Ag panel - Upper respiratory specimen by Rapid immunoassay^LN|||20240826222530+0000|||||||||1245319599^McTester^Phil^^^^^^NPI&2.16.840.1.113883.4.6&ISO^L^^^NPI|(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|||||20240826224038+0000|||F -NTE|1||This is a note -NTE|2|O|OBX filtered for identifier = 80382-5 - Flu A; value = 260373001 - Detected. OBX was removed due to your jurisdictional reporting rules indicating this result is not reportable. -NTE|3|O|OBX filtered for identifier = 80383-3 - Flu B; value = 260415000 - Not detected. OBX was removed due to your jurisdictional reporting rules indicating this result is not reportable. -OBX|1|CWE|97097-0^SARS-CoV-2 (COVID-19) Ag [Presence] in Upper respiratory specimen by Rapid immunoassay^LN^^^^^^COVID-19||260373001^Detected^SCT|||A^Abnormal^HL70078^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||BD Veritor System for Rapid Detection of SARS-CoV-2 \T\ Flu A+B_Becton, Dickinson and Company (BD)^BD Veritor System for Rapid Detection of SARS-CoV-2 \T\ Flu A+B^^^^^^^BD Veritor System for Rapid Detection of SARS-CoV-2 \T\ Flu A+B_Becton, Dickinson and Company (BD)|BD Veritor Plus System_Becton Dickinson^^MNI|20240826224030+0000||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA -OBX|2|CWE|95419-8^Has symptoms related to condition of interest^LN^^^^2.69^^Has symptoms related to condition of interest||N^No^HL70136|||^^^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|||||QST -OBX|3|CWE|82810-3^Pregnancy status^LN^^^^2.68^^Pregnancy status||60001007^Not pregnant^SCT|||^^^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|||||QST -OBX|4|CWE|95418-0^Employed in a healthcare setting^LN^^^^2.69^^Employed in a healthcare setting||Y^Yes^HL70136|||^^^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|||||QST -OBX|5|CWE|95421-4^Resides in a congregate care setting^LN^^^^2.69^^Resides in a congregate care setting||N^No^HL70136|||^^^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|||||QST -OBX|6|CWE|76691-5^Gender identity^LN^^^^^^Gender identity||446131000124102^Non-binary gender identity^SCT|||^^^^^^2.7|||F|||20240826222530+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Denver^CO^80210^USA|||||QST -SPM|1|ecfbc6c0-0c32-4cf8-adc2-9134281110d8&Testing Lab&12D4567890&CLIA^ecfbc6c0-0c32-4cf8-adc2-9134281110d8&Testing Lab&12D4567890&CLIA||258500001^Nasopharyngeal swab^SCT^^^^2.67^^Nasopharyngeal swab||||87100004^Topography unknown (body structure)^SCT^^^^^^Topography unknown (body structure)|||||||||20240826222530+0000|20240826222530+0000 \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.fhir b/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.fhir deleted file mode 100644 index e78bc968699..00000000000 --- a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.fhir +++ /dev/null @@ -1 +0,0 @@ -{ "resourceType": "Bundle", "identifier": { "value": "3ad338c6-125d-4141-9ce1-6040481304ab" }, "type": "message", "timestamp": "2024-02-14T21:06:46.577Z", "entry": [ { "fullUrl": "MessageHeader/2a8ffce6-daa1-43e2-9236-e38bbb59892a", "resource": { "resourceType": "MessageHeader", "id": "2a8ffce6-daa1-43e2-9236-e38bbb59892a", "meta": { "tag": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0103", "code": "P", "display": "Production" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", "extension": [ { "url": "MSH.15", "valueString": "NE" }, { "url": "MSH.16", "valueString": "NE" }, { "url": "MSH.19", "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "ISO" } ], "code": "ENG", "display": "English" } ] } }, { "url": "MSH.21", "valueIdentifier": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "ELR_Receiver" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "2.16.840.1.113883.9.11" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueString": "ISO" } ] } ], "value": "PHLabReport-NoAck" } }, { "url": "MSH.7", "valueInstant": "2024-02-14T21:06:46.577Z" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", "valueString": "UNICODE UTF-8" } ], "eventCoding": { "system": "http://terminology.hl7.org/CodeSystem/v2-0003", "code": "R01", "display": "ORU^R01^ORU_R01" }, "destination": [ { "name": "PRIME ReportStream", "endpoint": "https://prime.cdc.gov/api/reports?option=SkipInvalidItems" } ], "sender": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" }, "source": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-binary-id", "valueString": "0.2-SNAPSHOT" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date", "valueInstant": "2024-02-14T16:38:56Z" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org", "valueReference": { "reference": "Organization/07640c5d-87cd-488b-9343-a226c5166539" } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "CDC PRIME - Atlanta" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "2.16.840.1.114222.4.1.237821" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueString": "ISO" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "MSH.3" } ], "name": "CDC PRIME - Atlanta: 2.16.840.1.114222.4.1.237821", "software": "PRIME ReportStream", "version": "0.2-SNAPSHOT", "endpoint": "urn:oid:2.16.840.1.114222.4.1.237821" }, "focus": [ { "reference": "Provenance/b344d9a8-399a-4607-b10e-9bf86f27a1bf" }, { "reference": "DiagnosticReport/3ad338c6-125d-4141-9ce1-6040481304ab" } ] } }, { "fullUrl": "Provenance/b344d9a8-399a-4607-b10e-9bf86f27a1bf", "resource": { "resourceType": "Provenance", "id": "b344d9a8-399a-4607-b10e-9bf86f27a1bf", "recorded": "2024-02-14T21:06:46.577Z", "activity": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0003", "code": "R01", "display": "ORU/ACK - Unsolicited transmission of an observation message" } ] }, "agent": [ { "who": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } } ] } }, { "fullUrl": "DiagnosticReport/3ad338c6-125d-4141-9ce1-6040481304ab", "resource": { "resourceType": "DiagnosticReport", "id": "3ad338c6-125d-4141-9ce1-6040481304ab", "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.3" } ], "type": { "coding": [ { "code": "FILL" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" }, { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": 123 }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] } ], "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "PLAC" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" } ], "basedOn": [ { "reference": "ServiceRequest/c62aa5a7-4624-4b00-9ad6-e089c1aa29c5" } ], "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "95941-1" } ] }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "issued": "2024-02-14T21:06:46+00:00", "_issued": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueInstant": "2024-02-14T21:06:46+00:00" } ] }, "specimen": [ { "reference": "Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2" } ], "result": [ { "reference": "Observation/a8d3dfac-dd32-4e10-877b-407da556266e" }, { "reference": "Observation/06735b3b-a15d-4249-9ff6-6df8f7aab822" }, { "reference": "Observation/a6655d89-f7ea-4192-be69-92e772c4b8a6" } ] } }, { "fullUrl": "Patient/3551359f-bd1c-411e-b930-789ac694e75f", "resource": { "resourceType": "Patient", "id": "3551359f-bd1c-411e-b930-789ac694e75f", "extension": [ { "url": "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "system": "http://terminology.hl7.org/CodeSystem/v3-Race", "version": "2.5.1", "code": "2076-8", "display": "pacific" } ], "text": "pacific" } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group", "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70189" } ], "system": "http://terminology.hl7.org/CodeSystem/v2-0189", "version": "2.9", "code": "N", "display": "Not Hispanic or Latino" } ], "text": "Not Hispanic or Latino" } }, { "url": "https://hl7.org/fhir/R4/extension-patient-genderidentity.html", "valueCoding": { "system": "https://hl7.org/fhir/R4/valueset-gender-identity.html", "code": "male", "display": "male" } } ], "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "PID.3" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier", "extension": [ { "url": "CX.5", "valueString": "PI" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-facility", "valueReference": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } } ], "value": "3551359f-bd1c-411e-b930-789ac694e75f", "assigner": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } } ], "name": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", "extension": [ { "url": "XPN.2", "valueString": "Cedrick" }, { "url": "XPN.3", "valueString": "Charles" } ] } ], "use": "official", "family": "Diggory", "given": [ "Cedrick", "Charles" ] } ], "telecom": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", "extension": [ { "url": "XTN.1", "valueString": "(340) 555 5555" }, { "url": "XTN.2", "valueString": "PRS" }, { "url": "XTN.3", "valueString": "CP" }, { "url": "XTN.7", "valueInteger": 5555555 }, { "url": "XTN.12", "valueString": "(340) 555 5555" } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-country", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-area", "valueInteger": 340 } ], "system": "phone", "value": "(340) 555 5555", "use": "mobile" } ], "gender": "male", "birthDate": "2000-12-18", "deceasedBoolean": false, "address": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", "extension": [ { "url": "SAD.1", "valueString": "123 Main St" } ] } ] } ], "line": [ "123 Main St" ], "city": "Anchorage", "district": "Anchorage", "state": "NJ", "postalCode": "99501", "country": "USA" } ], "managingOrganization": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } } }, { "fullUrl": "Organization/719ec8ad-cf59-405a-9832-c4065945c130", "resource": { "resourceType": "Organization", "id": "719ec8ad-cf59-405a-9832-c4065945c130", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", "valueCoding": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueCodeableConcept": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "XON.2" } ], "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "code": "L" } ] } } ], "code": "L" } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "OBX.25" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "OBX.15" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueCode": "CLIA" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "code": "12D4567890", "display": "Testing Lab" } ] } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", "extension": [ { "url": "XON.10", "valueString": "12D4567890" } ] } ], "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "HD.2,HD.3" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "2.16.840.1.113883.4.7" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueString": "ISO" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "CLIA" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system", "valueCodeableConcept": { "coding": [ { "code": "CLIA" } ] } } ], "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0301", "code": "CLIA" } ] }, "value": "12D4567890" }, { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "HD.1" } ], "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "XX" } ] }, "value": "Testing Lab" } ], "name": "Testing Lab", "telecom": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", "extension": [ { "url": "XTN.1", "valueString": "(530) 867 5309" }, { "url": "XTN.2", "valueString": "WPN" }, { "url": "XTN.3", "valueString": "PH" }, { "url": "XTN.7", "valueInteger": 8675309 }, { "url": "XTN.12", "valueString": "(530) 867 5309" } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-country", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-area", "valueInteger": 530 } ], "system": "phone", "value": "(530) 867 5309", "use": "work" } ], "address": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", "extension": [ { "url": "SAD.1", "valueString": "123 Beach Way" } ] } ] } ], "line": [ "123 Beach Way" ], "city": "Houston", "state": "NJ", "postalCode": "77001", "country": "USA" } ] } }, { "fullUrl": "Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9", "resource": { "resourceType": "Practitioner", "id": "ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xcn-practitioner", "extension": [ { "url": "XCN.10", "valueString": "L" }, { "url": "XCN.3", "valueString": "Phil" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.12" } ], "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "NPI" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "urn:oid:2.16.840.1.113883.4.6" } ], "system": "http://hl7.org/fhir/sid/us-npi", "value": "1245319599" } ], "name": [ { "family": "McTester", "given": [ "Phil" ] } ], "telecom": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", "extension": [ { "url": "XTN.1", "valueString": "(530) 867 5309" }, { "url": "XTN.2", "valueString": "WPN" }, { "url": "XTN.3", "valueString": "PH" }, { "url": "XTN.7", "valueInteger": 8675309 }, { "url": "XTN.12", "valueString": "(530) 867 5309" } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-country", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-area", "valueInteger": 530 }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.14" } ], "system": "phone", "value": "(530) 867 5309", "use": "work" } ], "address": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", "extension": [ { "url": "SAD.1", "valueString": "321 Ocean Drive" } ] } ] } ], "line": [ "321 Ocean Drive" ], "city": "Houston", "state": "NJ", "postalCode": "77001", "country": "USA" } ] } }, { "fullUrl": "Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2", "resource": { "resourceType": "Specimen", "id": "dc7af370-fc07-4b00-abc7-9b5dd87cf4d2", "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component", "valueString": "SPM.2.1" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/filler-assigned-identifier", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier", "valueId": "3ad338c6-125d-4141-9ce1-6040481304ab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] } ], "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "PGN" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" } ], "type": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "version": "2.67", "code": "258500001", "display": "Nasopharyngeal swab" } ], "text": "Nasopharyngeal swab" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "receivedTime": "2024-02-14T20:51:46+00:00", "collection": { "collectedDateTime": "2024-02-14T20:51:46+00:00", "bodySite": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "code": "87100004", "display": "Topography unknown (body structure)" } ], "text": "Topography unknown (body structure)" } } } }, { "fullUrl": "ServiceRequest/c62aa5a7-4624-4b00-9ad6-e089c1aa29c5", "resource": { "resourceType": "ServiceRequest", "id": "c62aa5a7-4624-4b00-9ad6-e089c1aa29c5", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-control", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0119", "code": "RE" } ] } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/order-effective-date", "valueDateTime": "2024-02-14T21:06:46+00:00" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/business-event", "valueCode": "RE" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", "extension": [ { "url": "OBR.2", "valueIdentifier": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.2" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] } ], "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "PLAC" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" } }, { "url": "OBR.3", "valueIdentifier": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.3" } ], "type": { "coding": [ { "code": "FILL" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" } }, { "url": "OBR.16", "valueReference": { "reference": "Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9" } }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number", "valueContactPoint": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", "extension": [ { "url": "XTN.1", "valueString": "(530) 867 5309" }, { "url": "XTN.2", "valueString": "WPN" }, { "url": "XTN.3", "valueString": "PH" }, { "url": "XTN.7", "valueInteger": 8675309 }, { "url": "XTN.12", "valueString": "(530) 867 5309" } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-country", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-area", "valueInteger": 530 }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.14" } ], "system": "phone", "value": "(530) 867 5309", "use": "work" } } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/orc-common-order", "extension": [ { "url": "ORC.15", "valueDateTime": "2024-02-14T21:06:46+00:00" } ] } ], "identifier": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.2" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] } ], "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "PLAC" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" }, { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", "valueString": "Testing Lab" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", "valueString": "12D4567890" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", "valueCode": "CLIA" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.3" } ], "type": { "coding": [ { "code": "FILL" } ] }, "value": "3ad338c6-125d-4141-9ce1-6040481304ab" } ], "status": "completed", "intent": "order", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" } ], "system": "http://loinc.org", "code": "95941-1", "display": "Influenza virus A and B and SARS-CoV-2 (COVID-19) and Respiratory syncytial virus RNA panel - Respiratory system specimen by NAA with probe detection" } ] }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "requester": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number", "valueContactPoint": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", "extension": [ { "url": "XTN.1", "valueString": "(530) 867 5309" }, { "url": "XTN.2", "valueString": "WPN" }, { "url": "XTN.3", "valueString": "PH" }, { "url": "XTN.7", "valueInteger": 8675309 }, { "url": "XTN.12", "valueString": "(530) 867 5309" } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-country", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/contactpoint-area", "valueInteger": 530 }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", "valueString": "ORC.14" } ], "system": "phone", "value": "(530) 867 5309", "use": "work" } } ], "reference": "PractitionerRole/d31bb3bb-3e5d-4bb3-ba73-13e5b2e96927" }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "supportingInfo": [ { "reference": "Observation/81fd6b57-6808-32f6-b4e4-bdace1ea0e26" }, { "reference": "Observation/91dbef95-254a-3398-a8ee-c5eba59121b1" }, { "reference": "Observation/57f557ee-1009-397e-bae5-15d2cd3484fe" }, { "reference": "Observation/f186e153-e06a-32f1-b5f5-38be1fa13345" }, { "reference": "Observation/623a1a02-6925-3595-affd-271175822707" } ] } }, { "fullUrl": "Device/b83b1f5f-b62c-43aa-98f6-0ce34ab41927", "resource": { "resourceType": "Device", "id": "b83b1f5f-b62c-43aa-98f6-0ce34ab41927", "identifier": [ { "value": "00884999048034" }, { "type": { "coding": [ { "code": "DII" } ] } } ], "manufacturer": "Abbott", "deviceName": [ { "name": "Alinity m", "type": "model-name" } ] } }, { "fullUrl": "PractitionerRole/d31bb3bb-3e5d-4bb3-ba73-13e5b2e96927", "resource": { "resourceType": "PractitionerRole", "id": "d31bb3bb-3e5d-4bb3-ba73-13e5b2e96927", "practitioner": { "reference": "Practitioner/ee29ccf5-631d-4b35-a6d4-30a61c0eb8d9" }, "organization": { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } } }, { "fullUrl": "Organization/07640c5d-87cd-488b-9343-a226c5166539", "resource": { "resourceType": "Organization", "id": "07640c5d-87cd-488b-9343-a226c5166539", "name": "Centers for Disease Control and Prevention" } }, { "fullUrl": "Observation/a8d3dfac-dd32-4e10-877b-407da556266e", "resource": { "resourceType": "Observation", "id": "a8d3dfac-dd32-4e10-877b-407da556266e", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", "valueInstant": "2024-02-14T21:06:46.490Z", "_valueInstant": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueInstant": "2024-02-14T21:06:46.490Z" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "SNOMEDCT", "code": "55735004", "display": "Respiratory syncytial virus infection (disorder)" } } ], "system": "http://loinc.org", "code": "85479-4", "display": "Respiratory syncytial virus RNA [Presence] in Upper respiratory specimen by NAA with probe detection" } ], "text": "RSV" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "issued": "2024-02-14T21:06:46.490Z", "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "code": "260373001", "display": "Detected" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70078" } ], "system": "http://terminology.hl7.org/CodeSystem/v2-0078", "version": "2.7", "code": "A", "display": "Abnormal" } ] } ], "method": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", "valueCoding": { "code": "Alinity m Resp-4-Plex_Abbott Molecular Inc." } } ], "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "display": "Alinity m" } ] }, "specimen": { "reference": "Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2" }, "device": { "reference": "Device/b83b1f5f-b62c-43aa-98f6-0ce34ab41927" } } }, { "fullUrl": "Observation/06735b3b-a15d-4249-9ff6-6df8f7aab822", "resource": { "resourceType": "Observation", "id": "06735b3b-a15d-4249-9ff6-6df8f7aab822", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", "valueInstant": "2024-02-14T21:06:46.490Z", "_valueInstant": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueInstant": "2024-02-14T21:06:46.490Z" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "SNOMEDCT", "code": "840539006", "display": "Disease caused by severe acute respiratory syndrome coronavirus 2 (disorder)" } } ], "system": "http://loinc.org", "code": "94500-6", "display": "SARS-CoV-2 (COVID-19) RNA [Presence] in Respiratory system specimen by NAA with probe detection" } ], "text": "COVID-19" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "issued": "2024-02-14T21:06:46.490Z", "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "code": "260373001", "display": "Detected" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70078" } ], "system": "http://terminology.hl7.org/CodeSystem/v2-0078", "version": "2.7", "code": "A", "display": "Abnormal" } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "display": "Alinity m" } ] }, "specimen": { "reference": "Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2" }, "device": { "reference": "Device/b83b1f5f-b62c-43aa-98f6-0ce34ab41927" } } }, { "fullUrl": "Observation/a6655d89-f7ea-4192-be69-92e772c4b8a6", "resource": { "resourceType": "Observation", "id": "a6655d89-f7ea-4192-be69-92e772c4b8a6", "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", "valueInstant": "2024-02-14T21:06:46.490Z", "_valueInstant": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueInstant": "2024-02-14T21:06:46.490Z" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "SNOMEDCT", "code": "5.41E+14", "display": "Infection caused by novel Influenza A virus variant (disorder)" } } ], "system": "http://loinc.org", "code": "85478-6", "display": "Influenza virus B RNA [Presence] in Upper respiratory specimen by NAA with probe detection" } ], "text": "Flu B" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "issued": "2024-02-14T21:06:46.490Z", "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "code": "260373001", "display": "Detected" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70078" } ], "system": "http://terminology.hl7.org/CodeSystem/v2-0078", "version": "2.7", "code": "A", "display": "Abnormal" } ] } ], "method": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id", "valueCoding": { "code": "Alinity m Resp-4-Plex_Abbott Molecular Inc." } } ], "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ], "display": "Alinity m" } ] }, "specimen": { "reference": "Specimen/dc7af370-fc07-4b00-abc7-9b5dd87cf4d2" }, "device": { "reference": "Device/b83b1f5f-b62c-43aa-98f6-0ce34ab41927" } } }, { "fullUrl": "Observation/81fd6b57-6808-32f6-b4e4-bdace1ea0e26", "resource": { "resourceType": "Observation", "id": "81fd6b57-6808-32f6-b4e4-bdace1ea0e26", "meta": { "tag": [ { "code": "AOE" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] } ], "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://loinc.org", "code": "81959-9", "display": "Public health laboratory ask at order entry panel" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "ReportStream", "code": "AOE", "display": "Ask at order entry question" } } ], "system": "http://loinc.org", "version": "2.69", "code": "95419-8", "display": "Has symptoms related to condition of interest" } ], "text": "Has symptoms related to condition of interest" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70136" } ], "system": "http://terminology.hl7.org/ValueSet/v2-0136", "code": "Y", "display": "Yes" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } } }, { "fullUrl": "Observation/91dbef95-254a-3398-a8ee-c5eba59121b1", "resource": { "resourceType": "Observation", "id": "91dbef95-254a-3398-a8ee-c5eba59121b1", "meta": { "tag": [ { "code": "AOE" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "DT" }, { "url": "OBX.11", "valueString": "F" } ] } ], "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://loinc.org", "code": "81959-9", "display": "Public health laboratory ask at order entry panel" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "ReportStream", "code": "AOE", "display": "Ask at order entry question" } } ], "system": "http://loinc.org", "code": "11368-8", "display": "Illness or injury onset date and time" } ], "text": "Illness or injury onset date and time" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueDateTime": "2024-02-13", "_valueDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-13" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } } }, { "fullUrl": "Observation/57f557ee-1009-397e-bae5-15d2cd3484fe", "resource": { "resourceType": "Observation", "id": "57f557ee-1009-397e-bae5-15d2cd3484fe", "meta": { "tag": [ { "code": "AOE" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] } ], "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://loinc.org", "code": "81959-9", "display": "Public health laboratory ask at order entry panel" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "ReportStream", "code": "AOE", "display": "Ask at order entry question" } } ], "system": "http://loinc.org", "version": "2.68", "code": "82810-3", "display": "Pregnancy status" } ], "text": "Pregnancy status" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "SCT" } ], "system": "http://snomed.info/sct", "code": "60001007", "display": "Not pregnant" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } } }, { "fullUrl": "Observation/f186e153-e06a-32f1-b5f5-38be1fa13345", "resource": { "resourceType": "Observation", "id": "f186e153-e06a-32f1-b5f5-38be1fa13345", "meta": { "tag": [ { "code": "AOE" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] } ], "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://loinc.org", "code": "81959-9", "display": "Public health laboratory ask at order entry panel" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "ReportStream", "code": "AOE", "display": "Ask at order entry question" } } ], "system": "http://loinc.org", "version": "2.69", "code": "95418-0", "display": "Employed in a healthcare setting" } ], "text": "Employed in a healthcare setting" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70136" } ], "system": "http://terminology.hl7.org/ValueSet/v2-0136", "code": "N", "display": "No" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } } }, { "fullUrl": "Observation/623a1a02-6925-3595-affd-271175822707", "resource": { "resourceType": "Observation", "id": "623a1a02-6925-3595-affd-271175822707", "meta": { "tag": [ { "code": "AOE" } ] }, "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", "extension": [ { "url": "OBX.2", "valueString": "CWE" }, { "url": "OBX.11", "valueString": "F" } ] } ], "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://loinc.org", "code": "81959-9", "display": "Public health laboratory ask at order entry panel" } ] } } ], "status": "final", "code": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "LN" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code", "valueCoding": { "system": "ReportStream", "code": "AOE", "display": "Ask at order entry question" } } ], "system": "http://loinc.org", "version": "2.69", "code": "95421-4", "display": "Resides in a congregate care setting" } ], "text": "Resides in a congregate care setting" }, "subject": { "reference": "Patient/3551359f-bd1c-411e-b930-789ac694e75f" }, "effectiveDateTime": "2024-02-14T20:51:46+00:00", "_effectiveDateTime": { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", "valueDateTime": "2024-02-14T20:51:46+00:00" } ] }, "performer": [ { "reference": "Organization/719ec8ad-cf59-405a-9832-c4065945c130" } ], "valueCodeableConcept": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" }, { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", "valueString": "HL70136" } ], "system": "http://terminology.hl7.org/ValueSet/v2-0136", "code": "N", "display": "No" } ] }, "interpretation": [ { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } ], "method": { "coding": [ { "extension": [ { "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", "valueString": "coding" } ] } ] } } } ] } \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.hl7 b/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.hl7 deleted file mode 100644 index 4110ce8f2f1..00000000000 --- a/prime-router/src/testIntegration/resources/datatests/FHIR_to_HL7/sample_NJ_20240719-0001.hl7 +++ /dev/null @@ -1,14 +0,0 @@ -MSH|^~\&|CDC PRIME - Atlanta,^2.16.840.1.114222.4.1.237821^ISO|CDC PRIME^11D2030855^CLIA|ELRS^2.16.840.1.113883.3.1299.5.1.6.1^ISO|NJDOH^2.16.840.1.113883.3.1299^ISO|20240214210646+0000||ORU^R01^ORU_R01|3ad338c6-125d-4141-9ce1-6040481304ab|P|2.5.1|||NE|NE|USA|UNICODE UTF-8|ENG^English^ISO||PHLabReport-NoAck^ELR_Receiver^2.16.840.1.113883.9.11^ISO -SFT|Centers for Disease Control and Prevention|0.2-SNAPSHOT|PRIME ReportStream|0.2-SNAPSHOT||20240214163856+0000 -PID|1||3551359f-bd1c-411e-b930-789ac694e75f^^^Testing Lab&12D4567890&CLIA^PI^Testing Lab&12D4567890&CLIA||Diggory^Cedrick^Charles^^^^L||20001218|M||2076-8^pacific^^^^^2.5.1^^pacific|123 Main St^^Anchorage^NJ^99501^USA^^^Anchorage||(340) 555 5555^PRS^CP^^1^340^5555555^^^^^(340) 555 5555|||||||||N^Not Hispanic or Latino^HL70189^^^^2.9^^Not Hispanic or Latino||||||||N -ORC|RE|3ad338c6-125d-4141-9ce1-6040481304ab^Testing Lab^12D4567890^CLIA|3ad338c6-125d-4141-9ce1-6040481304ab^Testing Lab^12D4567890^CLIA|||||||||1245319599^McTester^Phil^^^^^^NPI&2.16.840.1.113883.4.6&ISO^L^^^NPI||(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|20240214210646+0000||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|321 Ocean Drive^^Houston^NJ^77001^USA -OBR|1|3ad338c6-125d-4141-9ce1-6040481304ab^Testing Lab^12D4567890^CLIA|3ad338c6-125d-4141-9ce1-6040481304ab^Testing Lab^12D4567890^CLIA|95941-1^Influenza virus A and B and SARS-CoV-2 (COVID-19) and Respiratory syncytial virus RNA panel - Respiratory system specimen by NAA with probe detection^LN|||20240214205146+0000|||||||||1245319599^McTester^Phil^^^^^^NPI&2.16.840.1.113883.4.6&ISO^L^^^NPI|(530) 867 5309^WPN^PH^^1^530^8675309^^^^^(530) 867 5309|||||20240214210646+0000|||F -OBX|1|CWE|85479-4^Respiratory syncytial virus RNA [Presence] in Upper respiratory specimen by NAA with probe detection^LN^^^^^^RSV||260373001^Detected^SCT|||A^Abnormal^HL70078^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||Alinity m Resp-4-Ple^Alinity m^^^^^^^Alinity m Resp-4-Plex_Abbott Molecular Inc.||20240214210646+0000||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA -OBX|2|CWE|94500-6^SARS-CoV-2 (COVID-19) RNA [Presence] in Respiratory system specimen by NAA with probe detection^LN^^^^^^COVID-19||260373001^Detected^SCT|||A^Abnormal^HL70078^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||^Alinity m||20240214210646+0000||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA -OBX|3|CWE|85478-6^Influenza virus B RNA [Presence] in Upper respiratory specimen by NAA with probe detection^LN^^^^^^Flu B||260373001^Detected^SCT|||A^Abnormal^HL70078^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||Alinity m Resp-4-Ple^Alinity m^^^^^^^Alinity m Resp-4-Plex_Abbott Molecular Inc.||20240214210646+0000||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA -OBX|4|CWE|95419-8^Has symptoms related to condition of interest^LN^^^^2.69^^Has symptoms related to condition of interest||Y^Yes^HL70136|||^^^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|||||QST -OBX|5|DT|11368-8^Illness or injury onset date and time^LN^^^^^^Illness or injury onset date and time||20240213000000+0000|||^^^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|||||QST -OBX|6|CWE|82810-3^Pregnancy status^LN^^^^2.68^^Pregnancy status||60001007^Not pregnant^SCT|||^^^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|||||QST -OBX|7|CWE|95418-0^Employed in a healthcare setting^LN^^^^2.69^^Employed in a healthcare setting||N^No^HL70136|||^^^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|||||QST -OBX|8|CWE|95421-4^Resides in a congregate care setting^LN^^^^2.69^^Resides in a congregate care setting||N^No^HL70136|||^^^^^^2.7|||F|||20240214205146+0000|12D4567890^Testing Lab^CLIA||||||||Testing Lab^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^12D4567890|123 Beach Way^^Houston^NJ^77001^USA|||||QST -SPM|1|3ad338c6-125d-4141-9ce1-6040481304ab&Testing Lab&12D4567890&CLIA^3ad338c6-125d-4141-9ce1-6040481304ab&Testing Lab&12D4567890&CLIA||258500001^Nasopharyngeal swab^SCT^^^^2.67^^Nasopharyngeal swab||||87100004^Topography unknown (body structure)^SCT^^^^^^Topography unknown (body structure)|||||||||20240214205146+0000|20240214205146+0000 diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.fhir new file mode 100644 index 00000000000..eb3f5decdbd --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.fhir @@ -0,0 +1,259 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403029141816000.d1ff92b0-51ab-4c76-84d1-de6aee6b66c4", + "meta" : { + "lastUpdated" : "2024-04-17T19:17:09.151-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403029242616000.10c1427f-969a-4ef8-88f0-cdacb885f392" + } + } + }, { + "fullUrl" : "Organization/1713403029242616000.10c1427f-969a-4ef8-88f0-cdacb885f392", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403029242616000.10c1427f-969a-4ef8-88f0-cdacb885f392", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403029775863000.7cb12d62-b747-49d8-a949-bdeac15f7a00", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403029775863000.7cb12d62-b747-49d8-a949-bdeac15f7a00", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + }, { + "reference" : "DiagnosticReport/1713403030132492000.260ba99f-27ad-4e5a-a581-a84fb9a75e5c" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403029790190000.3d26679e-e908-4f04-b7b0-81bb315e714e", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403029790190000.3d26679e-e908-4f04-b7b0-81bb315e714e", + "recorded" : "2024-04-17T19:17:09Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403029788752000.9f7db772-7ff5-499d-b45b-d51faafe5bbc" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403029788752000.9f7db772-7ff5-499d-b45b-d51faafe5bbc", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403029788752000.9f7db772-7ff5-499d-b45b-d51faafe5bbc", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403029815669000.fbda1219-5e0b-4c16-b9a7-45b40e30b4ac", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403029815669000.fbda1219-5e0b-4c16-b9a7-45b40e30b4ac" + } + }, { + "fullUrl" : "Provenance/1713403029816912000.d951d3ea-7ec1-48e3-b360-841b21872c90", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403029816912000.d951d3ea-7ec1-48e3-b360-841b21872c90", + "target" : [ { + "reference" : "Patient/1713403029815669000.fbda1219-5e0b-4c16-b9a7-45b40e30b4ac" + } ], + "recorded" : "2024-04-17T19:17:09Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "Specimen/1713403029819193000.539e1518-2f7a-4bfc-8ac1-a2435b39a705", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403029819193000.539e1518-2f7a-4bfc-8ac1-a2435b39a705", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "Specimen/1713403030109000000.b832f4a5-5538-4472-a97d-15354b755333", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403030109000000.b832f4a5-5538-4472-a97d-15354b755333", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "SPM" + } ], + "collection" : { + "quantity" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cq-units", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:TEST1234" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "PrimaryVersion", + "code" : "PrimaryCode", + "display" : "Primary Code Display" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "SecondaryAltVersion", + "code" : "SecondaryAltCode", + "display" : "SecondaryAltText" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "AltVersion", + "code" : "AltCode", + "display" : "AltText" + } ], + "text" : "OriginalText" + } + } ], + "value" : 1, + "unit" : "OriginalText" + } + } + } + }, { + "fullUrl" : "ServiceRequest/1713403030125371000.27df5449-e8c3-4686-8f21-4cec242d3fb6", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713403030125371000.27df5449-e8c3-4686-8f21-4cec242d3fb6", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.25", + "valueId" : "F" + } ] + } ], + "status" : "unknown", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "TEST" + } ] + }, + "subject" : { + "reference" : "Patient/1713403029815669000.fbda1219-5e0b-4c16-b9a7-45b40e30b4ac" + } + } + }, { + "fullUrl" : "DiagnosticReport/1713403030132492000.260ba99f-27ad-4e5a-a581-a84fb9a75e5c", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713403030132492000.260ba99f-27ad-4e5a-a581-a84fb9a75e5c", + "basedOn" : [ { + "reference" : "ServiceRequest/1713403030125371000.27df5449-e8c3-4686-8f21-4cec242d3fb6" + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "TEST" + } ] + }, + "subject" : { + "reference" : "Patient/1713403029815669000.fbda1219-5e0b-4c16-b9a7-45b40e30b4ac" + }, + "specimen" : [ { + "reference" : "Specimen/1713403030109000000.b832f4a5-5538-4472-a97d-15354b755333" + }, { + "reference" : "Specimen/1713403029819193000.539e1518-2f7a-4bfc-8ac1-a2435b39a705" + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.hl7 new file mode 100644 index 00000000000..77ebe056c3b --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cq/cq-to-quantity.hl7 @@ -0,0 +1,4 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1 +OBR|1|||TEST|||||||||||||||||||||F +SPM|1|||||||||||1^PrimaryCode&Primary Code Display&LN&AltCode&AltText&L&PrimaryVersion&AltVersion&OriginalText&SecondaryAltCode&SecondaryAltText&L&SecondaryAltVersion&TEST1234 \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/CWE-to-CodeableConcept.csv b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/CWE-to-CodeableConcept.csv new file mode 100644 index 00000000000..851665d6c57 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/CWE-to-CodeableConcept.csv @@ -0,0 +1,25 @@ +HL7 v2,,,,,,Condition (IF True),,,HL7 FHIR,,,,,,,,,Comments +Sort Order,Identifier,Name,Data Type,Cardinality - Min,Cardinality - Max,Computable ANTLR,Computable FHIRPath,Narrative,FHIR Attribute/ Data Type,,Data Type,Cardinality - Min,Cardinality - Max,Data Type Mapping,"Vocabulary Mapping +(IS, ID, CE, CNE, CWE)",Assignment,, +1,CWE.1,Identifier,ST,0,1,,,"If mapped to FHIR, use Code System and Display",coding[1].code,,code,0,1,,,,, +2,CWE.2,Text,ST,0,1,,,,coding[1].display,,string,0,1,,,,, +3,CWE.3,Name of Coding System,ID,0,1,,,,coding[1].system,,uri,0,1,,,,,This is only an indirect mapping in that the vocabulary table will give the actual uri. +4,CWE.4,Alternate Identifier,ST,0,1,,,,coding[2].code,,code,0,1,,,,, +5,CWE.5,Alternate Text,ST,0,1,,,,coding[2].display,,string,0,1,,,,, +6,CWE.6,Name of Alternate Coding System,ID,0,1,,,,coding[2].system,,uri,0,1,,,,,This is only an indirect mapping in that the vocabulary table will give the actual uri +7,CWE.7,Coding System Version ID,ST,0,1,,,,coding[1].version,,string,0,1,,,,, +8,CWE.8,Alternate Coding System Version ID,ST,0,1,,,,coding[2].version,,string,0,1,,,,, +9,CWE.9,Original Text,ST,0,1,,,,text,,string,0,1,,,,, +10,CWE.10,Second Alternate Identifier,ST,0,1,,,,coding[3].code,,code,0,1,,,,, +11,CWE.11,Second Alternate Text,ST,0,1,,,,coding[3].display,,string,0,1,,,,, +12,CWE.12,Name of Second Alternate Coding System,ID,0,1,,,,coding[3].system,,uri,0,1,,,,, +13,CWE.13,Second Alternate Coding System Version ID,ST,0,1,,,,coding[3].version,,string,0,1,,,,,This is only an indirect mapping in that the vocabulary table will give the actual uri. +14,CWE.14,Coding System OID,ST,0,1,,,,,,,,,,,,, +15,CWE.15,Value Set OID,ST,0,1,,,,,,,,,,,,, +16,CWE.16,Value Set Version ID,DTM,0,1,,,,,,,,,,,,, +17,CWE.17,Alternate Coding System OID,ST,0,1,,,,,,,,,,,,, +18,CWE.18,Alternate Value Set OID,ST,0,1,,,,,,,,,,,,, +19,CWE.19,Alternate Value Set Version ID,DTM,0,1,,,,,,,,,,,,, +20,CWE.20,Second Alternate Coding System OID,ST,0,1,,,,,,,,,,,,, +21,CWE.21,Second Alternate Value Set OID,ST,0,1,,,,,,,,,,,,, +22,CWE.22,Second Alternate Value Set Version ID,DTM,0,1,,,,,,,,,,,,, \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir new file mode 100644 index 00000000000..15292f52dd4 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403200456908000.a3e6fb64-ecd0-45cd-bbaa-0542fe3e3d4f", + "meta" : { + "lastUpdated" : "2024-04-17T19:20:00.466-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403200559851000.8d9c7bf0-5a61-40fb-8c02-e9b5377157fb" + } + } + }, { + "fullUrl" : "Organization/1713403200559851000.8d9c7bf0-5a61-40fb-8c02-e9b5377157fb", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403200559851000.8d9c7bf0-5a61-40fb-8c02-e9b5377157fb", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403201074832000.5df2c9b6-efc7-4e25-93aa-05b827b639b8", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403201074832000.5df2c9b6-efc7-4e25-93aa-05b827b639b8", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403201087347000.d5d5300a-5a81-413a-9dfe-2a3357800a45", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403201087347000.d5d5300a-5a81-413a-9dfe-2a3357800a45", + "recorded" : "2024-04-17T19:20:01Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403201086319000.b914c2fb-1d32-4a73-8f31-02159bfb22cb" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403201086319000.b914c2fb-1d32-4a73-8f31-02159bfb22cb", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403201086319000.b914c2fb-1d32-4a73-8f31-02159bfb22cb", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403201112944000.aa776c63-0d50-4202-9ccf-961a873229e6", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403201112944000.aa776c63-0d50-4202-9ccf-961a873229e6", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "version" : "AltVersion" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403201114667000.02154068-dc9b-48ac-af0a-105a107febd5", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403201114667000.02154068-dc9b-48ac-af0a-105a107febd5", + "target" : [ { + "reference" : "Patient/1713403201112944000.aa776c63-0d50-4202-9ccf-961a873229e6" + } ], + "recorded" : "2024-04-17T19:20:01Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 new file mode 100644 index 00000000000..ed304d5183d --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^AltVersion \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir new file mode 100644 index 00000000000..4589805e1c8 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir @@ -0,0 +1,137 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403220122904000.f8bd4094-3752-4a19-aeee-f19b3472c4ba", + "meta" : { + "lastUpdated" : "2024-04-17T19:20:20.133-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403220231429000.933b17a3-378f-4d34-89c9-47865edd1c37" + } + } + }, { + "fullUrl" : "Organization/1713403220231429000.933b17a3-378f-4d34-89c9-47865edd1c37", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403220231429000.933b17a3-378f-4d34-89c9-47865edd1c37", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403220766953000.e8cadaec-d3df-45b4-8ccd-3aafd77cb739", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403220766953000.e8cadaec-d3df-45b4-8ccd-3aafd77cb739", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403220779417000.66b6b06d-0f77-47f7-baef-8fa57da1dc06", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403220779417000.66b6b06d-0f77-47f7-baef-8fa57da1dc06", + "recorded" : "2024-04-17T19:20:20Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403220778417000.6f9261db-c196-4d12-b7d5-8936aec5932f" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403220778417000.6f9261db-c196-4d12-b7d5-8936aec5932f", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403220778417000.6f9261db-c196-4d12-b7d5-8936aec5932f", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403220801742000.0a696b9d-41c0-4ab6-821a-d6524f9c697a", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403220801742000.0a696b9d-41c0-4ab6-821a-d6524f9c697a", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "text" : "OriginalText" + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403220802992000.d4f67c35-19cb-452a-9c40-9d43ec969499", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403220802992000.d4f67c35-19cb-452a-9c40-9d43ec969499", + "target" : [ { + "reference" : "Patient/1713403220801742000.0a696b9d-41c0-4ab6-821a-d6524f9c697a" + } ], + "recorded" : "2024-04-17T19:20:20Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 new file mode 100644 index 00000000000..38c215f4fa3 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^OriginalText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.fhir new file mode 100644 index 00000000000..3feeb9d12a7 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403238639454000.785747c6-2555-421d-a676-e0f8cce8ba95", + "meta" : { + "lastUpdated" : "2024-04-17T19:20:38.649-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403238744562000.a7a8c8d6-2fd5-484d-9a85-b290817235f7" + } + } + }, { + "fullUrl" : "Organization/1713403238744562000.a7a8c8d6-2fd5-484d-9a85-b290817235f7", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403238744562000.a7a8c8d6-2fd5-484d-9a85-b290817235f7", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403239274942000.35993555-b3f1-4f19-867a-2d7e4670e81e", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403239274942000.35993555-b3f1-4f19-867a-2d7e4670e81e", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403239286222000.50ec95aa-c3b8-47de-9ad5-f6f1a60ac070", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403239286222000.50ec95aa-c3b8-47de-9ad5-f6f1a60ac070", + "recorded" : "2024-04-17T19:20:39Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403239285198000.ee23f116-7270-4103-aa59-299b6504c314" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403239285198000.ee23f116-7270-4103-aa59-299b6504c314", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403239285198000.ee23f116-7270-4103-aa59-299b6504c314", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403239308132000.85a8f511-f905-4ace-ac0b-95d9641b5b34", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403239308132000.85a8f511-f905-4ace-ac0b-95d9641b5b34", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + } ], + "code" : "SecondaryAltCode" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403239309723000.0861eb88-cbc4-49a7-a737-ae7331354d86", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403239309723000.0861eb88-cbc4-49a7-a737-ae7331354d86", + "target" : [ { + "reference" : "Patient/1713403239308132000.85a8f511-f905-4ace-ac0b-95d9641b5b34" + } ], + "recorded" : "2024-04-17T19:20:39Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.hl7 new file mode 100644 index 00000000000..4341d2830be --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-12-test-value-cwe10.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^^SecondaryAltCode \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.fhir new file mode 100644 index 00000000000..95f11db186a --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403256912019000.b65b8407-cf06-483a-97eb-219c7bf218f5", + "meta" : { + "lastUpdated" : "2024-04-17T19:20:56.921-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403257012157000.4e32c868-ee2f-457d-aeb9-688e8ff28487" + } + } + }, { + "fullUrl" : "Organization/1713403257012157000.4e32c868-ee2f-457d-aeb9-688e8ff28487", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403257012157000.4e32c868-ee2f-457d-aeb9-688e8ff28487", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403257532857000.face4ba9-0511-494a-b97a-fd317b4c569e", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403257532857000.face4ba9-0511-494a-b97a-fd317b4c569e", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403257545395000.7fcceea3-cab0-4f49-a614-fb9920b67eab", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403257545395000.7fcceea3-cab0-4f49-a614-fb9920b67eab", + "recorded" : "2024-04-17T19:20:57Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403257544001000.682a351e-afba-46c2-8fe3-2c5a062e89c3" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403257544001000.682a351e-afba-46c2-8fe3-2c5a062e89c3", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403257544001000.682a351e-afba-46c2-8fe3-2c5a062e89c3", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403257571576000.965a6601-af4e-457c-b059-599cc5d55ca8", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403257571576000.965a6601-af4e-457c-b059-599cc5d55ca8", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + } ], + "display" : "SecondaryAltText" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403257574021000.ac0f531d-82b5-497f-bda9-2ca03b85aa27", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403257574021000.ac0f531d-82b5-497f-bda9-2ca03b85aa27", + "target" : [ { + "reference" : "Patient/1713403257571576000.965a6601-af4e-457c-b059-599cc5d55ca8" + } ], + "recorded" : "2024-04-17T19:20:57Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.hl7 new file mode 100644 index 00000000000..56a3ba9a867 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-13-test-value-cwe11.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^^^SecondaryAltText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.fhir new file mode 100644 index 00000000000..86e2249bf64 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.fhir @@ -0,0 +1,146 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403276221244000.d8d624f5-14a9-48cf-bd9a-d1448ec86845", + "meta" : { + "lastUpdated" : "2024-04-17T19:21:16.233-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403276330045000.5d9a2693-893f-4d38-a021-475a40e390e6" + } + } + }, { + "fullUrl" : "Organization/1713403276330045000.5d9a2693-893f-4d38-a021-475a40e390e6", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403276330045000.5d9a2693-893f-4d38-a021-475a40e390e6", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403276909467000.399a11a2-3e1d-41c3-aadf-5e1d966b1586", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403276909467000.399a11a2-3e1d-41c3-aadf-5e1d966b1586", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403276925023000.704d041c-fcc1-4a19-b121-5d3beb4f5cd2", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403276925023000.704d041c-fcc1-4a19-b121-5d3beb4f5cd2", + "recorded" : "2024-04-17T19:21:16Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403276923527000.63739625-b689-4b22-9dc7-7628e23260ed" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403276923527000.63739625-b689-4b22-9dc7-7628e23260ed", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403276923527000.63739625-b689-4b22-9dc7-7628e23260ed", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403276952611000.f5505959-d8c4-4055-8a39-520d735054b0", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403276952611000.f5505959-d8c4-4055-8a39-520d735054b0", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403276954675000.9ae80c04-b945-464d-9616-1fe82deac0f7", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403276954675000.9ae80c04-b945-464d-9616-1fe82deac0f7", + "target" : [ { + "reference" : "Patient/1713403276952611000.f5505959-d8c4-4055-8a39-520d735054b0" + } ], + "recorded" : "2024-04-17T19:21:16Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.hl7 new file mode 100644 index 00000000000..4ae37cef8d7 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-14-test-value-cwe12.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^^^^L \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.fhir new file mode 100644 index 00000000000..e30b37765bb --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403297713864000.d073d008-db83-44bd-83df-cbb14a938aa0", + "meta" : { + "lastUpdated" : "2024-04-17T19:21:37.724-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403297826697000.cbf7948b-cb60-40d4-a78b-ddcc18399042" + } + } + }, { + "fullUrl" : "Organization/1713403297826697000.cbf7948b-cb60-40d4-a78b-ddcc18399042", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403297826697000.cbf7948b-cb60-40d4-a78b-ddcc18399042", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403298421036000.afee0d57-0e74-4ecb-bae8-e2f2943e0d08", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403298421036000.afee0d57-0e74-4ecb-bae8-e2f2943e0d08", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403298444735000.9ed2d77d-a8ea-43d9-9692-1a990713b745", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403298444735000.9ed2d77d-a8ea-43d9-9692-1a990713b745", + "recorded" : "2024-04-17T19:21:38Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403298443182000.2fd8fbd5-f7b2-4dde-940f-c8e5de070758" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403298443182000.2fd8fbd5-f7b2-4dde-940f-c8e5de070758", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403298443182000.2fd8fbd5-f7b2-4dde-940f-c8e5de070758", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403298471313000.5f5b87d6-2822-4967-8209-d6ea09137215", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403298471313000.5f5b87d6-2822-4967-8209-d6ea09137215", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + } ], + "version" : "SecondaryAltVersion" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403298472875000.27c55c78-0385-4eeb-9f70-367c39446b4f", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403298472875000.27c55c78-0385-4eeb-9f70-367c39446b4f", + "target" : [ { + "reference" : "Patient/1713403298471313000.5f5b87d6-2822-4967-8209-d6ea09137215" + } ], + "recorded" : "2024-04-17T19:21:38Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.hl7 new file mode 100644 index 00000000000..39772a4adcb --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-15-test-value-cwe13.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^^^^^SecondaryAltVersion \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.fhir new file mode 100644 index 00000000000..fb877731490 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.fhir @@ -0,0 +1,140 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403318694290000.f2538ca4-7cf1-41d0-a0e0-3421116cc109", + "meta" : { + "lastUpdated" : "2024-04-17T19:21:58.705-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403318801955000.4678319a-d306-4ce7-9376-a2608366c01a" + } + } + }, { + "fullUrl" : "Organization/1713403318801955000.4678319a-d306-4ce7-9376-a2608366c01a", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403318801955000.4678319a-d306-4ce7-9376-a2608366c01a", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403319378244000.599dd6ae-9552-465a-8ffe-ebcf38cbd6cf", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403319378244000.599dd6ae-9552-465a-8ffe-ebcf38cbd6cf", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403319391303000.2068fab6-cb87-43db-8a54-235b378d0bfe", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403319391303000.2068fab6-cb87-43db-8a54-235b378d0bfe", + "recorded" : "2024-04-17T19:21:59Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403319390076000.bf51d399-c244-4dca-984c-81bf10311c0d" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403319390076000.bf51d399-c244-4dca-984c-81bf10311c0d", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403319390076000.bf51d399-c244-4dca-984c-81bf10311c0d", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403319416958000.7b82fc9c-a8b4-42ef-8b1e-d027eb067853", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403319416958000.7b82fc9c-a8b4-42ef-8b1e-d027eb067853", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:TEST1234" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403319418460000.85dbbede-9f30-48ef-b228-9fe89ebfb4b0", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403319418460000.85dbbede-9f30-48ef-b228-9fe89ebfb4b0", + "target" : [ { + "reference" : "Patient/1713403319416958000.7b82fc9c-a8b4-42ef-8b1e-d027eb067853" + } ], + "recorded" : "2024-04-17T19:21:59Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.hl7 new file mode 100644 index 00000000000..655d4dcbffb --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-16-test-value-cwe14.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^^^^^^^^TEST1234 \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir new file mode 100644 index 00000000000..58907013516 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403339112570000.edd6d69d-919c-4670-a758-58676f3edbaf", + "meta" : { + "lastUpdated" : "2024-04-17T19:22:19.123-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403339222547000.ce8c98d1-5732-4ddf-9fdd-f6849384e1a1" + } + } + }, { + "fullUrl" : "Organization/1713403339222547000.ce8c98d1-5732-4ddf-9fdd-f6849384e1a1", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403339222547000.ce8c98d1-5732-4ddf-9fdd-f6849384e1a1", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403339804199000.85d17102-1b50-4689-bad9-adcbbf545578", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403339804199000.85d17102-1b50-4689-bad9-adcbbf545578", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403339818818000.aa3d6196-9d12-4adf-8ee9-71134e43be14", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403339818818000.aa3d6196-9d12-4adf-8ee9-71134e43be14", + "recorded" : "2024-04-17T19:22:19Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403339817619000.32932d4b-4caa-44ec-9b7e-6e38f5e5b551" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403339817619000.32932d4b-4caa-44ec-9b7e-6e38f5e5b551", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403339817619000.32932d4b-4caa-44ec-9b7e-6e38f5e5b551", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403339844399000.2f9222d0-48e6-4674-b7c6-9106b2f65f5e", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403339844399000.2f9222d0-48e6-4674-b7c6-9106b2f65f5e", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "PrimaryCode" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403339846196000.abfc2480-a0fb-46ed-a7c4-e6dd98ff4aa2", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403339846196000.abfc2480-a0fb-46ed-a7c4-e6dd98ff4aa2", + "target" : [ { + "reference" : "Patient/1713403339844399000.2f9222d0-48e6-4674-b7c6-9106b2f65f5e" + } ], + "recorded" : "2024-04-17T19:22:19Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 new file mode 100644 index 00000000000..ad77148beb8 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||PrimaryCode \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir new file mode 100644 index 00000000000..148f7a07a3b --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403359728506000.43ea1e28-d96b-424a-ba86-06aee397ab29", + "meta" : { + "lastUpdated" : "2024-04-17T19:22:39.739-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403359840864000.749d4472-f21c-4867-a087-d84b14622371" + } + } + }, { + "fullUrl" : "Organization/1713403359840864000.749d4472-f21c-4867-a087-d84b14622371", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403359840864000.749d4472-f21c-4867-a087-d84b14622371", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403360427575000.3087116f-b901-4c70-89cd-f113371358ce", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403360427575000.3087116f-b901-4c70-89cd-f113371358ce", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403360441247000.3d29620d-2ac7-4458-a070-07e5089dd6ad", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403360441247000.3d29620d-2ac7-4458-a070-07e5089dd6ad", + "recorded" : "2024-04-17T19:22:40Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403360439904000.f39f56d7-a811-4e95-884d-d3a279ab3934" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403360439904000.f39f56d7-a811-4e95-884d-d3a279ab3934", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403360439904000.f39f56d7-a811-4e95-884d-d3a279ab3934", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403360467504000.54c5745d-9561-439f-b3ba-5a75a0c81d36", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403360467504000.54c5745d-9561-439f-b3ba-5a75a0c81d36", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "display" : "PrimaryText" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403360469191000.bdb981b5-43d8-45af-8bd1-b34be2715aad", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403360469191000.bdb981b5-43d8-45af-8bd1-b34be2715aad", + "target" : [ { + "reference" : "Patient/1713403360467504000.54c5745d-9561-439f-b3ba-5a75a0c81d36" + } ], + "recorded" : "2024-04-17T19:22:40Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 new file mode 100644 index 00000000000..85a78b797f3 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^PrimaryText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir new file mode 100644 index 00000000000..60b7be17a15 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir @@ -0,0 +1,146 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403380679523000.db2e06dd-216a-48a2-a1ca-ae8f0fdf8736", + "meta" : { + "lastUpdated" : "2024-04-17T19:23:00.689-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403380785870000.e0894b9d-480e-4a75-b354-de3521dcca69" + } + } + }, { + "fullUrl" : "Organization/1713403380785870000.e0894b9d-480e-4a75-b354-de3521dcca69", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403380785870000.e0894b9d-480e-4a75-b354-de3521dcca69", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403381370445000.f9db9ebf-1549-4433-a230-6e08655bcc6b", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403381370445000.f9db9ebf-1549-4433-a230-6e08655bcc6b", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403381383417000.9e3e72a5-37f1-4784-89e7-aae93bc44af0", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403381383417000.9e3e72a5-37f1-4784-89e7-aae93bc44af0", + "recorded" : "2024-04-17T19:23:01Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403381382077000.50ca072c-7c3b-441a-b303-2cef61acf076" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403381382077000.50ca072c-7c3b-441a-b303-2cef61acf076", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403381382077000.50ca072c-7c3b-441a-b303-2cef61acf076", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403381407837000.bec3d625-32fd-4a2f-b45d-05df13df8981", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403381407837000.bec3d625-32fd-4a2f-b45d-05df13df8981", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403381409401000.edb3ccb6-a09b-4549-9b65-cfba32757a84", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403381409401000.edb3ccb6-a09b-4549-9b65-cfba32757a84", + "target" : [ { + "reference" : "Patient/1713403381407837000.bec3d625-32fd-4a2f-b45d-05df13df8981" + } ], + "recorded" : "2024-04-17T19:23:01Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 new file mode 100644 index 00000000000..80e3d774df2 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^LN \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir new file mode 100644 index 00000000000..62335ea84bd --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403401349528000.cde165bf-abb6-4d40-a95c-bd1ab331b14e", + "meta" : { + "lastUpdated" : "2024-04-17T19:23:21.360-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403401461244000.e80cffc2-8b81-4fd4-9da5-c35da7499842" + } + } + }, { + "fullUrl" : "Organization/1713403401461244000.e80cffc2-8b81-4fd4-9da5-c35da7499842", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403401461244000.e80cffc2-8b81-4fd4-9da5-c35da7499842", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403402041048000.ee072e3a-3a20-4ae6-8503-05412bebf042", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403402041048000.ee072e3a-3a20-4ae6-8503-05412bebf042", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403402055070000.d0fca609-cb01-48e4-96bc-9d39a769409e", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403402055070000.d0fca609-cb01-48e4-96bc-9d39a769409e", + "recorded" : "2024-04-17T19:23:22Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403402054017000.30aab337-4bc3-4daa-acc2-99c0504c7fd3" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403402054017000.30aab337-4bc3-4daa-acc2-99c0504c7fd3", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403402054017000.30aab337-4bc3-4daa-acc2-99c0504c7fd3", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403402080948000.b71f5da1-09a6-46e0-891a-15d944285408", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403402080948000.b71f5da1-09a6-46e0-891a-15d944285408", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "code" : "AltCode" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403402082318000.e34bd1b0-8605-4da0-911c-8c625cf6bce0", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403402082318000.e34bd1b0-8605-4da0-911c-8c625cf6bce0", + "target" : [ { + "reference" : "Patient/1713403402080948000.b71f5da1-09a6-46e0-891a-15d944285408" + } ], + "recorded" : "2024-04-17T19:23:22Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 new file mode 100644 index 00000000000..202d873be63 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^AltCode \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir new file mode 100644 index 00000000000..08c61954c97 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403423039330000.0f5107c6-7a2b-4fb7-b3d3-0bedc6fb61b6", + "meta" : { + "lastUpdated" : "2024-04-17T19:23:43.050-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403423150405000.00b478a8-fd47-4eb6-9e3f-92ab183d3613" + } + } + }, { + "fullUrl" : "Organization/1713403423150405000.00b478a8-fd47-4eb6-9e3f-92ab183d3613", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403423150405000.00b478a8-fd47-4eb6-9e3f-92ab183d3613", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403423760358000.d5a126a6-4e7f-4288-b2d0-d92db61052f3", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403423760358000.d5a126a6-4e7f-4288-b2d0-d92db61052f3", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403423777580000.4edc191a-af55-4042-a106-57d89345b4d1", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403423777580000.4edc191a-af55-4042-a106-57d89345b4d1", + "recorded" : "2024-04-17T19:23:43Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403423775819000.e3720102-2332-47c1-8ade-f454b501650a" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403423775819000.e3720102-2332-47c1-8ade-f454b501650a", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403423775819000.e3720102-2332-47c1-8ade-f454b501650a", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403423808443000.cc74a919-c42b-45fa-9a12-bedbf03b3f10", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403423808443000.cc74a919-c42b-45fa-9a12-bedbf03b3f10", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "display" : "AltText" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403423810606000.299e921a-6e86-422a-a679-0792f0f297ea", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403423810606000.299e921a-6e86-422a-a679-0792f0f297ea", + "target" : [ { + "reference" : "Patient/1713403423808443000.cc74a919-c42b-45fa-9a12-bedbf03b3f10" + } ], + "recorded" : "2024-04-17T19:23:43Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 new file mode 100644 index 00000000000..dcde04d370a --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^AltText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir new file mode 100644 index 00000000000..55b6592255d --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir @@ -0,0 +1,146 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403444709377000.15845bf8-a5db-427b-a53e-3b45a830d7cb", + "meta" : { + "lastUpdated" : "2024-04-17T19:24:04.719-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403444819081000.d7f4d552-1ac2-48ad-a953-e3352fc318d0" + } + } + }, { + "fullUrl" : "Organization/1713403444819081000.d7f4d552-1ac2-48ad-a953-e3352fc318d0", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403444819081000.d7f4d552-1ac2-48ad-a953-e3352fc318d0", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403445427495000.2514114f-8e8f-4d0f-aeee-a13449a2c209", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403445427495000.2514114f-8e8f-4d0f-aeee-a13449a2c209", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403445442019000.2f759e9e-f1d8-46e8-b3a3-599e85819a6a", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403445442019000.2f759e9e-f1d8-46e8-b3a3-599e85819a6a", + "recorded" : "2024-04-17T19:24:05Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403445440385000.0cc2d648-0fda-41eb-a530-fdcc9a36d3e7" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403445440385000.0cc2d648-0fda-41eb-a530-fdcc9a36d3e7", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403445440385000.0cc2d648-0fda-41eb-a530-fdcc9a36d3e7", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403445468998000.dd2c021a-a861-4253-b5ad-801ed89134fe", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403445468998000.dd2c021a-a861-4253-b5ad-801ed89134fe", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403445471153000.e959285d-ec02-4343-9ebe-1090a68193c6", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403445471153000.e959285d-ec02-4343-9ebe-1090a68193c6", + "target" : [ { + "reference" : "Patient/1713403445468998000.dd2c021a-a861-4253-b5ad-801ed89134fe" + } ], + "recorded" : "2024-04-17T19:24:05Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 new file mode 100644 index 00000000000..334cc0adab3 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^L \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir new file mode 100644 index 00000000000..b950f4145fb --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir @@ -0,0 +1,143 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403466089727000.c986b703-e397-4e6f-baf8-278376575309", + "meta" : { + "lastUpdated" : "2024-04-17T19:24:26.101-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713403466204066000.535f073a-a5f9-4b12-8ce9-87780b847d19" + } + } + }, { + "fullUrl" : "Organization/1713403466204066000.535f073a-a5f9-4b12-8ce9-87780b847d19", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403466204066000.535f073a-a5f9-4b12-8ce9-87780b847d19", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713403466809125000.83225b49-3606-4f9a-be2a-aefd9bd971ab", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403466809125000.83225b49-3606-4f9a-be2a-aefd9bd971ab", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403466823618000.ad1b7c2f-547d-4a4b-88d0-10da8f006664", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403466823618000.ad1b7c2f-547d-4a4b-88d0-10da8f006664", + "recorded" : "2024-04-17T19:24:26Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403466822104000.021a069a-18dc-4777-a4ff-2027e6ca443f" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403466822104000.021a069a-18dc-4777-a4ff-2027e6ca443f", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403466822104000.021a069a-18dc-4777-a4ff-2027e6ca443f", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403466850207000.9ba45630-fed9-412c-b5c3-cf216449f827", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403466850207000.9ba45630-fed9-412c-b5c3-cf216449f827", + "extension" : [ { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "version" : "PrimaryVersion" + } ] + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403466851693000.522a71a5-ffa7-444b-a13a-aebff8b146e6", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403466851693000.522a71a5-ffa7-444b-a13a-aebff8b146e6", + "target" : [ { + "reference" : "Patient/1713403466850207000.9ba45630-fed9-412c-b5c3-cf216449f827" + } ], + "recorded" : "2024-04-17T19:24:26Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 new file mode 100644 index 00000000000..5f3ffea2208 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1|||||||||^^^^^^PrimaryVersion \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.fhir new file mode 100644 index 00000000000..2b6f801d879 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.fhir @@ -0,0 +1,3206 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403050231945000.37598ff5-3c2e-4da0-8f9e-b72147aa17b9", + "meta" : { + "lastUpdated" : "2024-04-17T19:17:30.243-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "3015894743_04608717_11184" + }, + "type" : "message", + "timestamp" : "2023-08-02T16:08:02.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/8565cf64-832b-3438-bb11-99d9ac964bc1", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "8565cf64-832b-3438-bb11-99d9ac964bc1", + "meta" : { + "tag" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0103", + "code" : "T" + } ] + }, + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230802180802-0400" + }, { + "url" : "MSH.10", + "valueString" : "3015894743_04608717_11184" + }, { + "url" : "MSH.15", + "valueString" : "NE" + }, { + "url" : "MSH.16", + "valueString" : "NE" + }, { + "url" : "MSH.21", + "valueIdentifier" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "PHIN" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.9.11" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "value" : "PHLabReport-NoAck" + } + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "destination" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.10.1.1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "MSH.5" + } ], + "name" : "CDPH CA CALREDIE", + "endpoint" : "urn:oid:2.16.840.1.114222.4.3.3.10.1.1", + "receiver" : { + "reference" : "Organization/1713403050343101000.3dbdf426-2aae-472e-ad3a-f0f2641895f9" + } + } ], + "sender" : { + "reference" : "Organization/1713403050331033000.32003012-401a-42a0-a78b-2baea0650751" + }, + "source" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "MSH.3" + } ], + "software" : "STARLIMS", + "version" : "ELIMS V11", + "endpoint" : "urn:oid:2.16.840.1.114222.4.3.3.2.1.2" + } + } + }, { + "fullUrl" : "Organization/1713403050331033000.32003012-401a-42a0-a78b-2baea0650751", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050331033000.32003012-401a-42a0-a78b-2baea0650751", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "CDC Atlanta" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.2,HD.3" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301", + "code" : "CLIA" + } ] + }, + "value" : "11D0668319" + } ], + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Organization/1713403050343101000.3dbdf426-2aae-472e-ad3a-f0f2641895f9", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050343101000.3dbdf426-2aae-472e-ad3a-f0f2641895f9", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "MSH.6" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "CDPH_CID" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.2,HD.3" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301", + "code" : "ISO" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.2.14104" + } ] + } + }, { + "fullUrl" : "Provenance/1713403050863906000.1ffcec14-c987-4f63-b117-0a799879de4f", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403050863906000.1ffcec14-c987-4f63-b117-0a799879de4f", + "target" : [ { + "reference" : "MessageHeader/8565cf64-832b-3438-bb11-99d9ac964bc1" + }, { + "reference" : "DiagnosticReport/1713403051336018000.fd7f6056-c0f8-40c2-b300-271da14337dc" + }, { + "reference" : "DiagnosticReport/1713403051340875000.6f3e2afa-c3c0-4a44-9fec-ccd43571021d" + } ], + "recorded" : "2023-08-02T18:08:02-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "author" + } ] + }, + "who" : { + "reference" : "Organization/1713403050862373000.078a14c9-f572-42b5-a717-8bb5bb271c39" + } + } ], + "entity" : [ { + "role" : "source", + "what" : { + "reference" : "Device/1713403050870543000.d0f12caf-fc2c-4820-9d6d-35b7f5036190" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403050862373000.078a14c9-f572-42b5-a717-8bb5bb271c39", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050862373000.078a14c9-f572-42b5-a717-8bb5bb271c39", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "CDC Atlanta" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.2,HD.3" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301", + "code" : "CLIA" + } ] + }, + "value" : "11D0668319" + } ] + } + }, { + "fullUrl" : "Organization/1713403050869960000.0fcb853f-2d22-4349-89c8-398049128d87", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050869960000.0fcb853f-2d22-4349-89c8-398049128d87", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "CDC CLIA" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CDC" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "CDC CLIA" + } ], + "name" : "CDC" + } + }, { + "fullUrl" : "Device/1713403050870543000.d0f12caf-fc2c-4820-9d6d-35b7f5036190", + "resource" : { + "resourceType" : "Device", + "id" : "1713403050870543000.d0f12caf-fc2c-4820-9d6d-35b7f5036190", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/software-vendor-org", + "valueReference" : { + "reference" : "Organization/1713403050869960000.0fcb853f-2d22-4349-89c8-398049128d87" + } + } ], + "manufacturer" : "CDC", + "deviceName" : [ { + "name" : "STARLIMS", + "type" : "manufacturer-name" + } ], + "modelNumber" : "Binary ID unknown", + "version" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/software-install-date", + "valueDateTime" : "2023-08-02T18:08:02-04:00", + "_valueDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230802180802-0400" + } ] + } + } ], + "value" : "ELIMS V11" + } ], + "note" : [ { + "text" : "test" + } ] + } + }, { + "fullUrl" : "Provenance/1713403050882896000.41cd7cce-74c7-4c60-a5a4-e75f0fa0f7fe", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403050882896000.41cd7cce-74c7-4c60-a5a4-e75f0fa0f7fe", + "recorded" : "2024-04-17T19:17:30Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403050882208000.5d10a164-3502-4cbf-83fb-9ec0dd5c9a4b" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403050882208000.5d10a164-3502-4cbf-83fb-9ec0dd5c9a4b", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050882208000.5d10a164-3502-4cbf-83fb-9ec0dd5c9a4b", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/patient-notes", + "valueAnnotation" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "Accession level coment." + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "Accession level coment." + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/patient-notes", + "valueAnnotation" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "SPHL Submitter: CDPH, Viral and Rickettsial Disease Laboratory, Submitter ID: SPHL-000048, Address: 850 Marina Bay Parkway Rm. E-361 Richmond, California 94804 United States, Email: VRDL.Mail@cdph.ca.gov, Submitter Patient ID: PID123, Submitter Alt Patient ID: AltPID1234, Submitter Specimen ID: Specimen123, Submitter Alt Specimen ID: AltSP1234" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "SPHL Submitter: CDPH, Viral and Rickettsial Disease Laboratory, Submitter ID: SPHL-000048, Address: 850 Marina Bay Parkway Rm. E-361 Richmond, California 94804 United States, Email: VRDL.Mail@cdph.ca.gov, Submitter Patient ID: PID123, Submitter Alt Patient ID: AltPID1234, Submitter Specimen ID: Specimen123, Submitter Alt Specimen ID: AltSP1234" + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/pid-patient", + "extension" : [ { + "url" : "PID.8", + "valueString" : "F" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/studentStatus", + "valueString" : "F" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-disability", + "valueString" : "T" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/livingWill", + "valueString" : "F" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/pd1-patient-additional-demographic", + "extension" : [ { + "url" : "PD1.1", + "valueString" : "C" + }, { + "url" : "PD1.2", + "valueString" : "A" + }, { + "url" : "PD1.8", + "valueString" : "F" + }, { + "url" : "PD1.9", + "valueString" : "N" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier", + "extension" : [ { + "url" : "CX.5", + "valueString" : "PI" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.3" + } ], + "type" : { + "coding" : [ { + "code" : "PI" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "_system" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, + "value" : "test" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier", + "extension" : [ { + "url" : "CX.5", + "valueString" : "PI" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.3" + } ], + "type" : { + "coding" : [ { + "code" : "PI" + } ] + }, + "system" : "SPHL-000048", + "_system" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, + "value" : "PID123" + } ], + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "HL7" + }, { + "url" : "XPN.3", + "valueString" : "MI" + }, { + "url" : "XPN.7", + "valueString" : "L" + } ] + } ], + "use" : "official", + "family" : "Mega", + "given" : [ "HL7", "MI" ] + } ], + "gender" : "female", + "_birthDate" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "0000" + } ] + }, + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "H" + } ] + } ], + "use" : "home", + "country" : "USA" + } ], + "contact" : [ { + "extension" : [ { + "url" : "https://hl7.org/fhir/StructureDefinition/relationship", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70131" + } ], + "code" : "N", + "display" : "Next-of-Kin" + } ] + } + }, { + "url" : "https://hl7.org/fhir/StructureDefinition/relationship", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70131" + } ], + "code" : "N", + "display" : "Next-of-Kin" + } ] + } + } ], + "name" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "Leia" + } ] + } ], + "family" : "Organa", + "given" : [ "Leia" ] + } + } ], + "generalPractitioner" : [ { + "reference" : "Organization/1713403050895828000.a4ed17ae-0bda-46b0-8c64-2fff7bc74ff1" + }, { + "reference" : "Organization/1713403050898442000.21adeac7-d800-4cd9-b344-af1a98cf6bcc" + } ] + } + }, { + "fullUrl" : "Location/1713403050894716000.d2a03df1-45d8-40cf-8e84-00497cd987c8", + "resource" : { + "resourceType" : "Location", + "id" : "1713403050894716000.d2a03df1-45d8-40cf-8e84-00497cd987c8", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ], + "identifier" : [ { + "value" : "2.16.840.1.113883.9.11" + } ], + "name" : "Hospital A", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "si" + } ] + } + } + }, { + "fullUrl" : "Organization/1713403050895828000.a4ed17ae-0bda-46b0-8c64-2fff7bc74ff1", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050895828000.a4ed17ae-0bda-46b0-8c64-2fff7bc74ff1", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "X" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/name-representation-code", + "valueString" : "NameRepCode" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.3", + "valueString" : "123" + }, { + "url" : "XON.10", + "valueString" : "OrgIdentifier" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/identifier-checkDigit", + "valueString" : "Check Digit" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "Assigning Authority" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.1.4.1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/namingsystem-checkDigit", + "valueCode" : "C1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/identifier-location", + "valueReference" : { + "reference" : "Location/1713403050894716000.d2a03df1-45d8-40cf-8e84-00497cd987c8" + } + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "MD" + } ] + }, + "value" : "OrgIdentifier" + } ], + "name" : "Ordering Facility" + } + }, { + "fullUrl" : "Location/1713403050897351000.fbb0e514-9816-4355-8f9d-6a3e59f9b9e5", + "resource" : { + "resourceType" : "Location", + "id" : "1713403050897351000.fbb0e514-9816-4355-8f9d-6a3e59f9b9e5", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ], + "identifier" : [ { + "value" : "2.16.840.1.113883.9.11" + } ], + "name" : "Hospital A", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "si" + } ] + } + } + }, { + "fullUrl" : "Organization/1713403050898442000.21adeac7-d800-4cd9-b344-af1a98cf6bcc", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050898442000.21adeac7-d800-4cd9-b344-af1a98cf6bcc", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "X" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/name-representation-code", + "valueString" : "NameRepCode" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.3", + "valueString" : "123" + }, { + "url" : "XON.10", + "valueString" : "OrgIdentifier" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/identifier-checkDigit", + "valueString" : "Check Digit" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "Assigning Authority" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.1.4.1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/namingsystem-checkDigit", + "valueCode" : "C1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/identifier-location", + "valueReference" : { + "reference" : "Location/1713403050897351000.fbb0e514-9816-4355-8f9d-6a3e59f9b9e5" + } + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "MD" + } ] + }, + "value" : "OrgIdentifier" + } ], + "name" : "Ordering Facility" + } + }, { + "fullUrl" : "Provenance/1713403050924731000.deeb0618-78d4-4c66-b374-ec32bb2509b1", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403050924731000.deeb0618-78d4-4c66-b374-ec32bb2509b1", + "target" : [ { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + } ], + "recorded" : "2024-04-17T19:17:30Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "RelatedPerson/1713403050927052000.386f7345-bc28-44bf-9f8f-acccfd9f9060", + "resource" : { + "resourceType" : "RelatedPerson", + "id" : "1713403050927052000.386f7345-bc28-44bf-9f8f-acccfd9f9060", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "NK1" + } ], + "patient" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "relationship" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.3" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70131" + } ], + "code" : "N", + "display" : "Next-of-Kin" + } ] + } ], + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "Leia" + } ] + } ], + "family" : "Organa", + "given" : [ "Leia" ] + } ] + } + }, { + "fullUrl" : "RelatedPerson/1713403050929112000.442ffb28-e33e-46bd-ae07-a9ed338659b2", + "resource" : { + "resourceType" : "RelatedPerson", + "id" : "1713403050929112000.442ffb28-e33e-46bd-ae07-a9ed338659b2", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "NK1" + } ], + "patient" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "relationship" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.3" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70131" + } ], + "code" : "N", + "display" : "Next-of-Kin" + } ] + } ], + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "Liz" + } ] + } ], + "family" : "Navarro", + "given" : [ "Liz" ] + } ] + } + }, { + "fullUrl" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc", + "resource" : { + "resourceType" : "Encounter", + "id" : "1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc", + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "location" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PV1.6" + } ], + "location" : { + "reference" : "Location/1713403050935076000.9d241b09-eb74-4b9c-b9c1-b3edf87edd08" + }, + "status" : "completed" + } ] + } + }, { + "fullUrl" : "Organization/1713403050934505000.6c008ec6-42f1-4ca4-bd70-d29ea8db8023", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403050934505000.6c008ec6-42f1-4ca4-bd70-d29ea8db8023", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "EI.2" + } ], + "value" : "NAME" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "EI.3,EI.4" + } ], + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "ISO" + } ] + }, + "value" : "UNI" + } ] + } + }, { + "fullUrl" : "Location/1713403050935076000.9d241b09-eb74-4b9c-b9c1-b3edf87edd08", + "resource" : { + "resourceType" : "Location", + "id" : "1713403050935076000.9d241b09-eb74-4b9c-b9c1-b3edf87edd08", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "Hospital A" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.2,HD.3" + } ], + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "ISO" + } ] + }, + "value" : "2.4.4.4" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/ei-assigner-organization-type", + "valueString" : "default" + } ], + "value" : "Entity ID", + "assigner" : { + "reference" : "Organization/1713403050934505000.6c008ec6-42f1-4ca4-bd70-d29ea8db8023" + } + } ], + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "si" + } ] + } + } + }, { + "fullUrl" : "Observation/1713403051220745000.63ea27ea-0464-4655-af30-fb9bec820cd7", + "resource" : { + "resourceType" : "Observation", + "id" : "1713403051220745000.63ea27ea-0464-4655-af30-fb9bec820cd7", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", + "extension" : [ { + "url" : "OBX.2", + "valueId" : "CWE" + }, { + "url" : "OBX.11", + "valueString" : "F" + } ] + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "code" : "80383-3", + "display" : "Flu B" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "performer" : [ { + "reference" : "Organization/1713403051221822000.58493b41-e902-412c-a597-ae70d2ad2958" + }, { + "reference" : "Organization/1713403051224115000.9bd8da63-880c-4132-a775-7fddca3d01e1" + } ], + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "SCT" + } ], + "system" : "http://snomed.info/sct", + "code" : "260415000", + "display" : "Not detected" + } ] + }, + "interpretation" : [ { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70078" + } ], + "version" : "2.7", + "code" : "N", + "display" : "Normal" + } ] + } ] + } + }, { + "fullUrl" : "Organization/1713403051221822000.58493b41-e902-412c-a597-ae70d2ad2958", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051221822000.58493b41-e902-412c-a597-ae70d2ad2958", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "CLIA" + } ], + "code" : "11D1111111", + "display" : "CSV uploads" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.15" + } ], + "identifier" : [ { + "system" : "CLIA", + "value" : "11D1111111" + } ], + "name" : "CSV uploads" + } + }, { + "fullUrl" : "Organization/1713403051224115000.9bd8da63-880c-4132-a775-7fddca3d01e1", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051224115000.9bd8da63-880c-4132-a775-7fddca3d01e1", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "L" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "11D1111111" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.25" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CLIA" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.4.7" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "11D1111111" + } ], + "name" : "CSV uploads-11D1111111", + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "123 Main St" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + } ] + } ], + "line" : [ "123 Main St" ], + "state" : "CA", + "postalCode" : "94553", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Observation/1713403051229443000.1250993d-331f-4cd5-9245-785817d2b937", + "resource" : { + "resourceType" : "Observation", + "id" : "1713403051229443000.1250993d-331f-4cd5-9245-785817d2b937", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", + "extension" : [ { + "url" : "OBX.2", + "valueId" : "CWE" + }, { + "url" : "OBX.11", + "valueString" : "F" + }, { + "url" : "OBX.17", + "valueCodeableConcept" : { + "text" : "BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*" + } + } ] + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "code" : "80382-5", + "display" : "Flu A" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "performer" : [ { + "reference" : "Organization/1713403051230793000.6f20095e-6f2a-43a7-9979-d9c59d5cef26" + }, { + "reference" : "Organization/1713403051232819000.52237f95-65b3-4ed2-80e5-c391e40c0145" + } ], + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "SCT" + } ], + "system" : "http://snomed.info/sct", + "code" : "260373001", + "display" : "Detected" + } ] + }, + "interpretation" : [ { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70078" + } ], + "version" : "2.7", + "code" : "A", + "display" : "Abnormal" + } ] + } ], + "method" : { + "text" : "BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*" + } + } + }, { + "fullUrl" : "Organization/1713403051230793000.6f20095e-6f2a-43a7-9979-d9c59d5cef26", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051230793000.6f20095e-6f2a-43a7-9979-d9c59d5cef26", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "CLIA" + } ], + "code" : "11D1111111", + "display" : "CSV uploads" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.15" + } ], + "identifier" : [ { + "system" : "CLIA", + "value" : "11D1111111" + } ], + "name" : "CSV uploads" + } + }, { + "fullUrl" : "Organization/1713403051232819000.52237f95-65b3-4ed2-80e5-c391e40c0145", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051232819000.52237f95-65b3-4ed2-80e5-c391e40c0145", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "L" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "11D1111111" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.25" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CLIA" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.4.7" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "11D1111111" + } ], + "name" : "CSV uploads-11D1111111", + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "123 Main St" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + } ] + } ], + "line" : [ "123 Main St" ], + "state" : "CA", + "postalCode" : "94553", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Observation/1713403051238711000.862015cc-9666-45f1-abcb-072c55b08a5e", + "resource" : { + "resourceType" : "Observation", + "id" : "1713403051238711000.862015cc-9666-45f1-abcb-072c55b08a5e", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sub-id", + "valueString" : "ZZYGNAUM-1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", + "valueDateTime" : "2023-07-27T18:30:17-04:00", + "_valueDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230727183017-0400" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", + "extension" : [ { + "url" : "OBX.2", + "valueId" : "CWE" + }, { + "url" : "OBX.11", + "valueString" : "F" + } ] + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.74", + "code" : "100383-9", + "display" : "MVPX DNA Spec Ql NAA+probe" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "v_unknown", + "code" : "3900", + "display" : "Monkeypox generic" + } ], + "text" : "Monkeypox generic" + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "effectiveDateTime" : "2023-07-24T15:24:00Z", + "_effectiveDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202307241524" + } ] + }, + "performer" : [ { + "reference" : "Organization/1713403051239999000.eef9dde6-46ec-41c1-903c-ec65f3ae7995" + }, { + "reference" : "PractitionerRole/1713403051240496000.525c59cd-acee-4a4a-a87c-2a9913e46736" + }, { + "reference" : "Organization/1713403051243854000.07213aa7-9756-42de-9e29-b0017559ce92" + } ], + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "SCT" + } ], + "system" : "http://snomed.info/sct", + "version" : "09012018", + "code" : "10828004", + "display" : "Positive" + } ], + "text" : "Positive" + }, + "note" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "Run level Comment" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "Run level Comment" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "Result level Comment." + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "Result level Comment." + } ] + } + }, { + "fullUrl" : "Organization/1713403051239999000.eef9dde6-46ec-41c1-903c-ec65f3ae7995", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051239999000.eef9dde6-46ec-41c1-903c-ec65f3ae7995", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "CLIA" + } ], + "code" : "11D0668319", + "display" : "Centers for Disease Control and Prevention" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "code" : "47", + "display" : "Poxvirus Laboratory/Poxvirus and Rabies Branch" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.15" + } ], + "identifier" : [ { + "system" : "CLIA", + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention" + } + }, { + "fullUrl" : "Practitioner/1713403051241480000.0ed7f46b-85b6-41c7-b385-d19389df5f92", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051241480000.0ed7f46b-85b6-41c7-b385-d19389df5f92", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xcn-practitioner", + "extension" : [ { + "url" : "XCN.3", + "valueString" : "Christopher" + } ] + } ], + "identifier" : [ { + "value" : "NXQ0@cdc.gov" + } ], + "name" : [ { + "family" : "Anderson", + "given" : [ "Christopher" ] + } ] + } + }, { + "fullUrl" : "PractitionerRole/1713403051240496000.525c59cd-acee-4a4a-a87c-2a9913e46736", + "resource" : { + "resourceType" : "PractitionerRole", + "id" : "1713403051240496000.525c59cd-acee-4a4a-a87c-2a9913e46736", + "practitioner" : { + "reference" : "Practitioner/1713403051241480000.0ed7f46b-85b6-41c7-b385-d19389df5f92" + }, + "code" : [ { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/practitioner-role", + "code" : "responsibleObserver" + } ] + } ] + } + }, { + "fullUrl" : "Organization/1713403051243854000.07213aa7-9756-42de-9e29-b0017559ce92", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051243854000.07213aa7-9756-42de-9e29-b0017559ce92", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "L" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "11D0668319" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.25" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CLIA" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.4.7" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention", + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "1600 Clifton Rd" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "B" + } ] + } ], + "use" : "work", + "line" : [ "1600 Clifton Rd" ], + "city" : "Atlanta", + "state" : "GA", + "postalCode" : "30329", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Specimen/1713403051254672000.92ee87d5-8ebf-4178-8a57-345571255c97", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403051254672000.92ee87d5-8ebf-4178-8a57-345571255c97", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "Specimen/1713403051254890000.304173c5-92a5-4aa7-bd9c-b2246c6c9e75", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403051254890000.304173c5-92a5-4aa7-bd9c-b2246c6c9e75", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "Specimen/1713403051257732000.6da0d711-68e7-48bd-b43e-5d77757fe708", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403051257732000.6da0d711-68e7-48bd-b43e-5d77757fe708", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "SPM" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/filler-assigned-identifier", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier", + "valueString" : "3015894743" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component", + "valueString" : "SPM.2.1" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PGN" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/placer-assigned-identifier", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier", + "valueString" : "Specimen123" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component", + "valueString" : "SPM.2.2" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FGN" + } ] + }, + "value" : "3015894743" + } ], + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "SCT" + } ], + "system" : "http://snomed.info/sct", + "version" : "0912017", + "code" : "119297000", + "display" : "Blood specimen" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "Adobe_Code", + "code" : "BLD", + "display" : "Blood" + } ], + "text" : "Blood" + } + } + }, { + "fullUrl" : "Specimen/1713403051260879000.9cc26fd8-4137-4d80-849e-7b530ee8c24b", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403051260879000.9cc26fd8-4137-4d80-849e-7b530ee8c24b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "SPM" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/filler-assigned-identifier", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier", + "valueString" : "3015894743" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component", + "valueString" : "SPM.2.1" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PGN" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/placer-assigned-identifier", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/entity-identifier", + "valueString" : "Specimen123" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueString" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Component", + "valueString" : "SPM.2.2" + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FGN" + } ] + }, + "value" : "3015894743" + } ], + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "SCT" + } ], + "system" : "http://snomed.info/sct", + "version" : "0912017", + "code" : "119297000", + "display" : "Blood specimen" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "Adobe_Code", + "code" : "BLD", + "display" : "Blood" + } ], + "text" : "Blood" + } + } + }, { + "fullUrl" : "Observation/1713403051282055000.772aa683-9875-4d56-80ff-2d2b7b654051", + "resource" : { + "resourceType" : "Observation", + "id" : "1713403051282055000.772aa683-9875-4d56-80ff-2d2b7b654051", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", + "valueDateTime" : "2023-07-27T18:30:17Z", + "_valueDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230727183017" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-5-value-sn", + "extension" : [ { + "url" : "SN.2", + "valueString" : "28" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", + "extension" : [ { + "url" : "OBX.2", + "valueId" : "SN" + }, { + "url" : "OBX.6", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "UCUM" + } ], + "system" : "http://unitsofmeasure.org", + "version" : "2.1", + "code" : "a", + "display" : "Year" + } ] + } + }, { + "url" : "OBX.11", + "valueString" : "F" + } ] + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.61", + "code" : "21612-7", + "display" : "Reported Patient Age!!!" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "focus" : [ { + "reference" : "Specimen/1713403051257732000.6da0d711-68e7-48bd-b43e-5d77757fe708" + } ], + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "effectiveDateTime" : "2023-07-24T15:24:00Z", + "_effectiveDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202307241524" + } ] + }, + "performer" : [ { + "reference" : "Organization/1713403051282826000.884371b3-052e-48b8-9bbe-a96cf87b2452" + }, { + "reference" : "Organization/1713403051284384000.6bbcbf89-8e13-48ea-a003-f77ebcffdd89" + } ] + } + }, { + "fullUrl" : "Organization/1713403051282826000.884371b3-052e-48b8-9bbe-a96cf87b2452", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051282826000.884371b3-052e-48b8-9bbe-a96cf87b2452", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "CLIA" + } ], + "code" : "11D0668319", + "display" : "Centers for Disease Control and Prevention" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.15" + } ], + "identifier" : [ { + "system" : "CLIA", + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention" + } + }, { + "fullUrl" : "Organization/1713403051284384000.6bbcbf89-8e13-48ea-a003-f77ebcffdd89", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051284384000.6bbcbf89-8e13-48ea-a003-f77ebcffdd89", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "L" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "11D0668319" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.25" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CLIA" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.4.7" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention", + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "1600 Clifton Road" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "B" + } ] + } ], + "use" : "work", + "line" : [ "1600 Clifton Road" ], + "city" : "Atlanta", + "state" : "GA", + "postalCode" : "30329", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Observation/1713403051288757000.7c43b4b9-e42b-432c-9431-1f3e316a977d", + "resource" : { + "resourceType" : "Observation", + "id" : "1713403051288757000.7c43b4b9-e42b-432c-9431-1f3e316a977d", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/analysis-date-time", + "valueDateTime" : "2023-07-27T18:30:17Z", + "_valueDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230727183017" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-5-value-sn", + "extension" : [ { + "url" : "SN.2", + "valueString" : "28" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obx-observation", + "extension" : [ { + "url" : "OBX.2", + "valueId" : "SN" + }, { + "url" : "OBX.6", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "UCUM" + } ], + "system" : "http://unitsofmeasure.org", + "version" : "2.1", + "code" : "a", + "display" : "Year" + } ] + } + }, { + "url" : "OBX.11", + "valueString" : "F" + } ] + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.61", + "code" : "21612-7", + "display" : "Reported Patient Age???" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "focus" : [ { + "reference" : "Specimen/1713403051260879000.9cc26fd8-4137-4d80-849e-7b530ee8c24b" + } ], + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "effectiveDateTime" : "2023-07-24T15:24:00Z", + "_effectiveDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202307241524" + } ] + }, + "performer" : [ { + "reference" : "Organization/1713403051289434000.87081c61-ca98-4f52-a551-ddbeb0b9950f" + }, { + "reference" : "Organization/1713403051290977000.694fec14-37dd-495e-a438-49217de44e6a" + } ] + } + }, { + "fullUrl" : "Organization/1713403051289434000.87081c61-ca98-4f52-a551-ddbeb0b9950f", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051289434000.87081c61-ca98-4f52-a551-ddbeb0b9950f", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-organization", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "CLIA" + } ], + "code" : "11D0668319", + "display" : "Centers for Disease Control and Prevention" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.15" + } ], + "identifier" : [ { + "system" : "CLIA", + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention" + } + }, { + "fullUrl" : "Organization/1713403051290977000.694fec14-37dd-495e-a438-49217de44e6a", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051290977000.694fec14-37dd-495e-a438-49217de44e6a", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "L" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "11D0668319" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBX.25" + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "CLIA" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.113883.4.7" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "11D0668319" + } ], + "name" : "Centers for Disease Control and Prevention", + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "1600 Clifton Road" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "B" + } ] + } ], + "use" : "work", + "line" : [ "1600 Clifton Road" ], + "city" : "Atlanta", + "state" : "GA", + "postalCode" : "30329", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "ServiceRequest/1713403051315096000.4d4ce9d4-f17b-4580-a279-ad9d07a3b157", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713403051315096000.4d4ce9d4-f17b-4580-a279-ad9d07a3b157", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/business-event", + "valueCode" : "RE" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/business-event", + "valueString" : "20230725" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/orc-common-order", + "extension" : [ { + "url" : "orc-21-ordering-facility-name", + "valueReference" : { + "reference" : "Organization/1713403051307596000.fe9adc52-30d6-4893-b844-8770aa74ffce" + } + }, { + "url" : "orc-22-ordering-facility-address", + "valueAddress" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "850 Marina Bay Parkway" + } ] + }, { + "url" : "XAD.2", + "valueString" : "Rm. E-361" + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "M" + } ] + } ], + "type" : "postal", + "line" : [ "850 Marina Bay Parkway", "Rm. E-361" ], + "city" : "Richmond", + "state" : "CA", + "postalCode" : "94804", + "country" : "USA" + } + }, { + "url" : "orc-24-ordering-provider-address", + "valueAddress" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "11475 C Avenue" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "M" + } ] + } ], + "type" : "postal", + "line" : [ "11475 C Avenue" ], + "city" : "Auburn", + "state" : "CA", + "postalCode" : "95603", + "country" : "USA" + } + }, { + "url" : "orc-12-ordering-provider", + "valueReference" : { + "reference" : "Practitioner/1713403051310754000.092f4ce9-ce97-43ab-85c7-2462a78d5b63" + } + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.2", + "valueIdentifier" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "value" : "Specimen123" + } + }, { + "url" : "OBR.3", + "valueIdentifier" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "value" : "3015894743_04608717" + } + }, { + "url" : "OBR.22", + "valueString" : "202308021808-0400" + }, { + "url" : "OBR.25", + "valueId" : "F" + }, { + "url" : "OBR.16", + "valueReference" : { + "reference" : "Practitioner/1713403051313210000.38644508-d849-4ad0-813e-d29a136f3430" + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number", + "valueContactPoint" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "NET" + }, { + "url" : "XTN.3", + "valueString" : "Internet" + }, { + "url" : "XTN.4", + "valueString" : "MWaKabon@placer.ca.gov" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.17" + } ], + "system" : "email", + "value" : "MWaKabon@placer.ca.gov" + } + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "ORC.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PLAC" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "ORC.3" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FILL" + } ] + }, + "value" : "3015894743_04608717" + } ], + "status" : "unknown", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.74", + "code" : "68991-9", + "display" : "Epidemiologically Important Information" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "code" : "CDC-10515", + "display" : "Poxvirus Molecular Detection" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "requester" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number", + "valueContactPoint" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "NET" + }, { + "url" : "XTN.3", + "valueString" : "Internet" + }, { + "url" : "XTN.4", + "valueString" : "MWaKabon@placer.ca.gov" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "ORC.14" + } ], + "system" : "email", + "value" : "MWaKabon@placer.ca.gov" + } + } ], + "reference" : "PractitionerRole/1713403051297888000.7e7fdefa-22cf-4bc0-a1d5-4f9e3adf048f" + } + } + }, { + "fullUrl" : "Practitioner/1713403051300732000.ca1fde96-a996-49ab-a06b-58899ec84bc0", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051300732000.ca1fde96-a996-49ab-a06b-58899ec84bc0", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "ORC.12" + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "XX" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "value" : "SPHL-000098" + } ], + "name" : [ { + "family" : "CA-Placer County Public Health Laboratory" + } ], + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "11475 C Avenue" + } ] + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "M" + } ] + } ], + "type" : "postal", + "line" : [ "11475 C Avenue" ], + "city" : "Auburn", + "state" : "CA", + "postalCode" : "95603", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Organization/1713403051303441000.ac745efa-b697-43c8-88d3-54b02b0f742c", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051303441000.ac745efa-b697-43c8-88d3-54b02b0f742c", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "D" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "SPHL-000048" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "SPHL-000048" + } ], + "name" : "CDPH, Viral and Rickettsial Disease Laboratory", + "telecom" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "WPN" + }, { + "url" : "XTN.3", + "valueString" : "Internet" + }, { + "url" : "XTN.4", + "valueString" : "VRDL.Mail@cdph.ca.gov" + } ] + } ], + "system" : "email", + "value" : "VRDL.Mail@cdph.ca.gov", + "use" : "work" + } ], + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "850 Marina Bay Parkway" + } ] + }, { + "url" : "XAD.2", + "valueString" : "Rm. E-361" + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "M" + } ] + } ], + "type" : "postal", + "line" : [ "850 Marina Bay Parkway", "Rm. E-361" ], + "city" : "Richmond", + "state" : "CA", + "postalCode" : "94804", + "country" : "USA" + } ] + } + }, { + "fullUrl" : "PractitionerRole/1713403051297888000.7e7fdefa-22cf-4bc0-a1d5-4f9e3adf048f", + "resource" : { + "resourceType" : "PractitionerRole", + "id" : "1713403051297888000.7e7fdefa-22cf-4bc0-a1d5-4f9e3adf048f", + "practitioner" : { + "reference" : "Practitioner/1713403051300732000.ca1fde96-a996-49ab-a06b-58899ec84bc0" + }, + "organization" : { + "reference" : "Organization/1713403051303441000.ac745efa-b697-43c8-88d3-54b02b0f742c" + } + } + }, { + "fullUrl" : "Organization/1713403051307596000.fe9adc52-30d6-4893-b844-8770aa74ffce", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403051307596000.fe9adc52-30d6-4893-b844-8770aa74ffce", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/organization-name-type", + "valueString" : "D" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization", + "extension" : [ { + "url" : "XON.10", + "valueString" : "SPHL-000048" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "XX" + } ] + }, + "value" : "SPHL-000048" + } ], + "name" : "CDPH, Viral and Rickettsial Disease Laboratory" + } + }, { + "fullUrl" : "Practitioner/1713403051310754000.092f4ce9-ce97-43ab-85c7-2462a78d5b63", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051310754000.092f4ce9-ce97-43ab-85c7-2462a78d5b63", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "XX" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "value" : "SPHL-000098" + } ], + "name" : [ { + "family" : "CA-Placer County Public Health Laboratory" + } ] + } + }, { + "fullUrl" : "Practitioner/1713403051313210000.38644508-d849-4ad0-813e-d29a136f3430", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051313210000.38644508-d849-4ad0-813e-d29a136f3430", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "XX" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "value" : "SPHL-000098" + } ], + "name" : [ { + "family" : "CA-Placer County Public Health Laboratory" + } ] + } + }, { + "fullUrl" : "ServiceRequest/1713403051325184000.acd11243-7f94-4a11-ad81-17196251a85b", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713403051325184000.acd11243-7f94-4a11-ad81-17196251a85b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.22", + "valueString" : "202308021726-0400" + }, { + "url" : "OBR.25", + "valueId" : "F" + }, { + "url" : "OBR.16", + "valueReference" : { + "reference" : "Practitioner/1713403051323578000.9e4eca2d-6a64-478a-88a1-b46674023702" + } + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PLAC" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.3" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FILL" + } ] + }, + "value" : "47_3015894743_04608717_1233" + } ], + "status" : "unknown", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.74", + "code" : "10383-9", + "display" : "MVPX DNA Spec Ql NAA+probe" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "code" : "CDC-10515", + "display" : "Poxvirus Molecular Detection" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "v unknown", + "code" : "1233", + "display" : "Monkeypox generic" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "requester" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/callback-number", + "valueContactPoint" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "NET" + }, { + "url" : "XTN.3", + "valueString" : "Internet" + }, { + "url" : "XTN.4", + "valueString" : "MWaKabon@placer.ca.gov" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.17" + } ], + "system" : "email", + "value" : "MWaKabon@placer.ca.gov" + } + } ], + "reference" : "Practitioner/1713403051317150000.5dcf8ff2-157d-49e8-bd38-a6c8195e6db7" + }, + "note" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "Accession level coment." + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "Accession level coment." + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-type", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.12.364" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70364" + } ], + "version" : "2.5.1", + "code" : "RE", + "display" : "Remark" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-comment", + "valueId" : "Test level comment." + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/note-source", + "valueId" : "L" + } ], + "text" : "Test level comment." + } ] + } + }, { + "fullUrl" : "Practitioner/1713403051317150000.5dcf8ff2-157d-49e8-bd38-a6c8195e6db7", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051317150000.5dcf8ff2-157d-49e8-bd38-a6c8195e6db7", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.16" + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "XX" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "value" : "SPHL-000098" + } ], + "name" : [ { + "family" : "CA-Placer County Public Health Laboratory" + } ] + } + }, { + "fullUrl" : "Practitioner/1713403051323578000.9e4eca2d-6a64-478a-88a1-b46674023702", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713403051323578000.9e4eca2d-6a64-478a-88a1-b46674023702", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "identifier" : [ { + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "XX" + } ] + }, + "system" : "STARLIMS.CDC.Stag", + "value" : "SPHL-000098" + } ], + "name" : [ { + "family" : "CA-Placer County Public Health Laboratory" + } ] + } + }, { + "fullUrl" : "DiagnosticReport/1713403051336018000.fd7f6056-c0f8-40c2-b300-271da14337dc", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713403051336018000.fd7f6056-c0f8-40c2-b300-271da14337dc", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "ORC.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PLAC" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FILL" + } ] + }, + "value" : "3015894743_04608717" + } ], + "basedOn" : [ { + "reference" : "ServiceRequest/1713403051315096000.4d4ce9d4-f17b-4580-a279-ad9d07a3b157" + } ], + "status" : "final", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.74", + "code" : "68991-9", + "display" : "Epidemiologically Important Information" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "code" : "CDC-10515", + "display" : "Poxvirus Molecular Detection" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "effectiveDateTime" : "2023-07-24T15:24:00Z", + "_effectiveDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202307241524" + } ] + }, + "issued" : "2023-08-02T18:08:00-04:00", + "_issued" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202308021808-0400" + } ] + }, + "specimen" : [ { + "reference" : "Specimen/1713403051257732000.6da0d711-68e7-48bd-b43e-5d77757fe708" + }, { + "reference" : "Specimen/1713403051254672000.92ee87d5-8ebf-4178-8a57-345571255c97" + } ], + "result" : [ { + "reference" : "Observation/1713403051220745000.63ea27ea-0464-4655-af30-fb9bec820cd7" + }, { + "reference" : "Observation/1713403051229443000.1250993d-331f-4cd5-9245-785817d2b937" + } ] + } + }, { + "fullUrl" : "DiagnosticReport/1713403051340875000.6f3e2afa-c3c0-4a44-9fec-ccd43571021d", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713403051340875000.6f3e2afa-c3c0-4a44-9fec-ccd43571021d", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "OBR.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "SPHL-000048" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.1.10765" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "PLAC" + } ] + }, + "value" : "Specimen123" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "STARLIMS.CDC.Stag" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.16.840.1.114222.4.3.3.2.1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", + "code" : "FILL" + } ] + }, + "value" : "47_3015894743_04608717_1233" + } ], + "basedOn" : [ { + "reference" : "ServiceRequest/1713403051325184000.acd11243-7f94-4a11-ad81-17196251a85b" + } ], + "status" : "final", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "2.74", + "code" : "10383-9", + "display" : "MVPX DNA Spec Ql NAA+probe" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "code" : "CDC-10515", + "display" : "Poxvirus Molecular Detection" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "v unknown", + "code" : "1233", + "display" : "Monkeypox generic" + } ] + }, + "subject" : { + "reference" : "Patient/1713403050914425000.2377f845-bff3-4cc8-993f-4c9af35a7a0f" + }, + "encounter" : { + "reference" : "Encounter/1713403050935347000.29dad495-b015-407e-b9d2-6932551884bc" + }, + "effectiveDateTime" : "2023-07-24T15:24:00Z", + "_effectiveDateTime" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202307241524" + } ] + }, + "issued" : "2023-08-02T17:26:00-04:00", + "_issued" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "202308021726-0400" + } ] + }, + "specimen" : [ { + "reference" : "Specimen/1713403051260879000.9cc26fd8-4137-4d80-849e-7b530ee8c24b" + }, { + "reference" : "Specimen/1713403051254890000.304173c5-92a5-4aa7-bd9c-b2246c6c9e75" + } ], + "result" : [ { + "reference" : "Observation/1713403051238711000.862015cc-9666-45f1-abcb-072c55b08a5e" + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.hl7 new file mode 100644 index 00000000000..29752353cf3 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/orur01/oru_r01-full.hl7 @@ -0,0 +1,23 @@ +MSH|^~\&#|STARLIMS.CDC.Stag^2.16.840.1.114222.4.3.3.2.1.2^ISO|CDC Atlanta^11D0668319^CLIA|CDPH CA CALREDIE^2.16.840.1.114222.4.3.3.10.1.1^ISO|CDPH_CID^2.16.840.1.114222.4.1.2.14104^ISO|20230802180802-0400||ORU^R01^ORU_R01|3015894743_04608717_11184|T|2.5.1|||NE|NE|USA||||PHLabReport-NoAck^PHIN^2.16.840.1.113883.9.11^ISO +SFT|CDC^^^^^CDC&2.16.840.1.114222.4&ISO^XX^^^CDC CLIA|ELIMS V11|STARLIMS|Binary ID unknown|test|20230802180802-0400 +PID|1||test^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^PI~PID123^^^SPHL-000048&2.16.840.1.114222.4.1.10765&ISO^PI||Mega^HL7^MI^^^^L||0000|F|||^^^^^USA^H +PD1|C|A|Ordering Facility^X^123^Check Digit^C1^Assigning Authority&2.1.4.1&ISO^MD^Hospital A&2.16.840.1.113883.9.11&ISO^NameRepCode^OrgIdentifier~Ordering Facility^X^123^Check Digit^C1^Assigning Authority&2.1.4.1&ISO^MD^Hospital A&2.16.840.1.113883.9.11&ISO^NameRepCode^OrgIdentifier||F|T|F|F|N +NTE|1|L|Accession level coment.|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +NTE|2|L|SPHL Submitter: CDPH, Viral and Rickettsial Disease Laboratory, Submitter ID: SPHL-000048, Address: 850 Marina Bay Parkway Rm. E-361 Richmond, California 94804 United States, Email: VRDL.Mail@cdph.ca.gov, Submitter Patient ID: PID123, Submitter Alt Patient ID: AltPID1234, Submitter Specimen ID: Specimen123, Submitter Alt Specimen ID: AltSP1234|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +NK1|1|Organa^Leia|N^Next-of-Kin^HL70131 +NK1|2|Navarro^Liz|N^Next-of-Kin^HL70131 +PV1|1|||||^^^Hospital A&2.4.4.4&ISO^^^^^^Entity ID&NAME&UNI&ISO +ORC|RE|Specimen123^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|3015894743_04608717^STARLIMS.CDC.Stag^2.16.840.1.114222.4.3.3.2.1.2^ISO||||||20230725|||SPHL-000098^CA-Placer County Public Health Laboratory^^^^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^^^^XX||^NET^Internet^MWaKabon@placer.ca.gov|||||||CDPH, Viral and Rickettsial Disease Laboratory^D^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^XX^^^SPHL-000048|850 Marina Bay Parkway^Rm. E-361^Richmond^CA^94804^USA^M|^WPN^Internet^VRDL.Mail@cdph.ca.gov|11475 C Avenue^^Auburn^CA^95603^USA^M +OBR|1|Specimen123^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|3015894743_04608717^STARLIMS.CDC.Stag^2.16.840.1.114222.4.3.3.2.1.2^ISO|68991-9^Epidemiologically Important Information^LN^^^^2.74^^^CDC-10515^Poxvirus Molecular Detection^L^^2.16.840.1.113883.6.1|||202307241524|||||||||SPHL-000098^CA-Placer County Public Health Laboratory^^^^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^^^^XX|^NET^Internet^MWaKabon@placer.ca.gov|||||202308021808-0400|||F +OBX|1|CWE|80383-3^Flu B^LN||260415000^Not detected^SCT|||N^Normal^HL70078^^^^2.7|||F||||11D1111111^CSV uploads^CLIA||||||||CSV uploads-11D1111111^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^11D1111111|123 Main St^^^CA^94553^USA +OBX|2|CWE|80382-5^Flu A^LN||260373001^Detected^SCT|||A^Abnormal^HL70078^^^^2.7|||F||||11D1111111^CSV uploads^CLIA||^^^^^^^^BD Veritor System for Rapid Detection of SARS-CoV-2 \T\ Flu A+B*||||||CSV uploads-11D1111111^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^11D1111111|123 Main St^^^CA^94553^USA +SPM|1|Specimen123&SPHL-000048&2.16.840.1.114222.4.1.10765&ISO^3015894743&STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO||119297000^Blood specimen^SCT^BLD^Blood^L^0912017^Adobe_Code^Blood +OBX|1|SN|21612-7^Reported Patient Age!!!^LN^^^^2.61||^28|a^Year^UCUM^^^^2.1|||||F|||202307241524|11D0668319^Centers for Disease Control and Prevention^CLIA||||20230727183017||||Centers for Disease Control and Prevention^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^11D0668319|1600 Clifton Road^^Atlanta^GA^30329^USA^B +OBR|2|Specimen123^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|47_3015894743_04608717_1233^STARLIMS.CDC.Stag^2.16.840.1.114222.4.3.3.2.1.2^ISO|10383-9^MVPX DNA Spec Ql NAA+probe^LN^1233^Monkeypox generic^L^2.74^v unknown^^CDC-10515^Poxvirus Molecular Detection^L^^2.16.840.1.113883.6.1|||202307241524|||||||||SPHL-000098^CA-Placer County Public Health Laboratory^^^^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^^^^XX|^NET^Internet^MWaKabon@placer.ca.gov|||||202308021726-0400|||F +NTE|1|L|Accession level coment.|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +NTE|2|L|Test level comment.|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +OBX|1|CWE|100383-9^MVPX DNA Spec Ql NAA+probe^LN^3900^Monkeypox generic^L^2.74^v_unknown^Monkeypox generic|ZZYGNAUM-1|10828004^Positive^SCT^^^^09012018^^Positive||||||F|||202307241524|11D0668319^Centers for Disease Control and Prevention^CLIA^47^Poxvirus Laboratory/Poxvirus and Rabies Branch^L|NXQ0@cdc.gov^Anderson^Christopher|||20230727183017-0400||||Centers for Disease Control and Prevention^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^11D0668319|1600 Clifton Rd^^Atlanta^GA^30329^USA^B +NTE|1|L|Run level Comment|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +NTE|2|L|Result level Comment.|RE^Remark^HL70364^^^^2.5.1^^^^^^^2.16.840.1.113883.12.364 +SPM|1|Specimen123&SPHL-000048&2.16.840.1.114222.4.1.10765&ISO^3015894743&STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO||119297000^Blood specimen^SCT^BLD^Blood^L^0912017^Adobe_Code^Blood +OBX|1|SN|21612-7^Reported Patient Age???^LN^^^^2.61||^28|a^Year^UCUM^^^^2.1|||||F|||202307241524|11D0668319^Centers for Disease Control and Prevention^CLIA||||20230727183017||||Centers for Disease Control and Prevention^L^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^11D0668319|1600 Clifton Road^^Atlanta^GA^30329^USA^B \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.fhir new file mode 100644 index 00000000000..055e346026e --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.fhir @@ -0,0 +1,234 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403066467353000.db3dd9c8-cefe-4ef4-a631-8d601c455f45", + "meta" : { + "lastUpdated" : "2024-04-17T19:17:46.477-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "20230816123358" + }, + "type" : "message", + "timestamp" : "2023-08-16T11:33:58.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/bb504ecd-c2ab-3be3-91d8-6065e2bce435", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "bb504ecd-c2ab-3be3-91d8-6065e2bce435", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230816123358-0500" + }, { + "url" : "MSH.10", + "valueString" : "20230816123358" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + } + } + }, { + "fullUrl" : "Provenance/1713403067097619000.41f6404f-e4eb-4803-87af-ce80c0661269", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403067097619000.41f6404f-e4eb-4803-87af-ce80c0661269", + "target" : [ { + "reference" : "MessageHeader/bb504ecd-c2ab-3be3-91d8-6065e2bce435" + }, { + "reference" : "DiagnosticReport/1713403067434929000.bf17a0a5-8df2-46be-999b-0e91503ec3d8" + } ], + "recorded" : "2023-08-16T12:33:58-05:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403067110774000.2084408c-8bcf-4abe-af89-f69f4ed604e7", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403067110774000.2084408c-8bcf-4abe-af89-f69f4ed604e7", + "recorded" : "2024-04-17T19:17:47Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403067109354000.2aa64311-8f6c-4f5a-a1cd-a058f2bf1586" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403067109354000.2aa64311-8f6c-4f5a-a1cd-a058f2bf1586", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403067109354000.2aa64311-8f6c-4f5a-a1cd-a058f2bf1586", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403067133980000.f6f45975-3b95-409a-b584-49a6516ca231", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403067133980000.f6f45975-3b95-409a-b584-49a6516ca231" + } + }, { + "fullUrl" : "Provenance/1713403067134963000.8b4ba600-f324-4fa2-ab8c-f8aaff6e921b", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403067134963000.8b4ba600-f324-4fa2-ab8c-f8aaff6e921b", + "target" : [ { + "reference" : "Patient/1713403067133980000.f6f45975-3b95-409a-b584-49a6516ca231" + } ], + "recorded" : "2024-04-17T19:17:47Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "Specimen/1713403067137132000.3341d0e4-bad1-41ac-9912-0564150a65d9", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713403067137132000.3341d0e4-bad1-41ac-9912-0564150a65d9", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "ServiceRequest/1713403067428256000.a1e57096-485b-4336-a61a-7c5aa6e19fb1", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713403067428256000.a1e57096-485b-4336-a61a-7c5aa6e19fb1", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.25", + "valueId" : "F" + }, { + "url" : "OBR.26", + "extension" : [ { + "url" : "prl-1-parent-observation-identifier", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:TEST1234" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "version" : "PrimaryVersion", + "code" : "PrimaryCode", + "display" : "Primary Code Display" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "secondary-alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "SecondaryAltVersion", + "code" : "SecondaryAltCode", + "display" : "SecondaryAltText" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL", + "version" : "AltVersion", + "code" : "AltCode", + "display" : "AltText" + } ], + "text" : "OriginalText" + } + }, { + "url" : "prl-2-parent-observation-sub-identifier", + "valueString" : "Test1" + }, { + "url" : "prl-3-parent-observation-descriptor", + "valueString" : "Test2" + } ] + } ] + } ], + "status" : "unknown", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "TEST" + } ] + }, + "subject" : { + "reference" : "Patient/1713403067133980000.f6f45975-3b95-409a-b584-49a6516ca231" + } + } + }, { + "fullUrl" : "DiagnosticReport/1713403067434929000.bf17a0a5-8df2-46be-999b-0e91503ec3d8", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713403067434929000.bf17a0a5-8df2-46be-999b-0e91503ec3d8", + "basedOn" : [ { + "reference" : "ServiceRequest/1713403067428256000.a1e57096-485b-4336-a61a-7c5aa6e19fb1" + } ], + "status" : "final", + "code" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "TEST" + } ] + }, + "subject" : { + "reference" : "Patient/1713403067133980000.f6f45975-3b95-409a-b584-49a6516ca231" + }, + "specimen" : [ { + "reference" : "Specimen/1713403067137132000.3341d0e4-bad1-41ac-9912-0564150a65d9" + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.hl7 new file mode 100644 index 00000000000..392f83dfeef --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/prl/prl-to-servicerequest.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&#|||||20230816123358-0500||ORU^R01^ORU_R01|20230816123358||2.5.1 +PID|1 +OBR|1|||TEST|||||||||||||||||||||F|PrimaryCode&Primary Code Display&LN&AltCode&AltText&L&PrimaryVersion&AltVersion&OriginalText&SecondaryAltCode&SecondaryAltText&L&SecondaryAltVersion&TEST1234^Test1^Test2 \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.fhir new file mode 100644 index 00000000000..a47b99e3615 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.fhir @@ -0,0 +1,254 @@ +{ + "resourceType" : "Bundle", + "id" : "1713403085477795000.87b249cb-cffd-42d4-a0c6-1bc849ef19e1", + "meta" : { + "lastUpdated" : "2024-04-17T19:18:05.487-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "3003786103_4988249_33033" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "3003786103_4988249_33033" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + } + } + }, { + "fullUrl" : "Provenance/1713403086125556000.56cddc76-997e-4010-bc99-8b72195af802", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403086125556000.56cddc76-997e-4010-bc99-8b72195af802", + "target" : [ { + "reference" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713403086138867000.16053c96-7e09-45c1-be9e-5d973827c9e3", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403086138867000.16053c96-7e09-45c1-be9e-5d973827c9e3", + "recorded" : "2024-04-17T19:18:06Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713403086137725000.e57452f6-eedc-4aa0-8f3f-cb85dfdf3ef5" + } + } ] + } + }, { + "fullUrl" : "Organization/1713403086137725000.e57452f6-eedc-4aa0-8f3f-cb85dfdf3ef5", + "resource" : { + "resourceType" : "Organization", + "id" : "1713403086137725000.e57452f6-eedc-4aa0-8f3f-cb85dfdf3ef5", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713403086172163000.32b3c4a9-e0e4-459c-a443-a028753bd407", + "resource" : { + "resourceType" : "Patient", + "id" : "1713403086172163000.32b3c4a9-e0e4-459c-a443-a028753bd407", + "contact" : [ { + "name" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "LUDWIG" + }, { + "url" : "XPN.3", + "valueString" : "B" + }, { + "url" : "XPN.4", + "valueString" : "2ND" + }, { + "url" : "XPN.6", + "valueString" : "MD" + }, { + "url" : "XPN.7", + "valueString" : "B" + }, { + "url" : "XPN.8", + "valueString" : "A" + }, { + "url" : "XPN.12", + "valueString" : "20220501102531-0400" + }, { + "url" : "XPN.13", + "valueString" : "20230501102531-0400" + }, { + "url" : "XPN.14", + "valueString" : "MD" + } ] + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order", + "valueCode" : "F" + } ], + "use" : "official", + "family" : "BEETHOVEN", + "_family" : { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", + "valueString" : "VAN" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-name", + "valueString" : "BEETHOVEN" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix", + "valueString" : "VAL" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-partner-name", + "valueString" : "ROGER" + } ] + }, + "given" : [ "LUDWIG", "B" ], + "prefix" : [ "DR" ], + "suffix" : [ "2ND", "MD", "MD" ], + "period" : { + "start" : "2022-05-01T10:25:31-04:00", + "end" : "2023-05-01T10:25:31-04:00" + } + } + } ] + } + }, { + "fullUrl" : "Provenance/1713403086175184000.c6e7782b-d236-4380-9c66-45736f2b2b04", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713403086175184000.c6e7782b-d236-4380-9c66-45736f2b2b04", + "target" : [ { + "reference" : "Patient/1713403086172163000.32b3c4a9-e0e4-459c-a443-a028753bd407" + } ], + "recorded" : "2024-04-17T19:18:06Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "RelatedPerson/1713403086181253000.8d5b84f7-90b0-4865-976d-6ecf7f60e4b7", + "resource" : { + "resourceType" : "RelatedPerson", + "id" : "1713403086181253000.8d5b84f7-90b0-4865-976d-6ecf7f60e4b7", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "NK1" + } ], + "patient" : { + "reference" : "Patient/1713403086172163000.32b3c4a9-e0e4-459c-a443-a028753bd407" + }, + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.2" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "LUDWIG" + }, { + "url" : "XPN.3", + "valueString" : "B" + }, { + "url" : "XPN.4", + "valueString" : "2ND" + }, { + "url" : "XPN.6", + "valueString" : "MD" + }, { + "url" : "XPN.7", + "valueString" : "B" + }, { + "url" : "XPN.8", + "valueString" : "A" + }, { + "url" : "XPN.12", + "valueString" : "20220501102531-0400" + }, { + "url" : "XPN.13", + "valueString" : "20230501102531-0400" + }, { + "url" : "XPN.14", + "valueString" : "MD" + } ] + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order", + "valueCode" : "F" + } ], + "use" : "official", + "family" : "BEETHOVEN", + "_family" : { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", + "valueString" : "VAN" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-name", + "valueString" : "BEETHOVEN" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix", + "valueString" : "VAL" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/humanname-partner-name", + "valueString" : "ROGER" + } ] + }, + "given" : [ "LUDWIG", "B" ], + "prefix" : [ "DR" ], + "suffix" : [ "2ND", "MD", "MD" ], + "period" : { + "start" : "2022-05-01T10:25:31-04:00", + "end" : "2023-05-01T10:25:31-04:00" + } + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.hl7 new file mode 100644 index 00000000000..11e1ff57dac --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251-elr/xpn/xpn-to-humanname-xpn12-13-populated-xpn10-empty.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|3003786103_4988249_33033||2.5.1 +PID|1 +NK1|1|BEETHOVEN&VAN&BEETHOVEN&VAL&ROGER^LUDWIG^B^2ND^DR^MD^B^A^^^F^20220501102531-0400^20230501102531-0400^MD \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.csv b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.csv new file mode 100644 index 00000000000..7ccebe332e0 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.csv @@ -0,0 +1,14 @@ +HL7 v2,,,,,,Condition (IF True),,,HL7 FHIR,,,,,,,,,Comments +Sort Order,Identifier,Name,Data Type,Cardinality - Min,Cardinality - Max,Computable ANTLR,Computable FHIRPath,Narrative,FHIR Attribute/ Data Type,,Data Type,Cardinality - Min,Cardinality - Max,Data Type Mapping,"Vocabulary Mapping +(IS, ID, CE, CNE, CWE)",Assignment,, +1,CNN.1,ID Number,ST,0,1,,,,identifier.value,,string,0,1,,,,, +2,CNN.2,Family Name,ST,0,1,,,,name.family,,string,0,1,,,,, +3,CNN.3,Given Name,ST,0,1,,,,name.given[1],,string,0,-1,,,,, +4,CNN.4,Second and Further Given Names or Initials Thereof,ST,0,1,,,,name.given[2],,string,0,-1,,,,, +5,CNN.5,"Suffix (e.g., JR or III)",ST,0,1,,,,name.suffix[1],,string,0,-1,,,,, +6,CNN.6,"Prefix (e.g., DR)",ST,0,1,,,,name.prefix,,string,0,-1,,,,, +7,CNN.7,"Degree (e.g., MD)",IS,0,1,,,,name.suffix[2],,string,0,-1,,,,, +8,CNN.8,Source Table,IS,0,1,,,,,,,,,,,,, +9,CNN.9,Assigning Authority- Namespace ID,IS,0,1,,,,,identifier.extension??-assigningauthority.nameSpaceID,string,0,1,,,,, +10,CNN.10,Assigning Authority- Universal ID,ST,0,1,,,,,identifier.extension??-assigningauthority.universalID,string,0,1,,,,, +11,CNN.11,Assigning Authority- Universal ID Type,ID,0,1,,,,,identifier.extension??-assigningauthority.univeralIDType,code,0,1,,,,, \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.fhir new file mode 100644 index 00000000000..65c15654828 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.fhir @@ -0,0 +1,235 @@ +{ + "resourceType" : "Bundle", + "id" : "1713393880004309000.b59a8aad-38c3-4243-be7c-45114f95fed9", + "meta" : { + "lastUpdated" : "2024-04-17T16:44:40.014-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713393880112498000.f7f0e7e8-aaa8-4e0d-98df-6094345361fc" + } + } + }, { + "fullUrl" : "Organization/1713393880112498000.f7f0e7e8-aaa8-4e0d-98df-6094345361fc", + "resource" : { + "resourceType" : "Organization", + "id" : "1713393880112498000.f7f0e7e8-aaa8-4e0d-98df-6094345361fc", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713393880626524000.24529ecb-5e2d-42e2-a8b3-665dff92963b", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713393880626524000.24529ecb-5e2d-42e2-a8b3-665dff92963b", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + }, { + "reference" : "DiagnosticReport/1713393880899669000.c3855133-7bd8-4ea9-9e2a-2dae6bb5d58f" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713393880639311000.226a0bac-5c56-4652-8e9d-254fa905911c", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713393880639311000.226a0bac-5c56-4652-8e9d-254fa905911c", + "recorded" : "2024-04-17T16:44:40Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713393880637824000.5cde0298-0f1b-46de-9e4e-d3b2900f7709" + } + } ] + } + }, { + "fullUrl" : "Organization/1713393880637824000.5cde0298-0f1b-46de-9e4e-d3b2900f7709", + "resource" : { + "resourceType" : "Organization", + "id" : "1713393880637824000.5cde0298-0f1b-46de-9e4e-d3b2900f7709", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713393880658662000.8bba09eb-f326-4227-b606-ea2c18e1408b", + "resource" : { + "resourceType" : "Patient", + "id" : "1713393880658662000.8bba09eb-f326-4227-b606-ea2c18e1408b" + } + }, { + "fullUrl" : "Provenance/1713393880659653000.e1c2c5d7-d3c6-4706-bc5c-cb29449306db", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713393880659653000.e1c2c5d7-d3c6-4706-bc5c-cb29449306db", + "target" : [ { + "reference" : "Patient/1713393880658662000.8bba09eb-f326-4227-b606-ea2c18e1408b" + } ], + "recorded" : "2024-04-17T16:44:40Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "Specimen/1713393880661409000.d1daeccb-38a5-4dd8-80ec-15092d564bbb", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713393880661409000.d1daeccb-38a5-4dd8-80ec-15092d564bbb", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "ServiceRequest/1713393880890702000.ba50d503-0a22-4ab3-8fcc-badd79e63838", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713393880890702000.ba50d503-0a22-4ab3-8fcc-badd79e63838", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.25", + "valueId" : "F" + } ] + } ], + "status" : "unknown", + "subject" : { + "reference" : "Patient/1713393880658662000.8bba09eb-f326-4227-b606-ea2c18e1408b" + } + } + }, { + "fullUrl" : "DiagnosticReport/1713393880899669000.c3855133-7bd8-4ea9-9e2a-2dae6bb5d58f", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713393880899669000.c3855133-7bd8-4ea9-9e2a-2dae6bb5d58f", + "basedOn" : [ { + "reference" : "ServiceRequest/1713393880890702000.ba50d503-0a22-4ab3-8fcc-badd79e63838" + } ], + "status" : "final", + "subject" : { + "reference" : "Patient/1713393880658662000.8bba09eb-f326-4227-b606-ea2c18e1408b" + }, + "resultsInterpreter" : [ { + "reference" : "PractitionerRole/1713393880898126000.4772e730-ae2c-44d0-9aff-a2b65a8076e5" + } ], + "specimen" : [ { + "reference" : "Specimen/1713393880661409000.d1daeccb-38a5-4dd8-80ec-15092d564bbb" + } ] + } + }, { + "fullUrl" : "Practitioner/1713393880896316000.bb4bb5ef-9184-496a-ad51-2621b4310570", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713393880896316000.bb4bb5ef-9184-496a-ad51-2621b4310570", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cnn-practitioner", + "extension" : [ { + "url" : "CNN.3", + "valueString" : "JAMISON" + }, { + "url" : "CNN.4", + "valueString" : "S" + }, { + "url" : "CNN.5", + "valueString" : "ESQ" + }, { + "url" : "CNN.7", + "valueString" : "MD" + }, { + "url" : "CNN.8", + "valueString" : "X" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "Assigning Authority" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.1.4.1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "value" : "123" + } ], + "name" : [ { + "family" : "DOE", + "given" : [ "JAMISON", "S" ], + "prefix" : [ "DR" ], + "suffix" : [ "ESQ", "MD" ] + } ] + } + }, { + "fullUrl" : "PractitionerRole/1713393880898126000.4772e730-ae2c-44d0-9aff-a2b65a8076e5", + "resource" : { + "resourceType" : "PractitionerRole", + "id" : "1713393880898126000.4772e730-ae2c-44d0-9aff-a2b65a8076e5", + "practitioner" : { + "reference" : "Practitioner/1713393880896316000.bb4bb5ef-9184-496a-ad51-2621b4310570" + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.hl7 new file mode 100644 index 00000000000..189e58ec19d --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cnn/cnn-to-Practitioner.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1 +OBR|1||||||||||||||||||||||||F|||||||123&DOE&JAMISON&S&ESQ&DR&MD&X&Assigning Authority&2.1.4.1&ISO diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir new file mode 100644 index 00000000000..58176145db5 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394837210696000.6d4364a4-0e4f-48fb-9f58-6eea07911f37", + "meta" : { + "lastUpdated" : "2024-04-17T17:00:37.220-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394837313897000.aa92f5d6-b2d5-44c4-8891-b59a96255af6" + } + } + }, { + "fullUrl" : "Organization/1713394837313897000.aa92f5d6-b2d5-44c4-8891-b59a96255af6", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394837313897000.aa92f5d6-b2d5-44c4-8891-b59a96255af6", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394837829159000.d43ae37a-2985-4dd4-8a11-1ae513d53dde", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394837829159000.d43ae37a-2985-4dd4-8a11-1ae513d53dde", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394837842282000.add5d0d0-e321-4626-a06f-9bc5040c2b86", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394837842282000.add5d0d0-e321-4626-a06f-9bc5040c2b86", + "recorded" : "2024-04-17T17:00:37Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394837841300000.5a813ac7-38a9-4344-a047-48bea62df89b" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394837841300000.5a813ac7-38a9-4344-a047-48bea62df89b", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394837841300000.5a813ac7-38a9-4344-a047-48bea62df89b", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394837869503000.9be92edb-e84e-45d7-86a6-1d0efef26c80", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394837869503000.9be92edb-e84e-45d7-86a6-1d0efef26c80", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "version" : "AltVersion" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394837870856000.b345411b-f8a4-4974-862a-b2068d7b09b2", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394837870856000.b345411b-f8a4-4974-862a-b2068d7b09b2", + "target" : [ { + "reference" : "Patient/1713394837869503000.9be92edb-e84e-45d7-86a6-1d0efef26c80" + } ], + "recorded" : "2024-04-17T17:00:37Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 new file mode 100644 index 00000000000..882e62bbe8b --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-10-test-value-cwe8.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^^^^^AltVersion \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir new file mode 100644 index 00000000000..83f17c7f07b --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.fhir @@ -0,0 +1,144 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394852853645000.7333fe01-15d1-4dcb-89a1-24111f862e76", + "meta" : { + "lastUpdated" : "2024-04-17T17:00:52.865-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394852955892000.e4773570-28b7-4b33-9d00-f7c4bd9e68b0" + } + } + }, { + "fullUrl" : "Organization/1713394852955892000.e4773570-28b7-4b33-9d00-f7c4bd9e68b0", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394852955892000.e4773570-28b7-4b33-9d00-f7c4bd9e68b0", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394853486820000.7349c98d-11a8-4752-9627-e763ad1cd896", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394853486820000.7349c98d-11a8-4752-9627-e763ad1cd896", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394853500088000.28e9b60d-9721-4b1a-9f2d-fa10719db7ff", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394853500088000.28e9b60d-9721-4b1a-9f2d-fa10719db7ff", + "recorded" : "2024-04-17T17:00:53Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394853498977000.ca6803ad-9104-4ef5-9f5b-638cb0d32529" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394853498977000.ca6803ad-9104-4ef5-9f5b-638cb0d32529", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394853498977000.ca6803ad-9104-4ef5-9f5b-638cb0d32529", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394853525700000.4afe1c09-b4e0-4b4f-9035-c6ef01cd7e15", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394853525700000.4afe1c09-b4e0-4b4f-9035-c6ef01cd7e15", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "text" : "OriginalText" + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394853527127000.d034a7e7-f80f-4ded-ac8c-32753d81d7e8", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394853527127000.d034a7e7-f80f-4ded-ac8c-32753d81d7e8", + "target" : [ { + "reference" : "Patient/1713394853525700000.4afe1c09-b4e0-4b4f-9035-c6ef01cd7e15" + } ], + "recorded" : "2024-04-17T17:00:53Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 new file mode 100644 index 00000000000..104007c7aaf --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-11-test-value-cwe9.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^^^^^^OriginalText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir new file mode 100644 index 00000000000..fd93060f804 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394868669158000.9e444cc7-01cc-4bb3-ae8e-e6c7d3cb4d68", + "meta" : { + "lastUpdated" : "2024-04-17T17:01:08.679-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394868772588000.ead2307e-0bcb-4cd7-8bb2-f4d0254ce141" + } + } + }, { + "fullUrl" : "Organization/1713394868772588000.ead2307e-0bcb-4cd7-8bb2-f4d0254ce141", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394868772588000.ead2307e-0bcb-4cd7-8bb2-f4d0254ce141", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394869306994000.79f1c6fb-9444-4167-b47b-9f1f2e0b3eb1", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394869306994000.79f1c6fb-9444-4167-b47b-9f1f2e0b3eb1", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394869319060000.573ef371-46e1-4c57-b3e8-f2c8288e8113", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394869319060000.573ef371-46e1-4c57-b3e8-f2c8288e8113", + "recorded" : "2024-04-17T17:01:09Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394869318006000.d15bc0ac-9d93-413c-871b-6ff60b1b3e31" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394869318006000.d15bc0ac-9d93-413c-871b-6ff60b1b3e31", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394869318006000.d15bc0ac-9d93-413c-871b-6ff60b1b3e31", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394869340318000.022c7d88-fd33-489c-8067-cbf9e030f17c", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394869340318000.022c7d88-fd33-489c-8067-cbf9e030f17c", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "code" : "PrimaryCode" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394869341705000.f66a1601-3434-4439-9080-84876088c32e", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394869341705000.f66a1601-3434-4439-9080-84876088c32e", + "target" : [ { + "reference" : "Patient/1713394869340318000.022c7d88-fd33-489c-8067-cbf9e030f17c" + } ], + "recorded" : "2024-04-17T17:01:09Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 new file mode 100644 index 00000000000..b0cb36f233d --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-3-test-value-cwe1.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||PrimaryCode \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir new file mode 100644 index 00000000000..41658edf0ab --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394884120918000.1ff35302-4750-4b4a-aee0-606ec95a67fb", + "meta" : { + "lastUpdated" : "2024-04-17T17:01:24.131-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394884221106000.623c27fd-60ed-4ad6-b126-cefcea8bc084" + } + } + }, { + "fullUrl" : "Organization/1713394884221106000.623c27fd-60ed-4ad6-b126-cefcea8bc084", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394884221106000.623c27fd-60ed-4ad6-b126-cefcea8bc084", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394884765295000.f231d2bc-bb57-453c-8145-8dbd40379604", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394884765295000.f231d2bc-bb57-453c-8145-8dbd40379604", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394884777774000.937d0b02-67d3-4a01-8f89-9556750604ff", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394884777774000.937d0b02-67d3-4a01-8f89-9556750604ff", + "recorded" : "2024-04-17T17:01:24Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394884776790000.f5e44c71-ef5a-4f13-99d0-838104b878a6" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394884776790000.f5e44c71-ef5a-4f13-99d0-838104b878a6", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394884776790000.f5e44c71-ef5a-4f13-99d0-838104b878a6", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394884800499000.ea898f68-1586-4f58-b10b-2b1badf8317d", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394884800499000.ea898f68-1586-4f58-b10b-2b1badf8317d", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "display" : "PrimaryText" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394884802691000.ed786815-9637-4ba9-b745-3b0b4ae30693", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394884802691000.ed786815-9637-4ba9-b745-3b0b4ae30693", + "target" : [ { + "reference" : "Patient/1713394884800499000.ea898f68-1586-4f58-b10b-2b1badf8317d" + } ], + "recorded" : "2024-04-17T17:01:24Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 new file mode 100644 index 00000000000..3dcda3b024f --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-4-test-value-cwe2.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^PrimaryText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir new file mode 100644 index 00000000000..77567bae565 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.fhir @@ -0,0 +1,153 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394899547799000.54d22dce-08ee-4875-9180-2159fa376182", + "meta" : { + "lastUpdated" : "2024-04-17T17:01:39.557-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394899646578000.605178ae-b70f-4261-99a1-4db9ab21557e" + } + } + }, { + "fullUrl" : "Organization/1713394899646578000.605178ae-b70f-4261-99a1-4db9ab21557e", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394899646578000.605178ae-b70f-4261-99a1-4db9ab21557e", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394900161177000.5f841782-40a8-4f17-836f-fb016fc2bde0", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394900161177000.5f841782-40a8-4f17-836f-fb016fc2bde0", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394900173237000.d031b64d-b9b7-45d4-bf85-7f3dde2d9684", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394900173237000.d031b64d-b9b7-45d4-bf85-7f3dde2d9684", + "recorded" : "2024-04-17T17:01:40Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394900172339000.99e30d90-0c58-4be0-9abc-30800efc755f" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394900172339000.99e30d90-0c58-4be0-9abc-30800efc755f", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394900172339000.99e30d90-0c58-4be0-9abc-30800efc755f", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394900198229000.3dab0550-a4e0-4407-bf8b-d2e5caa361af", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394900198229000.3dab0550-a4e0-4407-bf8b-d2e5caa361af", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394900199735000.e4318de8-27e0-46d8-a7c5-a90ebd0424d4", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394900199735000.e4318de8-27e0-46d8-a7c5-a90ebd0424d4", + "target" : [ { + "reference" : "Patient/1713394900198229000.3dab0550-a4e0-4407-bf8b-d2e5caa361af" + } ], + "recorded" : "2024-04-17T17:01:40Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 new file mode 100644 index 00000000000..3dad063335d --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-5-test-value-cwe3.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^LN \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir new file mode 100644 index 00000000000..cfdca3bcfdb --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394915037867000.8084b1dc-6077-4af0-8bd2-948e0d08a02b", + "meta" : { + "lastUpdated" : "2024-04-17T17:01:55.048-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394915134823000.950e8a11-6913-4b13-b125-8a6f4905f63b" + } + } + }, { + "fullUrl" : "Organization/1713394915134823000.950e8a11-6913-4b13-b125-8a6f4905f63b", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394915134823000.950e8a11-6913-4b13-b125-8a6f4905f63b", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394915661923000.3616ee85-0de2-40c4-af14-d1f6dc8fe7e1", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394915661923000.3616ee85-0de2-40c4-af14-d1f6dc8fe7e1", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394915683687000.a25e91d3-db10-4eca-8c7d-4e1fe981eaa2", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394915683687000.a25e91d3-db10-4eca-8c7d-4e1fe981eaa2", + "recorded" : "2024-04-17T17:01:55Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394915682548000.9bbac550-6d3f-4abc-a98d-65ea28f91d3f" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394915682548000.9bbac550-6d3f-4abc-a98d-65ea28f91d3f", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394915682548000.9bbac550-6d3f-4abc-a98d-65ea28f91d3f", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394915705940000.6403584d-b35e-4580-b05c-c4588c19e663", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394915705940000.6403584d-b35e-4580-b05c-c4588c19e663", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "code" : "AltCode" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394915707211000.4b4dcd35-defb-47e5-b3f4-67c876edca82", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394915707211000.4b4dcd35-defb-47e5-b3f4-67c876edca82", + "target" : [ { + "reference" : "Patient/1713394915705940000.6403584d-b35e-4580-b05c-c4588c19e663" + } ], + "recorded" : "2024-04-17T17:01:55Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 new file mode 100644 index 00000000000..4247159a94f --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-6-test-value-cwe4.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^AltCode \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir new file mode 100644 index 00000000000..9adc605b291 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394930411716000.94132fcc-bd2e-4622-8a72-df8271619a87", + "meta" : { + "lastUpdated" : "2024-04-17T17:02:10.420-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394930509966000.14eeac11-cecb-4050-9775-a50cc3b39921" + } + } + }, { + "fullUrl" : "Organization/1713394930509966000.14eeac11-cecb-4050-9775-a50cc3b39921", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394930509966000.14eeac11-cecb-4050-9775-a50cc3b39921", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394931027309000.50553de8-66c6-4a15-906e-3c198d4b2a2d", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394931027309000.50553de8-66c6-4a15-906e-3c198d4b2a2d", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394931038908000.f2eaf4d9-e667-4115-829c-676022564e13", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394931038908000.f2eaf4d9-e667-4115-829c-676022564e13", + "recorded" : "2024-04-17T17:02:11Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394931037690000.cb720c2a-826d-4438-b446-ca22e17a2c09" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394931037690000.cb720c2a-826d-4438-b446-ca22e17a2c09", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394931037690000.cb720c2a-826d-4438-b446-ca22e17a2c09", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394931062543000.b63b9730-3a30-4e49-9a97-c51970a91e44", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394931062543000.b63b9730-3a30-4e49-9a97-c51970a91e44", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + } ], + "display" : "AltText" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394931063733000.91eb61ce-0c7c-47e3-8cfe-b6fbf60cdcb0", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394931063733000.91eb61ce-0c7c-47e3-8cfe-b6fbf60cdcb0", + "target" : [ { + "reference" : "Patient/1713394931062543000.b63b9730-3a30-4e49-9a97-c51970a91e44" + } ], + "recorded" : "2024-04-17T17:02:11Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 new file mode 100644 index 00000000000..e1418f6ed88 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-7-test-value-cwe5.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^^AltText \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir new file mode 100644 index 00000000000..6219a40cf09 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.fhir @@ -0,0 +1,153 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394945750138000.5da39533-b8d9-420d-b708-73d00a85afa6", + "meta" : { + "lastUpdated" : "2024-04-17T17:02:25.759-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394945848856000.7fa6743c-40c3-433f-a84c-4430999db590" + } + } + }, { + "fullUrl" : "Organization/1713394945848856000.7fa6743c-40c3-433f-a84c-4430999db590", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394945848856000.7fa6743c-40c3-433f-a84c-4430999db590", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394946385604000.f1117566-d888-46af-b2b5-70daa79c8598", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394946385604000.f1117566-d888-46af-b2b5-70daa79c8598", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394946399545000.35c43cfb-4053-4e36-af9e-c39e0b5b023f", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394946399545000.35c43cfb-4053-4e36-af9e-c39e0b5b023f", + "recorded" : "2024-04-17T17:02:26Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394946398330000.f6bc190e-904b-4f50-873d-41cd4f4a48a1" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394946398330000.f6bc190e-904b-4f50-873d-41cd4f4a48a1", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394946398330000.f6bc190e-904b-4f50-873d-41cd4f4a48a1", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394946422833000.e97cb2d5-9881-4235-9cbe-b09e89345a3d", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394946422833000.e97cb2d5-9881-4235-9cbe-b09e89345a3d", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "alt-coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "L" + } ], + "system" : "https://terminology.hl7.org/CodeSystem-v2-0396.html#v2-0396-99zzzorL" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394946424490000.d184d05a-b1db-4b66-9d4d-08252963ddee", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394946424490000.d184d05a-b1db-4b66-9d4d-08252963ddee", + "target" : [ { + "reference" : "Patient/1713394946422833000.e97cb2d5-9881-4235-9cbe-b09e89345a3d" + } ], + "recorded" : "2024-04-17T17:02:26Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 new file mode 100644 index 00000000000..69e013fa07c --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-8-test-value-cwe6.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^^^L \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir new file mode 100644 index 00000000000..1136a6f5b14 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.fhir @@ -0,0 +1,150 @@ +{ + "resourceType" : "Bundle", + "id" : "1713394961246624000.1d2e3dda-ad87-4c23-987b-fb39764c0583", + "meta" : { + "lastUpdated" : "2024-04-17T17:02:41.256-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713394961343337000.df80d726-c44a-4bda-887b-34b14155d819" + } + } + }, { + "fullUrl" : "Organization/1713394961343337000.df80d726-c44a-4bda-887b-34b14155d819", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394961343337000.df80d726-c44a-4bda-887b-34b14155d819", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713394961867970000.89364074-9e12-4d8f-a348-b004d2ec6044", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394961867970000.89364074-9e12-4d8f-a348-b004d2ec6044", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713394961880380000.9c763cd1-9084-4532-ae8f-a628cab68fbd", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394961880380000.9c763cd1-9084-4532-ae8f-a628cab68fbd", + "recorded" : "2024-04-17T17:02:41Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713394961879131000.fb0519fa-0180-4f92-a96b-a35b8928432c" + } + } ] + } + }, { + "fullUrl" : "Organization/1713394961879131000.fb0519fa-0180-4f92-a96b-a35b8928432c", + "resource" : { + "resourceType" : "Organization", + "id" : "1713394961879131000.fb0519fa-0180-4f92-a96b-a35b8928432c", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713394961905787000.00bee4b3-ffb2-4ceb-9c95-b8710be9c713", + "resource" : { + "resourceType" : "Patient", + "id" : "1713394961905787000.00bee4b3-ffb2-4ceb-9c95-b8710be9c713", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/code", + "valueCodeableConcept" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.39" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + } ], + "version" : "PrimaryVersion" + } ] + } + } ] + } ] + } + }, { + "fullUrl" : "Provenance/1713394961907071000.dcb049d2-20d1-408c-a835-eb712c8ef064", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713394961907071000.dcb049d2-20d1-408c-a835-eb712c8ef064", + "target" : [ { + "reference" : "Patient/1713394961905787000.00bee4b3-ffb2-4ceb-9c95-b8710be9c713" + } ], + "recorded" : "2024-04-17T17:02:41Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 new file mode 100644 index 00000000000..e00b9b67fa4 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/cwe/codeable-concept/cwe-9-test-value-cwe7.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1||||||||||||||||||||||||||||||||||||||^^^^^^PrimaryVersion \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.csv b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.csv new file mode 100644 index 00000000000..9e60f616dd9 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.csv @@ -0,0 +1,42 @@ +HL7 v2,,,,,,Condition (IF True),,,HL7 FHIR,,,,,,,,,Comments +Sort Order,Identifier,Name,Data Type,Cardinality - Min,Cardinality - Max,Computable ANTLR,Computable FHIRPath,Narrative,FHIR Attribute/ Data Type,,Data Type,Cardinality - Min,Cardinality - Max,Data Type Mapping,"Vocabulary Mapping +(IS, ID, CE, CNE, CWE)",Assignment,, +1,NDL.1,Name,CNN,0,1,,,,practitioner(Practitioner),,Reference(Practitioner),0,1,CNN[Practitioner],,,, +2,NDL.2,Start Date/time,DTM,0,1,,,,period.start,,dateTime,0,1,,,,, +3,NDL.3,End Date/time,DTM,0,1,,,,period.end,,dateTime,0,1,,,,, +4,NDL.4,Point of Care,IS,0,1,,,,[1].identifier,,Identifier,,,HD[Identifier],,,, +4,NDL.4,Point of Care,IS,0,1,,,,[1].mode,,code,0,1,,,"""instance""",, +4,NDL.4,Point of Care,IS,0,1,,,,[1].physicalType.coding.code,,code,0,1,,,/extension??-poc/,, +4,NDL.4,Point of Care,IS,0,1,,,,[1].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +4,NDL.4,Point of Care,IS,0,1,,,,[1].partOf.reference(Location[5]),,string,0,1,,,,, +5,NDL.5,Room,IS,0,1,,,,[2].identifier,,Identifier,,,HD[Identifier],,,, +5,NDL.5,Room,IS,0,1,,,,[2].mode,,code,0,1,,,"""instance""",, +5,NDL.5,Room,IS,0,1,,,,[2].physicalType.coding.code,,code,0,1,,,"""ro""",, +5,NDL.5,Room,IS,0,1,,,,[2].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +5,NDL.5,Room,IS,0,1,,,,[2].partOf.reference(Location[1]),,string,0,1,,,,, +6,NDL.6,Bed,IS,0,1,,,,[3].identifier,,Identifier,,,HD[Identifier],,,, +6,NDL.6,Bed,IS,0,1,,,,[3].mode,,code,0,1,,,"""instance""",, +6,NDL.6,Bed,IS,0,1,,,,[3].physicalType.coding.code,,code,0,1,,,"""bd""",, +6,NDL.6,Bed,IS,0,1,,,,[3].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +6,NDL.6,Bed,IS,0,1,,,,[3].partOf.reference(Location[2]),,string,0,1,,,,, +7,NDL.7,Facility,HD,0,1,,,,[4].identifier,,Identifier,,,HD[Identifier],,,, +7,NDL.7,Facility,HD,0,1,,,,[4].mode,,code,0,1,,,"""instance""",, +7,NDL.7,Facility,HD,0,1,,,,[4].physicalType.coding.code,,code,0,1,,,"""si""",, +7,NDL.7,Facility,HD,0,1,,,,[4].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +8,NDL.8,Location Status,IS,0,1,IF PL.1 AND PL.2 AND PL.3 AND PL.4 AND PL.7 AND PL.8 NOT VALUED,,,[1].status,,,0,1,IS[code],,,, +8,NDL.8,Location Status,IS,0,1,IF PL.2 VALUED,,,[2].status,,,0,1,IS[code],,,, +8,NDL.8,Location Status,IS,0,1,IF PL.3 VALUED,,,[3].status,,,0,1,IS[code],,,, +8,NDL.8,Location Status,IS,0,1,IF PL.4 VALUED,,,[4].status,,,0,1,IS[code],,,, +8,NDL.8,Location Status,IS,0,1,IF PL.7 VALUED,,,[5].status,,,0,1,IS[code],,,, +8,NDL.8,Location Status,IS,0,1,IF PL.8 VALUED,,,[6].status,,,0,1,IS[code],,,, +9,NDL.9,Patient Location Type,IS,0,1,,,,,,,,,,,,, +10,NDL.10,Building,IS,0,1,,,,[5].identifier,,Identifier,,,HD[Identifier],,,, +10,NDL.10,Building,IS,0,1,,,,[5].mode,,code,0,1,,,"""instance""",, +10,NDL.10,Building,IS,0,1,,,,[5].physicalType.coding.code,,code,0,1,,,"""bu""",, +10,NDL.10,Building,IS,0,1,,,,[5].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +10,NDL.10,Building,IS,0,1,,,,[5].partOf.reference(Location[4]),,string,0,1,,,,, +11,NDL.11,Floor,IS,0,1,,,,[6].identifier,,Identifier,,,HD[Identifier],,,, +11,NDL.11,Floor,IS,0,1,,,,[6].mode,,code,0,1,,,"""instance""",, +11,NDL.11,Floor,IS,0,1,,,,[6].physicalType.coding.code,,code,0,1,,,"""lvl""",, +11,NDL.11,Floor,IS,0,1,,,,[6].physicalType.coding.system,,uri,0,1,,,"""http://terminology.hl7.org/CodeSystem/location-physical-type""",, +11,NDL.11,Floor,IS,0,1,,,,[6].partOf.reference(Location[1]),,string,0,1,,,,, \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.fhir new file mode 100644 index 00000000000..d5dee105609 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.fhir @@ -0,0 +1,432 @@ +{ + "resourceType" : "Bundle", + "id" : "1713402340643750000.a7c76342-ec73-43b5-b981-f93d64e96426", + "meta" : { + "lastUpdated" : "2024-04-17T19:05:40.654-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "12345" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "827ccb0e-ea8a-306c-8c34-a16891f84e7b", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "12345" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713402340765606000.da921f56-35c4-42bc-9735-fae128be604c" + } + } + }, { + "fullUrl" : "Organization/1713402340765606000.da921f56-35c4-42bc-9735-fae128be604c", + "resource" : { + "resourceType" : "Organization", + "id" : "1713402340765606000.da921f56-35c4-42bc-9735-fae128be604c", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713402341294938000.1149a934-3f3c-48e2-a458-c8e97f730b3c", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713402341294938000.1149a934-3f3c-48e2-a458-c8e97f730b3c", + "target" : [ { + "reference" : "MessageHeader/827ccb0e-ea8a-306c-8c34-a16891f84e7b" + }, { + "reference" : "DiagnosticReport/1713402341658889000.cce98d75-0790-4cdf-8099-92c05ef21c65" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713402341308904000.f9c49033-7faf-452b-be17-d171b6365d57", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713402341308904000.f9c49033-7faf-452b-be17-d171b6365d57", + "recorded" : "2024-04-17T19:05:41Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713402341307664000.370871f7-7ba1-4fae-baed-7d65a36c26ba" + } + } ] + } + }, { + "fullUrl" : "Organization/1713402341307664000.370871f7-7ba1-4fae-baed-7d65a36c26ba", + "resource" : { + "resourceType" : "Organization", + "id" : "1713402341307664000.370871f7-7ba1-4fae-baed-7d65a36c26ba", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713402341336895000.d90e2351-5caf-4d37-897f-604aaf045333", + "resource" : { + "resourceType" : "Patient", + "id" : "1713402341336895000.d90e2351-5caf-4d37-897f-604aaf045333" + } + }, { + "fullUrl" : "Provenance/1713402341337960000.4e4d9606-632b-40dc-a56a-88e396273619", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713402341337960000.4e4d9606-632b-40dc-a56a-88e396273619", + "target" : [ { + "reference" : "Patient/1713402341336895000.d90e2351-5caf-4d37-897f-604aaf045333" + } ], + "recorded" : "2024-04-17T19:05:41Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "Specimen/1713402341339870000.04564c22-1798-4fab-a325-85328524cfd9", + "resource" : { + "resourceType" : "Specimen", + "id" : "1713402341339870000.04564c22-1798-4fab-a325-85328524cfd9", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "OBR" + } ] + } + }, { + "fullUrl" : "ServiceRequest/1713402341623426000.47819b60-b7d0-48ea-9850-e5ef40b152b4", + "resource" : { + "resourceType" : "ServiceRequest", + "id" : "1713402341623426000.47819b60-b7d0-48ea-9850-e5ef40b152b4", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/obr-observation-request", + "extension" : [ { + "url" : "OBR.25", + "valueId" : "F" + } ] + } ], + "status" : "unknown", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "code" : "68991-9", + "display" : "Epidemiologically Important Information" + } ] + }, + "subject" : { + "reference" : "Patient/1713402341336895000.d90e2351-5caf-4d37-897f-604aaf045333" + } + } + }, { + "fullUrl" : "DiagnosticReport/1713402341658889000.cce98d75-0790-4cdf-8099-92c05ef21c65", + "resource" : { + "resourceType" : "DiagnosticReport", + "id" : "1713402341658889000.cce98d75-0790-4cdf-8099-92c05ef21c65", + "basedOn" : [ { + "reference" : "ServiceRequest/1713402341623426000.47819b60-b7d0-48ea-9850-e5ef40b152b4" + } ], + "status" : "final", + "code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/coding-system-oid", + "valueOid" : "urn:oid:2.16.840.1.113883.6.1" + } ], + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "LN" + } ], + "system" : "http://loinc.org", + "code" : "68991-9", + "display" : "Epidemiologically Important Information" + } ] + }, + "subject" : { + "reference" : "Patient/1713402341336895000.d90e2351-5caf-4d37-897f-604aaf045333" + }, + "performer" : [ { + "reference" : "PractitionerRole/1713402341657180000.ea78d11f-0727-4024-b58f-ed06f954df87" + } ], + "specimen" : [ { + "reference" : "Specimen/1713402341339870000.04564c22-1798-4fab-a325-85328524cfd9" + } ] + } + }, { + "fullUrl" : "Practitioner/1713402341633151000.841c9dc6-8d76-4d1b-9ca5-2b6f4868957d", + "resource" : { + "resourceType" : "Practitioner", + "id" : "1713402341633151000.841c9dc6-8d76-4d1b-9ca5-2b6f4868957d", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cnn-practitioner", + "extension" : [ { + "url" : "CNN.3", + "valueString" : "JAMISON" + }, { + "url" : "CNN.4", + "valueString" : "S" + }, { + "url" : "CNN.5", + "valueString" : "ESQ" + }, { + "url" : "CNN.7", + "valueString" : "MD" + } ] + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-authority", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/namespace-id", + "valueString" : "Assigning Authority" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id", + "valueString" : "2.1.4.1" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id-type", + "valueCode" : "ISO" + } ] + } ], + "value" : "123" + } ], + "name" : [ { + "family" : "DOE", + "given" : [ "JAMISON", "S" ], + "prefix" : [ "DR" ], + "suffix" : [ "ESQ", "MD" ] + } ] + } + }, { + "fullUrl" : "Location/1713402341636260000.77abc5f6-4fad-4392-8fe1-2bd29cf4f189", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341636260000.77abc5f6-4fad-4392-8fe1-2bd29cf4f189", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "Hospital A" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.2,HD.3" + } ], + "type" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/codeable-concept-id", + "valueBoolean" : true + } ], + "code" : "ISO" + } ] + }, + "value" : "2.16.840.1.113883.9.11" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "si" + } ] + } + } + }, { + "fullUrl" : "Location/1713402341652902000.ab4a4061-ba25-4460-87d8-d2a1e85a72b3", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341652902000.ab4a4061-ba25-4460-87d8-d2a1e85a72b3", + "identifier" : [ { + "value" : "Building 123" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "bu" + } ] + } + } + }, { + "fullUrl" : "Location/1713402341653924000.91cb98d9-4a09-4e59-b00c-cca5a0be825c", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341653924000.91cb98d9-4a09-4e59-b00c-cca5a0be825c", + "identifier" : [ { + "value" : "Point of Care" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "_code" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/location-physical-type-poc", + "valueString" : "poc" + } ] + } + } ] + } + } + }, { + "fullUrl" : "Location/1713402341654751000.d0dff123-ba8d-4c73-89b7-26f22890f886", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341654751000.d0dff123-ba8d-4c73-89b7-26f22890f886", + "identifier" : [ { + "value" : "Floor A" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "lvl" + } ] + } + } + }, { + "fullUrl" : "Location/1713402341655633000.ffde10f2-f5d7-4033-bc88-b181fcccaa67", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341655633000.ffde10f2-f5d7-4033-bc88-b181fcccaa67", + "identifier" : [ { + "value" : "Room 101" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "ro" + } ] + } + } + }, { + "fullUrl" : "Location/1713402341656557000.78066d02-7485-4c81-8d46-dd512f4bb10a", + "resource" : { + "resourceType" : "Location", + "id" : "1713402341656557000.78066d02-7485-4c81-8d46-dd512f4bb10a", + "identifier" : [ { + "value" : "Bed A" + } ], + "status" : "active", + "mode" : "instance", + "physicalType" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/location-physical-type", + "code" : "bd" + } ] + } + } + }, { + "fullUrl" : "PractitionerRole/1713402341657180000.ea78d11f-0727-4024-b58f-ed06f954df87", + "resource" : { + "resourceType" : "PractitionerRole", + "id" : "1713402341657180000.ea78d11f-0727-4024-b58f-ed06f954df87", + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/event-performerFunction", + "valueCodeableConcept" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v3-ParticipationType", + "code" : "TRANS" + } ] + } + } ], + "period" : { + "start" : "2023-04-01T10:25:31-04:00", + "_start" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230401102531-0400" + } ] + }, + "end" : "2023-05-01T10:25:31-04:00", + "_end" : { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2-date-time", + "valueString" : "20230501102531-0400" + } ] + } + }, + "practitioner" : { + "reference" : "Practitioner/1713402341633151000.841c9dc6-8d76-4d1b-9ca5-2b6f4868957d" + }, + "location" : [ { + "reference" : "Location/1713402341636260000.77abc5f6-4fad-4392-8fe1-2bd29cf4f189" + }, { + "reference" : "Location/1713402341652902000.ab4a4061-ba25-4460-87d8-d2a1e85a72b3" + }, { + "reference" : "Location/1713402341653924000.91cb98d9-4a09-4e59-b00c-cca5a0be825c" + }, { + "reference" : "Location/1713402341654751000.d0dff123-ba8d-4c73-89b7-26f22890f886" + }, { + "reference" : "Location/1713402341655633000.ffde10f2-f5d7-4033-bc88-b181fcccaa67" + }, { + "reference" : "Location/1713402341656557000.78066d02-7485-4c81-8d46-dd512f4bb10a" + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.hl7 new file mode 100644 index 00000000000..3f8afd2bd7a --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/ndl/NDL-to-PractitionerRole.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|12345||2.5.1|||||USA|UNICODE UTF-8 +PID|1 +OBR|1|||68991-9^Epidemiologically Important Information^LN^^^^^^^^^^^2.16.840.1.113883.6.1|||||||||||||||||||||F||||||||||123&DOE&JAMISON&S&ESQ&DR&MD&&Assigning Authority&2.1.4.1&ISO^20230401102531-0400^20230501102531-0400^Point of Care^Room 101^Bed A^Hospital A&2.16.840.1.113883.9.11&ISO^active^^Building 123^Floor A diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.fhir new file mode 100644 index 00000000000..612f5095cb8 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.fhir @@ -0,0 +1,292 @@ +{ + "resourceType" : "Bundle", + "id" : "1713397228651177000.19b20187-d57d-4002-be82-5d622aef3af9", + "meta" : { + "lastUpdated" : "2024-04-17T17:40:28.661-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "3003786103_4988249_33033" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set", + "valueString" : "UNICODE UTF-8" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "3003786103_4988249_33033" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + }, + "sender" : { + "reference" : "Organization/1713397228750654000.31eaa0ca-8324-423f-8e0e-d5c52dbef89e" + } + } + }, { + "fullUrl" : "Organization/1713397228750654000.31eaa0ca-8324-423f-8e0e-d5c52dbef89e", + "resource" : { + "resourceType" : "Organization", + "id" : "1713397228750654000.31eaa0ca-8324-423f-8e0e-d5c52dbef89e", + "address" : [ { + "country" : "USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713397229260212000.cbff06b7-15a3-4a9c-a306-6d79dd60c1c3", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397229260212000.cbff06b7-15a3-4a9c-a306-6d79dd60c1c3", + "target" : [ { + "reference" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713397229272223000.6cd7f2fd-88cc-40da-875b-b0495acd341d", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397229272223000.6cd7f2fd-88cc-40da-875b-b0495acd341d", + "recorded" : "2024-04-17T17:40:29Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713397229270928000.d90d626b-3155-4fe7-92b5-88d1a69dc26e" + } + } ] + } + }, { + "fullUrl" : "Organization/1713397229270928000.d90d626b-3155-4fe7-92b5-88d1a69dc26e", + "resource" : { + "resourceType" : "Organization", + "id" : "1713397229270928000.d90d626b-3155-4fe7-92b5-88d1a69dc26e", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713397229307935000.bf1aa1af-119b-47e8-ba95-0beda22f25eb", + "resource" : { + "resourceType" : "Patient", + "id" : "1713397229307935000.bf1aa1af-119b-47e8-ba95-0beda22f25eb", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier", + "extension" : [ { + "url" : "CX.5", + "valueString" : "MR" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.3" + } ], + "type" : { + "coding" : [ { + "code" : "MR" + } ] + }, + "value" : "11102779" + } ], + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "BB SARAH" + }, { + "url" : "XPN.7", + "valueString" : "L" + } ] + } ], + "use" : "official", + "family" : "SMITH", + "given" : [ "BB SARAH" ] + } ], + "contact" : [ { + "name" : { }, + "organization" : { + "reference" : "Organization/1713397229301786000.53fb6c0d-8b74-47dd-a41e-3af1ad67dbdf" + } + } ] + } + }, { + "fullUrl" : "Organization/1713397229301786000.53fb6c0d-8b74-47dd-a41e-3af1ad67dbdf", + "resource" : { + "resourceType" : "Organization", + "id" : "1713397229301786000.53fb6c0d-8b74-47dd-a41e-3af1ad67dbdf", + "contact" : [ { + "address" : { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract", + "valueCode" : "6059" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "4861" + }, { + "url" : "SAD.2", + "valueString" : "20TH AVE" + }, { + "url" : "SAD.3", + "valueString" : "1" + } ] + }, { + "url" : "XAD.2", + "valueString" : "Other Designation" + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "H" + }, { + "url" : "XAD.8", + "valueString" : "Other Geographic Designation" + }, { + "url" : "XAD.11", + "valueCode" : "A" + }, { + "url" : "XAD.13", + "valueString" : "20220501102531-0400" + } ] + } ], + "use" : "home", + "line" : [ "4861", "20TH AVE", "1", "Other Designation" ], + "city" : "THUNDER MOUNTAIN", + "district" : "County", + "state" : "IG", + "postalCode" : "99999", + "country" : "USA", + "period" : { + "start" : "2022-05-01T10:25:31-04:00" + } + } + } ] + } + }, { + "fullUrl" : "Provenance/1713397229312286000.d9d0364e-a4c7-4895-b64c-f84c032bce3f", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397229312286000.d9d0364e-a4c7-4895-b64c-f84c032bce3f", + "target" : [ { + "reference" : "Patient/1713397229307935000.bf1aa1af-119b-47e8-ba95-0beda22f25eb" + } ], + "recorded" : "2024-04-17T17:40:29Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + }, { + "fullUrl" : "RelatedPerson/1713397229317429000.90600892-04fc-4700-98a2-9b84dc8d3670", + "resource" : { + "resourceType" : "RelatedPerson", + "id" : "1713397229317429000.90600892-04fc-4700-98a2-9b84dc8d3670", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Segment", + "valueString" : "NK1" + } ], + "patient" : { + "reference" : "Patient/1713397229307935000.bf1aa1af-119b-47e8-ba95-0beda22f25eb" + }, + "address" : [ { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract", + "valueCode" : "6059" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "NK1.32" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "4861" + }, { + "url" : "SAD.2", + "valueString" : "20TH AVE" + }, { + "url" : "SAD.3", + "valueString" : "1" + } ] + }, { + "url" : "XAD.2", + "valueString" : "Other Designation" + }, { + "url" : "XAD.6", + "valueString" : "USA" + }, { + "url" : "XAD.7", + "valueCode" : "H" + }, { + "url" : "XAD.8", + "valueString" : "Other Geographic Designation" + }, { + "url" : "XAD.11", + "valueCode" : "A" + }, { + "url" : "XAD.13", + "valueString" : "20220501102531-0400" + } ] + } ], + "use" : "home", + "line" : [ "4861", "20TH AVE", "1", "Other Designation" ], + "city" : "THUNDER MOUNTAIN", + "district" : "County", + "state" : "IG", + "postalCode" : "99999", + "country" : "USA", + "period" : { + "start" : "2022-05-01T10:25:31-04:00" + } + } ] + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.hl7 new file mode 100644 index 00000000000..1bec780fb79 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xad/xad-to-address.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|3003786103_4988249_33033||2.5.1|||||USA|UNICODE UTF-8 +PID|1||11102779^^^^MR||SMITH^BB SARAH^^^^^L +NK1|1|||||||||||||||||||||||||||||||4861&20TH AVE&1^Other Designation^THUNDER MOUNTAIN^IG^99999^USA^H^Other Geographic Designation^County^6059^A^^20220501102531-0400 \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.fhir new file mode 100644 index 00000000000..e8ac64cff2f --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.fhir @@ -0,0 +1,279 @@ +{ + "resourceType" : "Bundle", + "id" : "1713397874689602000.e869eee2-21c7-4524-b115-3f7656fe34a3", + "meta" : { + "lastUpdated" : "2024-04-17T17:51:14.701-06:00" + }, + "identifier" : { + "system" : "https://reportstream.cdc.gov/prime-router", + "value" : "3003786103_4988249_33033" + }, + "type" : "message", + "timestamp" : "2023-05-01T08:25:31.000-06:00", + "entry" : [ { + "fullUrl" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "resource" : { + "resourceType" : "MessageHeader", + "id" : "0993dd0b-6ce5-3caf-a177-0b81cc780c18", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters", + "valueString" : "^~\\&#" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header", + "extension" : [ { + "url" : "MSH.7", + "valueString" : "20230501102531-0400" + }, { + "url" : "MSH.10", + "valueString" : "3003786103_4988249_33033" + } ] + } ], + "eventCoding" : { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0003", + "code" : "R01", + "display" : "ORU^R01^ORU_R01" + } + } + }, { + "fullUrl" : "Provenance/1713397875332640000.2d8a482b-3fee-4c98-ac41-5f0ee98f684c", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397875332640000.2d8a482b-3fee-4c98-ac41-5f0ee98f684c", + "target" : [ { + "reference" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18" + } ], + "recorded" : "2023-05-01T10:25:31-04:00", + "activity" : { + "coding" : [ { + "display" : "ORU^R01^ORU_R01" + } ] + } + } + }, { + "fullUrl" : "Provenance/1713397875346924000.2c8b59d8-6f33-498b-a442-52096a9bbd11", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397875346924000.2c8b59d8-6f33-498b-a442-52096a9bbd11", + "recorded" : "2024-04-17T17:51:15Z", + "policy" : [ "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" ], + "activity" : { + "coding" : [ { + "code" : "v2-FHIR transformation" + } ] + }, + "agent" : [ { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code" : "assembler" + } ] + }, + "who" : { + "reference" : "Organization/1713397875345900000.6c0d6b51-b102-45e7-ac67-220b1a6212cf" + } + } ] + } + }, { + "fullUrl" : "Organization/1713397875345900000.6c0d6b51-b102-45e7-ac67-220b1a6212cf", + "resource" : { + "resourceType" : "Organization", + "id" : "1713397875345900000.6c0d6b51-b102-45e7-ac67-220b1a6212cf", + "identifier" : [ { + "value" : "CDC PRIME - Atlanta" + }, { + "type" : { + "coding" : [ { + "system" : "http://terminology.hl7.org/CodeSystem/v2-0301" + } ] + }, + "system" : "urn:ietf:rfc:3986", + "value" : "2.16.840.1.114222.4.1.237821" + } ] + } + }, { + "fullUrl" : "Patient/1713397875394360000.fcbe0e5f-e307-4d56-8d09-0d35e677ab18", + "resource" : { + "resourceType" : "Patient", + "id" : "1713397875394360000.fcbe0e5f-e307-4d56-8d09-0d35e677ab18", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/pid-patient", + "extension" : [ { + "url" : "PID.8", + "valueString" : "U" + }, { + "url" : "PID.30", + "valueString" : "N" + } ] + }, { + "url" : "http://ibm.com/fhir/cdm/StructureDefinition/local-race-cd", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "NULLFL" + } ], + "version" : "2.5.1", + "code" : "ASKU", + "display" : "Asked, but unknown" + } ] + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/ethnic-group", + "valueCodeableConcept" : { + "coding" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString" : "coding" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString" : "HL70189" + } ], + "system" : "http://terminology.hl7.org/CodeSystem/v2-0189", + "version" : "2.9", + "code" : "N", + "display" : "Non Hispanic or Latino" + } ] + } + } ], + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-facility", + "valueReference" : { + "reference" : "Organization/1713397875354960000.bdf4bbf7-93e2-4594-a1fe-a30d30673e5c" + } + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/cx-identifier", + "extension" : [ { + "url" : "CX.5", + "valueString" : "PI" + } ] + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "PID.3" + } ], + "type" : { + "coding" : [ { + "code" : "PI" + } ] + }, + "value" : "kc3oy" + } ], + "name" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xpn-human-name", + "extension" : [ { + "url" : "XPN.2", + "valueString" : "Stephenie" + }, { + "url" : "XPN.3", + "valueString" : "Davis" + }, { + "url" : "XPN.7", + "valueString" : "L" + } ] + } ], + "use" : "official", + "family" : "Schaefer", + "given" : [ "Stephenie", "Davis" ] + } ], + "telecom" : [ { + "extension" : [ { + "url" : "http://hl7.org/fhir/StructureDefinition/contactpoint-country", + "valueString" : "1" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/contactpoint-area", + "valueString" : "260" + }, { + "url" : "http://hl7.org/fhir/StructureDefinition/contactpoint-local", + "valueString" : "7595016" + }, { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "PRN" + }, { + "url" : "XTN.3", + "valueString" : "BP" + }, { + "url" : "XTN.7", + "valueString" : "7595016" + }, { + "url" : "XTN.11", + "valueString" : "42" + }, { + "url" : "XTN.12", + "valueString" : "+1 260 759 5016" + } ] + } ], + "system" : "pager", + "value" : "+1 260 759 5016", + "use" : "home" + }, { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xtn-contact-point", + "extension" : [ { + "url" : "XTN.2", + "valueString" : "PRN" + }, { + "url" : "XTN.3", + "valueString" : "Internet" + }, { + "url" : "XTN.4", + "valueString" : "otto.daugherty@email.com" + } ] + } ], + "system" : "email", + "value" : "otto.daugherty@email.com", + "use" : "home" + } ], + "gender" : "unknown", + "deceasedBoolean" : false, + "address" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/xad-address", + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/sad-address-line", + "extension" : [ { + "url" : "SAD.1", + "valueString" : "96633 Gilberto Course" + } ] + } ] + } ], + "line" : [ "96633 Gilberto Course" ], + "state" : "IG" + } ] + } + }, { + "fullUrl" : "Organization/1713397875354960000.bdf4bbf7-93e2-4594-a1fe-a30d30673e5c", + "resource" : { + "resourceType" : "Organization", + "id" : "1713397875354960000.bdf4bbf7-93e2-4594-a1fe-a30d30673e5c", + "identifier" : [ { + "extension" : [ { + "url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString" : "HD.1" + } ], + "value" : "Any lab USA" + } ] + } + }, { + "fullUrl" : "Provenance/1713397875402545000.10ef5fae-8d8a-4b31-88c8-0e97975b0e25", + "resource" : { + "resourceType" : "Provenance", + "id" : "1713397875402545000.10ef5fae-8d8a-4b31-88c8-0e97975b0e25", + "target" : [ { + "reference" : "Patient/1713397875394360000.fcbe0e5f-e307-4d56-8d09-0d35e677ab18" + } ], + "recorded" : "2024-04-17T17:51:15Z", + "activity" : { + "coding" : [ { + "system" : "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code" : "UPDATE" + } ] + } + } + } ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.hl7 new file mode 100644 index 00000000000..59f3487b982 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/v251/xtn/xtn-to-contact-point.hl7 @@ -0,0 +1,2 @@ +MSH|^~\&#|||||20230501102531-0400||ORU^R01^ORU_R01|3003786103_4988249_33033||2.5.1 +PID|1||kc3oy^^^^PI^Any lab USA||Schaefer^Stephenie^Davis^^^^L|||U||ASKU^Asked, but unknown^NULLFL^^^^2.5.1|96633 Gilberto Course^^^IG||^PRN^BP^^1^260^7595016^^^^42^+1 260 759 5016~^PRN^Internet^otto.daugherty@email.com|||||||||N^Non Hispanic or Latino^HL70189^^^^2.9||||||||N diff --git a/prime-router/src/testIntegration/resources/datatests/translation-test-config.csv b/prime-router/src/testIntegration/resources/datatests/translation-test-config.csv index 4e0b4b8b346..98ca0f96664 100644 --- a/prime-router/src/testIntegration/resources/datatests/translation-test-config.csv +++ b/prime-router/src/testIntegration/resources/datatests/translation-test-config.csv @@ -61,7 +61,6 @@ FHIR_to_HL7/sample_NH_20240716-0001.fhir,,FHIR_to_HL7/sample_NH_202407016-0001.h FHIR_to_HL7/sample_IL_20240802-0001.fhir,,FHIR_to_HL7/sample_IL_20240802-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/IL/IL-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" FHIR_to_HL7/sample_WA_20240719-0001.fhir,,FHIR_to_HL7/sample_WA_20240719-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/WA/WA-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","wa-phd.full-elr","","" FHIR_to_HL7/sample_OH_20240718-0001.fhir,,FHIR_to_HL7/sample_OH_20240718-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/OH/OH-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" -FHIR_to_HL7/sample_NJ_20240719-0001.fhir,,FHIR_to_HL7/sample_NJ_20240719-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","nj-doh.full-elr","","classpath:/metadata/fhir_transforms/common/suppress-device-information.yml" FHIR_to_HL7/sample_ND_20240819-0001.fhir,,FHIR_to_HL7/sample_ND_20240819-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/ND/ND-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" FHIR_to_HL7/sample_LA_20240806-0001.fhir,,FHIR_to_HL7/sample_LA_20240806-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/LA/LA-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","classpath:/metadata/fhir_transforms/receivers/reference-range-enrichment.yml" FHIR_to_HL7/sample_MN_20240816-0001.fhir,,FHIR_to_HL7/sample_MN_20240816-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/MN/MN-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" @@ -69,5 +68,4 @@ FHIR_to_HL7/sample_MA_20240805-0001.fhir,,FHIR_to_HL7/sample_MA_20240805-0001.hl FHIR_to_HL7/sample_AR_20240805-0001.fhir,,FHIR_to_HL7/sample_AR_20240805-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/AR/AR-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" FHIR_to_HL7/sample_ME_20240806-0001.fhir,,FHIR_to_HL7/sample_ME_20240806-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/ME/ME-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" FHIR_to_HL7/sample_SR_CSVUPLOADER_20240819-0001.fhir,,FHIR_to_HL7/sample_SR_CSVUPLOADER_20240819-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/MA/MA-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" -FHIR_to_HL7/mars_unwanted_condition_to_notes.fhir,,FHIR_to_HL7/mars_unwanted_condition_to_notes.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/Test/test-receiver-transform.yml,HL7,PASS,,,classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml,,, -FHIR_to_HL7/sample_SR_ENTEREDINERROR_20240904-0001.fhir,,FHIR_to_HL7/sample_SR_ENTEREDINERROR_20240904-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/CA/CA-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" +FHIR_to_HL7/sample_SR_ENTEREDINERROR_20240904-0001.fhir,,FHIR_to_HL7/sample_SR_ENTEREDINERROR_20240904-0001.hl7,classpath:/metadata/hl7_mapping/receivers/STLTs/CA/CA-receiver-transform.yml,HL7,PASS,"","","classpath:/metadata/fhir_transforms/senders/SimpleReport/simple-report-sender-transform.yml","","","" \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/settings/organizations.yml b/prime-router/src/testIntegration/resources/settings/organizations.yml index e2ab115bb0c..e24a013057e 100644 --- a/prime-router/src/testIntegration/resources/settings/organizations.yml +++ b/prime-router/src/testIntegration/resources/settings/organizations.yml @@ -667,116 +667,6 @@ enrichmentSchemaNames: [] timeZone: "PACIFIC" dateTimeFormat: "LOCAL" -- name: "nj-doh" - description: "New Jersey Department of Health" - jurisdiction: "STATE" - stateCode: "NJ" - countyName: null - filters: null - featureFlags: null - keys: null - senders: [] - receivers: - - name: "full-elr" - organizationName: "nj-doh" - topic: "full-elr" - customerStatus: "active" - translation: ! - schemaName: "classpath:/metadata/hl7_mapping/receivers/STLTs/NJ/NJ-receiver-transform.yml" - useTestProcessingMode: false - useBatchHeaders: true - receivingApplicationName: null - receivingApplicationOID: null - receivingFacilityName: null - receivingFacilityOID: null - messageProfileId: null - replaceValue: { } - replaceValueAwithB: { } - reportingFacilityName: null - reportingFacilityId: null - reportingFacilityIdType: null - suppressQstForAoe: false - suppressHl7Fields: null - suppressAoe: false - defaultAoeToUnknown: false - replaceUnicodeWithAscii: false - useBlankInsteadOfUnknown: null - truncateHDNamespaceIds: true - truncateHl7Fields: "OBX-23-1,ORC-12-3,OBR-16-3,OBX-17-1,ORC-12-1,OBR-16-1" - usePid14ForPatientEmail: false - convertTimestampToDateTime: null - cliaForOutOfStateTesting: null - cliaForSender: { } - phoneNumberFormatting: "STANDARD" - suppressNonNPI: false - processingModeCode: null - replaceDiiWithOid: null - applyOTCDefault: false - useOrderingFacilityName: "STANDARD" - valueSetOverrides: { } - nameFormat: "STANDARD" - receivingOrganization: null - convertPositiveDateTimeOffsetToNegative: false - stripInvalidCharsRegex: null - convertDateTimesToReceiverLocalTime: false - useHighPrecisionHeaderDateTimeFormat: false - type: "HL7" - truncationConfig: - truncateHDNamespaceIds: true - truncateHl7Fields: - - "OBX-23-1" - - "ORC-12-3" - - "OBR-16-3" - - "OBX-17-1" - - "ORC-12-1" - - "OBR-16-1" - customLengthHl7Fields: { } - jurisdictionalFilter: - - "(Bundle.entry.resource.ofType(ServiceRequest)[0].requester.resolve().organization.resolve().address.state.exists() and Bundle.entry.resource.ofType(ServiceRequest)[0].requester.resolve().organization.resolve().address.state = 'NJ') or (Bundle.entry.resource.ofType(Patient).address.state.exists() and Bundle.entry.resource.ofType(Patient).address.state = 'NJ')" - qualityFilter: - # hasOneOf(patient_street, patient_zip_code, patient_phone_number, patient_email) - - "Bundle.entry.resource.ofType(Patient).where(address.line[0].empty() and address.postalCode.empty() and telecom.where(system = 'phone').value.empty() and telecom.where(system = 'email').value.empty()).count() = 0" - # hasOneOf(order_test_date, specimen_collection_date_time, test_result_date) - - "Bundle.entry.resource.ofType(DiagnosticReport).where(basedOn.resolve().extension('https://reportstream.cdc.gov/fhir/StructureDefinition/effective-date').empty() and specimen.resolve().collection.collected.empty() and effective.empty() and issued.empty() and result.resolve().effective.empty()).count() = 0" - # isValidClia(testing_lab_clia) - - "Bundle.entry.resource.ofType(ServiceRequest).performer.resolve().identifier.where(type.coding.code = 'CLIA').value.getIdType() = 'CLIA'" - # hasValidData(patient_last_name, patient_first_name, patient_dob) - - "Bundle.entry.resource.ofType(Patient).where(name.family.empty() or name.given.empty() or birthDate.empty()).count() = 0" - # hasValidData(specimen_type) - - "Bundle.entry.resource.ofType(Specimen).where(type.empty()).count() = 0" - # hasValidData(message_id) - - "Bundle.identifier.value.empty().not()" - # hasValidData(equipment_model_name, test_result) - - "Bundle.entry.resource.ofType(DiagnosticReport).result.resolve().where(method.empty() or value.coding.code.empty()).count() = 0" - routingFilter: [ ] - processingModeFilter: - # matches(processing_mode_code, P) - - "Bundle.entry.resource.ofType(MessageHeader).meta.tag.where(system = 'http://terminology.hl7.org/CodeSystem/v2-0103').code = 'P'" - reverseTheQualityFilter: false - deidentify: false - deidentifiedValue: "" - timing: - operation: "MERGE" - numberPerDay: 1440 - initialTime: "09:40" - timeZone: "EASTERN" - maxReportCount: 100 - whenEmpty: - action: "NONE" - onlyOncePerDay: false - description: "" - transport: ! - type: SFTP - host: sftp - port: 22 - filePath: ./upload - credentialName: DEFAULT-SFTP - conditionFilter: [ ] - mappedConditionFilter: [ ] - externalName: null - enrichmentSchemaNames: ["classpath:/metadata/fhir_transforms/common/suppress-device-information.yml" ] - timeZone: null - dateTimeFormat: "OFFSET" - name: "mo-phd" description: "Missouri Public Health Department" jurisdiction: "STATE" diff --git a/prime-router/upload_swaggerui.sh b/prime-router/upload_swaggerui.sh index 089c2708967..138a9558e92 100755 --- a/prime-router/upload_swaggerui.sh +++ b/prime-router/upload_swaggerui.sh @@ -25,7 +25,7 @@ set -e which az if [ $? -eq 0 ]; then - AzureWebJobsStorage="${AzureWebJobsStorage:-DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;}" + AzureWebJobsStorage="${AzureWebJobsStorage:-DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;}" swagger_ui_dir_in_container="/prime-data-hub-router/swagger-ui" swagger_ui_dir_on_host="./build/swagger-ui" apidocs_container_name="apidocs" diff --git a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/BlobUtils.kt b/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/BlobUtils.kt deleted file mode 100644 index cff4360ffc4..00000000000 --- a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/BlobUtils.kt +++ /dev/null @@ -1,29 +0,0 @@ -package gov.cdc.prime.reportstream.shared - -import java.security.MessageDigest - -object BlobUtils { - - /** - * Create a hex string style of a digest. - */ - fun digestToString(digest: ByteArray): String { - return digest.joinToString(separator = "", limit = 40) { Integer.toHexString(it.toInt()) } - } - - /** - * Hash a ByteArray [input] with SHA 256 - */ - fun sha256Digest(input: ByteArray): ByteArray { - return hashBytes("SHA-256", input) - } - - /** - * Hash a ByteArray [input] with method [type] - */ - private fun hashBytes(type: String, input: ByteArray): ByteArray { - return MessageDigest - .getInstance(type) - .digest(input) - } -} \ No newline at end of file diff --git a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/QueueMessage.kt b/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/QueueMessage.kt deleted file mode 100644 index f10cd20d744..00000000000 --- a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/QueueMessage.kt +++ /dev/null @@ -1,196 +0,0 @@ -package gov.cdc.prime.reportstream.shared - -import com.fasterxml.jackson.annotation.JsonSubTypes -import com.fasterxml.jackson.annotation.JsonTypeInfo -import com.fasterxml.jackson.annotation.JsonTypeName -import com.fasterxml.jackson.databind.DeserializationFeature -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.json.JsonMapper -import com.fasterxml.jackson.databind.jsontype.BasicPolymorphicTypeValidator -import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder -import com.fasterxml.jackson.module.kotlin.readValue -import java.util.Base64 -import java.util.UUID - -// This is a size limit dictated by our infrastructure in azure -// https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted -private const val MESSAGE_SIZE_LIMIT = 64 * 1000 - -/** - * Interface representing a message that can be placed on an Azure Queue. - * This interface supports serialization and deserialization for handling - * different types of queue messages. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonSubTypes( - JsonSubTypes.Type(QueueMessage.ReceiveQueueMessage::class, name = "receive") -) -interface QueueMessage { - - /** - * Name of the Azure Queue where the message should be placed. - */ - val messageQueueName: String - - /** - * Serializes the message object into a Base64 encoded JSON string. - * Throws an exception if the message exceeds the predefined size limit. - * - * @return Base64 encoded string of the message. - */ - fun serialize(): String { - val bytes = mapper.writeValueAsBytes(this) - check(bytes.size < MESSAGE_SIZE_LIMIT) { "Message is too big for the queue." } - return String(Base64.getEncoder().encode(bytes)) - } - - companion object { - /** - * Jackson JSON mapper configured to handle polymorphic types. - */ - val mapper: JsonMapper = ObjectMapperProvider.mapper - - /** - * Deserializes a Base64 encoded JSON string into a gov.cdc.prime.reportstream.shared.QueueMessage object. - * - * @param s Base64 encoded string representing the message. - * @return Deserialized gov.cdc.prime.reportstream.shared.QueueMessage object. - */ - fun deserialize(s: String): QueueMessage = mapper.readValue(s) - - /** - * Returns a JSON string representation of the gov.cdc.prime.reportstream.shared.QueueMessage object. - * - * @return JSON string representation. - */ - override fun toString(): String = mapper.writeValueAsString(this) - - /** - * Constant for receive queue on UP - */ - const val elrReceiveQueueName = "elr-fhir-receive" - - /** - * Constant for convert queue on UP - */ - const val elrConvertQueueName = "elr-fhir-convert" - - /** - * Constant for destination filter queue on UP - */ - const val elrDestinationFilterQueueName = "elr-fhir-destination-filter" - - /** - * Constant for receiver filter queue on UP - */ - const val elrReceiverFilterQueueName = "elr-fhir-receiver-filter" - - /** - * Constant for translation queue on UP - */ - const val elrTranslationQueueName = "elr-fhir-translate" - - /** - * Constant for send queue - */ - const val elrSendQueueName = "send" - } - - /** - * Interface representing information about a report to be processed. - */ - interface ReportInformation { - /** - * URL of the blob storage containing the report. - */ - val blobURL: String - - /** - * Digest (hash) of the report for integrity verification. - */ - val digest: String - - /** - * Subfolder name in the blob storage where the report is stored. - */ - val blobSubFolderName: String - - /** - * Unique identifier of the report. - */ - val reportId: UUID - } - - /** - * Interface representing additional information required for receiving a message. - */ - interface ReceiveInformation { - /** - * Additional headers associated with the message. - */ - val headers: Map - } - - /** - * Data class representing a specific type of gov.cdc.prime.reportstream.shared.QueueMessage meant for receiving - * FHIR (Fast Healthcare Interoperability Resources) data. It implements both - * ReportInformation and ReceiveInformation interfaces. - * - * @property blobURL The URL of the blob storage containing the report. - * @property digest The digest (hash) of the report. - * @property blobSubFolderName The subfolder name in the blob storage. - * @property reportId The unique identifier of the report. - * @property headers Additional headers associated with the message. - */ - @JsonTypeName("receive-fhir") - data class ReceiveQueueMessage( - override val blobURL: String, - override val digest: String, - override val blobSubFolderName: String, - override val reportId: UUID, - override val headers: Map, - ) : QueueMessage, - ReportInformation, - ReceiveInformation { - override val messageQueueName = elrReceiveQueueName - } - - /** - * Singleton object responsible for providing and configuring the Jackson ObjectMapper - * used for serializing and deserializing QueueMessages. The ObjectMapper is configured - * to support polymorphic types. - */ - object ObjectMapperProvider { - - /** - * Polymorphic Type Validator to allow base and subtypes for gov.cdc.prime.reportstream.shared.QueueMessage. - */ - private val ptv = BasicPolymorphicTypeValidator.builder() - .allowIfBaseType(QueueMessage::class.java) - .allowIfSubType(LinkedHashMap::class.java) - .build() - - /** - * Configured Jackson JSON mapper with polymorphic type handling. - */ - val mapper: JsonMapper = jacksonMapperBuilder() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - .polymorphicTypeValidator(ptv) - .activateDefaultTyping(ptv, ObjectMapper.DefaultTyping.NON_FINAL) - .build() - - /** - * Registers additional subtypes for gov.cdc.prime.reportstream.shared.QueueMessage deserialization. - * - * @param subtypes Additional subtypes to be registered. - */ - fun registerSubtypes(vararg subtypes: Class) { - mapper.registerSubtypes(*subtypes) - } - - init { - // Register common subtypes here. In this case, registering ReceiveQueueMessage. - mapper.registerSubtypes(ReceiveQueueMessage::class.java) - } - } -} \ No newline at end of file diff --git a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/Submission.kt b/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/Submission.kt deleted file mode 100644 index a16924e6e6a..00000000000 --- a/shared/src/main/kotlin/gov/cdc/prime/reportstream/shared/Submission.kt +++ /dev/null @@ -1,52 +0,0 @@ -package gov.cdc.prime.reportstream.shared - -import com.azure.data.tables.models.TableEntity - -/** - * Represents a submission entity to be stored in Azure Table Storage. - * - * @property submissionId The unique identifier for the submission, used as the PartitionKey. - * @property status The status of the submission, used as the RowKey. - * @property bodyURL The URL pointing to the body of the submission. - * @property detail Optional additional details about the submission. - */ -data class Submission( - val submissionId: String, - val status: String, - val bodyURL: String, - val detail: String? = null, -) { - companion object { - /** - * Creates a SubmissionEntity from a TableEntity. - * - * @param tableEntity The TableEntity to convert. - * @return The corresponding SubmissionEntity. - */ - fun fromTableEntity(tableEntity: TableEntity): Submission { - return Submission( - submissionId = tableEntity.partitionKey, - status = tableEntity.rowKey, - bodyURL = tableEntity.getProperty("body_url") as String, - detail = tableEntity.getProperty("detail") as String? - ) - } - } - - /** - * Converts this SubmissionEntity into an Azure TableEntity. - * The PartitionKey is set to the submissionId, and the RowKey is set to the status. - * Additional properties (bodyURL and detail) are included as part of the TableEntity. - * - * @return A TableEntity object that can be inserted into an Azure Table. - */ - fun toTableEntity(): TableEntity { - return TableEntity(submissionId, status) - .setProperties( - mapOf( - "body_url" to bodyURL, - "detail" to detail.takeIf { it != null } - ) - ) - } -} \ No newline at end of file diff --git a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/SubmissionReceivedEvent.kt b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/ReportReceivedEvent.kt similarity index 90% rename from submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/SubmissionReceivedEvent.kt rename to submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/ReportReceivedEvent.kt index 61c348c0aa6..d68f8c5e05e 100644 --- a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/SubmissionReceivedEvent.kt +++ b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/ReportReceivedEvent.kt @@ -3,7 +3,7 @@ package gov.cdc.prime.reportstream.submissions import java.time.Instant import java.util.UUID -data class SubmissionReceivedEvent( +data class ReportReceivedEvent( val timeStamp: Instant, val reportId: UUID, val parentReportId: UUID, diff --git a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/config/AzureConfig.kt b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/config/AzureConfig.kt index f46897339fe..77c1cf0cd0d 100644 --- a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/config/AzureConfig.kt +++ b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/config/AzureConfig.kt @@ -27,18 +27,10 @@ class AzureConfig { @Bean fun blobContainerClient(): BlobContainerClient { - val blobServiceClient = BlobServiceClientBuilder() + return BlobServiceClientBuilder() .connectionString(connectionString) .buildClient() - - val blobContainerClient = blobServiceClient.getBlobContainerClient(containerName) - - // Create the container if it doesn't exist - if (!blobContainerClient.exists()) { - blobContainerClient.create() - } - - return blobContainerClient + .getBlobContainerClient(containerName) } @Bean diff --git a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/controllers/SubmissionController.kt b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/controllers/SubmissionController.kt index 1e7612810d3..4c07d8c2858 100644 --- a/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/controllers/SubmissionController.kt +++ b/submissions/src/main/kotlin/gov/cdc/prime/reportstream/submissions/controllers/SubmissionController.kt @@ -1,14 +1,13 @@ package gov.cdc.prime.reportstream.submissions.controllers import com.azure.data.tables.TableClient +import com.azure.data.tables.models.TableEntity import com.azure.storage.blob.BlobContainerClient import com.azure.storage.queue.QueueClient import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import gov.cdc.prime.reportstream.shared.BlobUtils -import gov.cdc.prime.reportstream.shared.QueueMessage -import gov.cdc.prime.reportstream.shared.Submission -import gov.cdc.prime.reportstream.submissions.SubmissionReceivedEvent +import gov.cdc.prime.reportstream.shared.SubmissionQueueMessage +import gov.cdc.prime.reportstream.submissions.ReportReceivedEvent import gov.cdc.prime.reportstream.submissions.TelemetryService import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus @@ -76,7 +75,6 @@ class SubmissionController( // Convert data to ByteArray val dataByteArray = data.toByteArray() - val digest = BlobUtils.sha256Digest(dataByteArray) logger.debug("Converted report data to ByteArray") // Upload to blob storage @@ -86,12 +84,18 @@ class SubmissionController( // Insert into Table // TableEntity() sets PartitionKey and RowKey. Both are required by azure and combine to create the PK - val tableEntity = Submission(reportId.toString(), status, blobClient.blobUrl).toTableEntity() - tableClient.createEntity(tableEntity) + val tableEntity = TableEntity(reportReceivedTime.toString(), reportId.toString()) + val tableProperties = mapOf( + "report_received_time" to reportReceivedTime.toString(), + "report_accepted_time" to reportReceivedTime.toString(), // Will be updated when the report is accepted + "report_id" to reportId.toString(), + "status" to status + ) + tableClient.createEntity(tableEntity.setProperties(tableProperties)) logger.info("Inserted report into table storage: reportId=$reportId") // Create and publish custom event - val submissionReceivedEvent = SubmissionReceivedEvent( + val reportReceivedEvent = ReportReceivedEvent( timeStamp = reportReceivedTime, reportId = reportId, parentReportId = reportId, @@ -102,30 +106,25 @@ class SubmissionController( fileSize = contentLength, blobUrl = blobClient.blobUrl ) - logger.debug("Created SUBMISSION_RECEIVED") + logger.debug("Created ReportReceivedEvent") // Log to Application Insights telemetryService.trackEvent( - "SUBMISSION_RECEIVED", - mapOf("event" to objectMapper.writeValueAsString(submissionReceivedEvent)), + "ReportReceivedEvent", + mapOf("event" to objectMapper.writeValueAsString(reportReceivedEvent)), ) telemetryService.flush() - logger.info("Tracked SUBMISSION_RECEIVED with Application Insights") + logger.info("Tracked ReportReceivedEvent with Application Insights") // Queue upload should occur as the last step ensuring the other steps successfully process // Create the message for the queue - val message = QueueMessage.ReceiveQueueMessage( - blobClient.blobUrl, - BlobUtils.digestToString(digest), - clientId.lowercase(), - reportId, - filterHeaders(headers).toMap(), - ).serialize() + val message = SubmissionQueueMessage(reportId, blobClient.blobUrl, filterHeaders(headers)) + val messageString = objectMapper.writeValueAsString(message) logger.debug("Created message for queue") // Upload to Queue queueClient.createIfNotExists() - queueClient.sendMessage(message) + queueClient.sendMessage(messageString) logger.info("Sent message to queue: queueName=${queueClient.queueName}") val response = @@ -220,9 +219,8 @@ class SubmissionController( } private fun filterHeaders(headers: Map): Map { - val headersToInclude = - listOf("client_id", "content-type", "payloadname", "x-azure-clientip", "content-length") - return headers.filter { it.key.lowercase() in headersToInclude } + val headersToInclude = listOf("client_id", "Content-Type", "payloadname", "x-azure-clientip") + return headers.filter { it.key in headersToInclude } } private fun formBlobName( diff --git a/submissions/src/main/resources/application.properties b/submissions/src/main/resources/application.properties index 14a3fe573d2..466020a58e1 100644 --- a/submissions/src/main/resources/application.properties +++ b/submissions/src/main/resources/application.properties @@ -2,5 +2,5 @@ spring.application.name=submissions server.port=8880 azure.storage.connection-string=${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;} azure.storage.container-name=${AZURE_STORAGE_CONTAINER_NAME:reports} -azure.storage.queue-name=${AZURE_STORAGE_QUEUE_NAME:elr-fhir-receive} -azure.storage.table-name=${AZURE_STORAGE_TABLE_NAME:submission} \ No newline at end of file +azure.storage.queue-name=${AZURE_STORAGE_QUEUE_NAME:elr-fhir-convert} +azure.storage.table-name=${AZURE_STORAGE_TABLE_NAME:submissions} \ No newline at end of file diff --git a/submissions/src/test/kotlin/SubmissionControllerIntegrationTest.kt b/submissions/src/test/kotlin/SubmissionControllerIntegrationTest.kt index 50255bb05e6..77b2415ba40 100644 --- a/submissions/src/test/kotlin/SubmissionControllerIntegrationTest.kt +++ b/submissions/src/test/kotlin/SubmissionControllerIntegrationTest.kt @@ -1,15 +1,15 @@ package gov.cdc.prime.reportstream.submissions.controllers +import com.azure.core.util.Context import com.azure.data.tables.TableClient import com.azure.data.tables.models.TableEntity import com.azure.storage.blob.BlobContainerClient import com.azure.storage.blob.models.BlobItem import com.azure.storage.queue.QueueClient +import com.azure.storage.queue.models.PeekedMessageItem import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import gov.cdc.prime.reportstream.shared.QueueMessage -import gov.cdc.prime.reportstream.shared.QueueMessage.ObjectMapperProvider import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach @@ -26,7 +26,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders import org.springframework.test.web.servlet.result.MockMvcResultMatchers import org.testcontainers.containers.GenericContainer import org.testcontainers.utility.DockerImageName -import java.util.Base64 +import java.time.Duration @SpringBootTest @ActiveProfiles("test") @@ -108,18 +108,16 @@ class SubmissionControllerIntegrationTest { assertEquals(requestBody, blobContent) // Verify message was sent to queue and read its content - // Peek the message from the queue - val peekedMessage = queueClient.peekMessage()?.body?.toString() - - // Check if message is present - checkNotNull(peekedMessage) { "No message found in the queue" } - - // Deserialize the message - val deserializedMessage = deserialize(peekedMessage, QueueMessage.ReceiveQueueMessage::class.java) - -// val queueMessageContent = objectMapper.readValue(/* content = */ messages[0].body.toString(), /* valueType = */ -// QueueMessage.ReceiveQueueMessage::class.java) - val headers = deserializedMessage.headers as Map<*, *> + val messages: MutableList = mutableListOf() + queueClient.peekMessages( + 10, + Duration.ofSeconds(30), + Context.NONE + ).iterator().forEachRemaining { messages.add(it) } + assertEquals(1, messages.size) + + val queueMessageContent = objectMapper.readValue(messages[0].body.toString(), Map::class.java) as Map<*, *> + val headers = queueMessageContent["headers"] as Map<*, *> assertEquals("testClient", headers["client_id"]) assertEquals("application/hl7-v2;charset=UTF-8", headers["Content-Type"]) assertEquals("testPayload", headers["payloadname"]) @@ -130,11 +128,6 @@ class SubmissionControllerIntegrationTest { tableClient.listEntities().iterator().forEachRemaining { entities.add(it) } assertEquals(1, entities.size) val tableEntity = entities[0] - assertEquals("Received", tableEntity.getProperty("RowKey")) - } - - fun deserialize(serializedString: String, valueType: Class): T { - val bytes = Base64.getDecoder().decode(serializedString) - return ObjectMapperProvider.mapper.readValue(bytes, valueType) + assertEquals("Received", tableEntity.getProperty("status")) } } \ No newline at end of file diff --git a/submissions/src/test/kotlin/SubmissionControllerTest.kt b/submissions/src/test/kotlin/SubmissionControllerTest.kt index ab1dfd84120..2488e03ad14 100644 --- a/submissions/src/test/kotlin/SubmissionControllerTest.kt +++ b/submissions/src/test/kotlin/SubmissionControllerTest.kt @@ -8,8 +8,6 @@ import com.azure.storage.queue.models.SendMessageResult import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import gov.cdc.prime.reportstream.shared.QueueMessage -import gov.cdc.prime.reportstream.shared.QueueMessage.ObjectMapperProvider import gov.cdc.prime.reportstream.submissions.TelemetryService import gov.cdc.prime.reportstream.submissions.config.AzureConfig import org.junit.jupiter.api.AfterEach @@ -38,7 +36,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders import org.springframework.test.web.servlet.result.MockMvcResultMatchers import java.io.ByteArrayInputStream import java.io.InputStream -import java.util.Base64 import java.util.UUID @WebMvcTest(SubmissionController::class) @@ -139,10 +136,11 @@ class SubmissionControllerTest { // Assert the captured arguments assert(blobSizeCaptor.firstValue == requestBody.length.toLong()) - val capturedMessage = deserialize(messageCaptor.firstValue, QueueMessage.ReceiveQueueMessage::class.java) - assert(capturedMessage.reportId == reportId) - assert(capturedMessage.blobURL == expectedBlobUrl) - val headers = capturedMessage.headers as Map<*, *> + val capturedMessage = objectMapper.readValue(messageCaptor.firstValue, Map::class.java) + assert(capturedMessage["reportId"] == reportId.toString()) + assert(capturedMessage["blobUrl"] == expectedBlobUrl) + assert(capturedMessage["headers"] != null) + val headers = capturedMessage["headers"] as Map<*, *> assert(headers["client_id"] == "testClient") assert(headers["Content-Type"] == "application/hl7-v2;charset=UTF-8") assert(headers["payloadname"] == "testPayload") @@ -185,10 +183,11 @@ class SubmissionControllerTest { // Assert the captured arguments assert(blobSizeCaptor.firstValue == requestBody.length.toLong()) - val capturedMessage = deserialize(messageCaptor.firstValue, QueueMessage.ReceiveQueueMessage::class.java) - assert(capturedMessage.reportId == reportId) - assert(capturedMessage.blobURL == expectedBlobUrl) - val headers = capturedMessage.headers as Map<*, *> + val capturedMessage = objectMapper.readValue(messageCaptor.firstValue, Map::class.java) + assert(capturedMessage["reportId"] == reportId.toString()) + assert(capturedMessage["blobUrl"] == expectedBlobUrl) + assert(capturedMessage["headers"] != null) + val headers = capturedMessage["headers"] as Map<*, *> assert(headers["client_id"] == "testClient") assert(headers["Content-Type"] == "application/fhir+ndjson;charset=UTF-8") assert(headers["payloadname"] == "testPayload") @@ -276,7 +275,7 @@ class SubmissionControllerTest { } @Test - fun `submitReport should log SUBMISSION_RECEIVED with correct details`() { + fun `submitReport should log ReportReceivedEvent with correct details`() { // Helper function to safely cast the captured map to Map fun mapToStringString(input: Map<*, *>): Map { return input.mapNotNull { (key, value) -> @@ -317,7 +316,7 @@ class SubmissionControllerTest { val capturedEvent = eventCaptor.firstValue val capturedProperties = mapToStringString(propertiesCaptor.firstValue) - assert(capturedEvent == "SUBMISSION_RECEIVED") + assert(capturedEvent == "ReportReceivedEvent") val eventDetails = objectMapper.readValue(capturedProperties["event"], Map::class.java) assert(eventDetails["reportId"] == reportId.toString()) assert(eventDetails["blobUrl"] == expectedBlobUrl) @@ -330,9 +329,4 @@ class SubmissionControllerTest { uuidMockedStatic.close() } - - fun deserialize(serializedString: String, valueType: Class): T { - val bytes = Base64.getDecoder().decode(serializedString) - return ObjectMapperProvider.mapper.readValue(bytes, valueType) - } } \ No newline at end of file