From 497ab73c4e1f8cef9b6d2123b04d329e6ed768b4 Mon Sep 17 00:00:00 2001 From: Anil Date: Wed, 29 May 2024 17:36:12 -0400 Subject: [PATCH] SMILECDR-918-Move-Automated-Tests-To-Private --- .circleci/config.yml | 52 ----- .gitignore | 169 -------------- .python-version | 1 - load_external_variables.sh | 9 - poetry.lock | 167 -------------- poetry.toml | 2 - pyproject.toml | 20 -- src/omniparser_schemas/common/__init__.py | 0 src/omniparser_schemas/common/globals.py | 2 - .../custom/check_FHIR_resource_element.py | 7 - src/omniparser_schemas/parser/__init__.py | 0 src/omniparser_schemas/parser/filter.py | 13 -- src/omniparser_schemas/parser/main.py | 28 --- .../parser/universal_etl_parser.py | 29 --- .../smilecdr/post_fhir_bundle_smilecdr.py | 52 ----- .../smilecdr/regression_tests_smilecdr.py | 45 ---- .../smilecdr/smile_cdr_token.py | 47 ---- tests/regression/account_resource.py | 92 -------- tests/regression/claim_1_resource.py | 110 --------- tests/regression/claim_2_resource.py | 94 -------- tests/regression/claim_3_resource.py | 94 -------- tests/regression/coverage_1_resource.py | 151 ------------- tests/regression/coverage_2_resource.py | 132 ----------- tests/regression/coverage_3_resource.py | 106 --------- tests/regression/encounter_resource.py | 113 ---------- tests/regression/main.py | 82 ------- tests/regression/missing_segment.py | 39 ---- tests/regression/organization_resource.py | 40 ---- tests/regression/patient_resource.py | 209 ------------------ .../practitioner_attending_resource.py | 70 ------ .../practitioner_referring_resource.py | 70 ------ .../reg_globals/account_reg_globals.py | 4 - .../reg_globals/claim_reg_globals.py | 7 - .../reg_globals/coverage_reg_globals.py | 15 -- .../reg_globals/enocunter_reg_globals.py | 14 -- .../regression/reg_globals/identifier_urls.py | 3 - .../reg_globals/organization_reg_globals.py | 1 - .../reg_globals/patient_reg_global.py | 41 ---- .../reg_globals/practitioner_reg_globals.py | 7 - .../regression/reg_globals/reference_urls.py | 22 -- .../relatedperson_insurance_reg_global.py | 24 -- .../reg_globals/relatedperson_reg_global.py | 24 -- tests/regression/reg_globals/request_type.py | 2 - .../Account/Account_test_data_1.txt | 1 - .../Claim/Claim_test_data_1.txt | 1 - .../Claim/Claim_test_data_2.txt | 1 - .../Coverage/Coverage_test_data_1.txt | 1 - .../Coverage/Coverage_test_data_2.txt | 1 - .../Coverage/Coverage_test_data_3.txt | 1 - .../Encounter/Encounter_test_data_1.txt | 1 - .../MissingSegments/AL1DG1.txt | 1 - .../MissingSegments/ARV.txt | 1 - .../MissingSegments/IAM.txt | 1 - .../MissingSegments/NK1.txt | 1 - .../MissingSegments/ZAC.txt | 1 - .../MissingSegments/ZCS.txt | 1 - .../MissingSegments/ZMS.txt | 1 - .../MissingSegments/ZNM.txt | 1 - .../MissingSegments/ZSU.txt | 1 - .../Organization/Organization_test_data_1.txt | 1 - .../Patient/Patient_test_data_1.txt | 1 - .../Patient/Patient_test_data_2.txt | 1 - .../Patient/Patient_test_data_3.txt | 1 - .../Patient/Patient_test_data_4.txt | 1 - .../Patient/Patient_test_data_5.txt | 1 - .../Practitioner/Practitioner_test_data_1.txt | 1 - .../RelatedPerson_test_data_1.txt | 1 - .../RelatedPerson_test_data_2.txt | 1 - .../RelatedPerson_test_data_3.txt | 1 - .../RelatedPerson_test_data_4.txt | 1 - .../RelatedPerson_test_data_5.txt | 1 - .../RelatedPerson_test_data_6.txt | 1 - .../RelatedPerson_test_data_7.txt | 1 - .../relatedperson_insurance_1_resource.py | 209 ------------------ .../relatedperson_insurance_2_resource.py | 170 -------------- .../relatedperson_insurance_3_resource.py | 169 -------------- tests/regression/relatedperson_resource.py | 172 -------------- 77 files changed, 2959 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .python-version delete mode 100644 load_external_variables.sh delete mode 100644 poetry.lock delete mode 100644 poetry.toml delete mode 100644 pyproject.toml delete mode 100644 src/omniparser_schemas/common/__init__.py delete mode 100644 src/omniparser_schemas/common/globals.py delete mode 100644 src/omniparser_schemas/custom/check_FHIR_resource_element.py delete mode 100644 src/omniparser_schemas/parser/__init__.py delete mode 100644 src/omniparser_schemas/parser/filter.py delete mode 100644 src/omniparser_schemas/parser/main.py delete mode 100644 src/omniparser_schemas/parser/universal_etl_parser.py delete mode 100644 src/omniparser_schemas/smilecdr/post_fhir_bundle_smilecdr.py delete mode 100755 src/omniparser_schemas/smilecdr/regression_tests_smilecdr.py delete mode 100644 src/omniparser_schemas/smilecdr/smile_cdr_token.py delete mode 100644 tests/regression/account_resource.py delete mode 100644 tests/regression/claim_1_resource.py delete mode 100644 tests/regression/claim_2_resource.py delete mode 100644 tests/regression/claim_3_resource.py delete mode 100644 tests/regression/coverage_1_resource.py delete mode 100644 tests/regression/coverage_2_resource.py delete mode 100644 tests/regression/coverage_3_resource.py delete mode 100644 tests/regression/encounter_resource.py delete mode 100644 tests/regression/main.py delete mode 100644 tests/regression/missing_segment.py delete mode 100644 tests/regression/organization_resource.py delete mode 100755 tests/regression/patient_resource.py delete mode 100644 tests/regression/practitioner_attending_resource.py delete mode 100644 tests/regression/practitioner_referring_resource.py delete mode 100644 tests/regression/reg_globals/account_reg_globals.py delete mode 100644 tests/regression/reg_globals/claim_reg_globals.py delete mode 100644 tests/regression/reg_globals/coverage_reg_globals.py delete mode 100644 tests/regression/reg_globals/enocunter_reg_globals.py delete mode 100644 tests/regression/reg_globals/identifier_urls.py delete mode 100644 tests/regression/reg_globals/organization_reg_globals.py delete mode 100644 tests/regression/reg_globals/patient_reg_global.py delete mode 100644 tests/regression/reg_globals/practitioner_reg_globals.py delete mode 100644 tests/regression/reg_globals/reference_urls.py delete mode 100644 tests/regression/reg_globals/relatedperson_insurance_reg_global.py delete mode 100644 tests/regression/reg_globals/relatedperson_reg_global.py delete mode 100644 tests/regression/reg_globals/request_type.py delete mode 100644 tests/regression/regression_test_data/Account/Account_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/Claim/Claim_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/Claim/Claim_test_data_2.txt delete mode 100644 tests/regression/regression_test_data/Coverage/Coverage_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/Coverage/Coverage_test_data_2.txt delete mode 100644 tests/regression/regression_test_data/Coverage/Coverage_test_data_3.txt delete mode 100644 tests/regression/regression_test_data/Encounter/Encounter_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/AL1DG1.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ARV.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/IAM.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/NK1.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ZAC.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ZCS.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ZMS.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ZNM.txt delete mode 100644 tests/regression/regression_test_data/MissingSegments/ZSU.txt delete mode 100644 tests/regression/regression_test_data/Organization/Organization_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/Patient/Patient_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/Patient/Patient_test_data_2.txt delete mode 100644 tests/regression/regression_test_data/Patient/Patient_test_data_3.txt delete mode 100644 tests/regression/regression_test_data/Patient/Patient_test_data_4.txt delete mode 100644 tests/regression/regression_test_data/Patient/Patient_test_data_5.txt delete mode 100644 tests/regression/regression_test_data/Practitioner/Practitioner_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_1.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_2.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_3.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_4.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_5.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_6.txt delete mode 100644 tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_7.txt delete mode 100644 tests/regression/relatedperson_insurance_1_resource.py delete mode 100644 tests/regression/relatedperson_insurance_2_resource.py delete mode 100644 tests/regression/relatedperson_insurance_3_resource.py delete mode 100644 tests/regression/relatedperson_resource.py diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index fdeba53..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: 2.1 -orbs: - python: circleci/python@2.0.3 - -jobs: - pre_prod_test: - executor: python/default - steps: - - checkout - - run: - name: "get env variables for pre prod" - command: bash load_external_variables.sh "DEV" - - python/install-packages: - pkg-manager: poetry - - run: - name: Run tests - command: poetry run test - - persist_to_workspace: - root: ~/project - paths: - - . - - prod_test: - executor: python/default - steps: - - checkout - - run: - name: "get env variables for prod" - command: bash load_external_variables.sh "PROD" - - python/install-packages: - pkg-manager: poetry - - run: - name: Run tests - command: poetry run test - - persist_to_workspace: - root: ~/project - paths: - - . - -workflows: - commit: - jobs: - - pre_prod_test: - filters: - branches: - ignore: - - main - - prod_test: - filters: - branches: - only: - - main \ No newline at end of file diff --git a/.gitignore b/.gitignore index e14244c..9ebdd32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,172 +1,3 @@ output*.json -inputTEST* .DS_Store -regression*.json -.envrc - -#====================================================================== -# Python-specific ignores, from: -# https://github.com/github/gitignore/blob/main/Python.gitignore -#====================================================================== - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ diff --git a/.python-version b/.python-version deleted file mode 100644 index f870be2..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.10.1 diff --git a/load_external_variables.sh b/load_external_variables.sh deleted file mode 100644 index e4f1899..0000000 --- a/load_external_variables.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -e - -declare PARSER_URL=PARSER_URL_$1 - -#!/bin/bash -echo "export PARSER_URL=$"${PARSER_URL} >> $BASH_ENV - -exit 0 \ No newline at end of file diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index e2a7c39..0000000 --- a/poetry.lock +++ /dev/null @@ -1,167 +0,0 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. - -[[package]] -name = "certifi" -version = "2023.5.7" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, - {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.1.0" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, - {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, -] - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] - -[[package]] -name = "pyjwt" -version = "2.7.0" -description = "JSON Web Token implementation in Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "PyJWT-2.7.0-py3-none-any.whl", hash = "sha256:ba2b425b15ad5ef12f200dc67dd56af4e26de2331f965c5439994dad075876e1"}, - {file = "PyJWT-2.7.0.tar.gz", hash = "sha256:bd6ca4a3c4285c1a2d4349e5a035fdf8fb94e04ccd0fcbe6ba289dae9cc3e074"}, -] - -[package.extras] -crypto = ["cryptography (>=3.4.0)"] -dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] -docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] - -[[package]] -name = "requests" -version = "2.31.0" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.7" -files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "urllib3" -version = "2.0.2" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.7" -files = [ - {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"}, - {file = "urllib3-2.0.2.tar.gz", hash = "sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.10" -content-hash = "cfbf0c4530258556cd829c440daaf977aab6cbe0a9a65b61ab0aa03a25f42a20" diff --git a/poetry.toml b/poetry.toml deleted file mode 100644 index ab1033b..0000000 --- a/poetry.toml +++ /dev/null @@ -1,2 +0,0 @@ -[virtualenvs] -in-project = true diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 33a1ee5..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,20 +0,0 @@ -[tool.poetry] -name = "omniparser-schemas" -version = "0.1.0" -description = "" -authors = [] -readme = "README.md" -packages = [{include = "omniparser_schemas", from="src"}] - -[tool.poetry.dependencies] -python = "^3.10" -requests = "^2.31.0" -pyjwt = "^2.7.0" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - -[tool.poetry.scripts] -test = "tests.regression.main:cli" diff --git a/src/omniparser_schemas/common/__init__.py b/src/omniparser_schemas/common/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/omniparser_schemas/common/globals.py b/src/omniparser_schemas/common/globals.py deleted file mode 100644 index 43a8e31..0000000 --- a/src/omniparser_schemas/common/globals.py +++ /dev/null @@ -1,2 +0,0 @@ -PARSER_SCHEMA="hl7v2_default" -PARSER_TIMEOUT=90 \ No newline at end of file diff --git a/src/omniparser_schemas/custom/check_FHIR_resource_element.py b/src/omniparser_schemas/custom/check_FHIR_resource_element.py deleted file mode 100644 index c9be343..0000000 --- a/src/omniparser_schemas/custom/check_FHIR_resource_element.py +++ /dev/null @@ -1,7 +0,0 @@ -def check_if_FHIR_resource_element_exists(data, index, path, subpath): - try: - data[index][path][subpath] - return False - except KeyError: - return "FHIR resource element not found" - diff --git a/src/omniparser_schemas/parser/__init__.py b/src/omniparser_schemas/parser/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/omniparser_schemas/parser/filter.py b/src/omniparser_schemas/parser/filter.py deleted file mode 100644 index 7ae64cd..0000000 --- a/src/omniparser_schemas/parser/filter.py +++ /dev/null @@ -1,13 +0,0 @@ -import json - -from omniparser_schemas.parser.main import validate_ETL_parser - -def filter_resource(resource_name, testfile, identifier_url, identifier_id): - validate_ETL_parser(resource_name, testfile) - with open("tests/regression/regression_output/" + str(resource_name) + "/regression_" + str(resource_name) + "_" + str(testfile) + ".json", 'r') as json_file: - fhir_bundle = json.load(json_file) - TARGET_RESOURCE_TYPE = resource_name - entries = fhir_bundle["entry"] - filter_resource = list(filter(lambda e: e["resource"]["resourceType"] == TARGET_RESOURCE_TYPE, entries)) - RESOURCE_IDENTIFIER = f'{identifier_url}/{identifier_id}' - return list(filter(lambda e: e["resource"]["identifier"][0]["system"] == RESOURCE_IDENTIFIER, filter_resource)) diff --git a/src/omniparser_schemas/parser/main.py b/src/omniparser_schemas/parser/main.py deleted file mode 100644 index 323a0ea..0000000 --- a/src/omniparser_schemas/parser/main.py +++ /dev/null @@ -1,28 +0,0 @@ -import importlib -import json -import sys -import os - -from omniparser_schemas.parser.universal_etl_parser import fetch_parsed_text - -def validate_ETL_parser(resource, file): - with importlib.resources.path("tests.regression.regression_test_data." + str(resource), str(resource) + "_test_data_" + str(file) + ".txt") as f: - hl7content = f.read_text() - # The universal parser need to have carriage return - hl7content = hl7content.replace('\\r', '\r') - - # call universal etl parser - fhir_bundle_from_hl7 = fetch_parsed_text(hl7content) - - # Remove first and last character of fhir bundle - fhir_bundle = fhir_bundle_from_hl7[1:-1] - - json_data = json.loads(fhir_bundle) - - OUTPUT_ROOT_PATH = "tests/regression/regression_output/" - PATH = OUTPUT_ROOT_PATH + str(resource) - if not os.path.exists(PATH): - os.makedirs(PATH) - - with open(PATH + "/regression_" + str(resource) + "_" + str(file) + ".json", "w") as f: - json.dump(json_data, f) diff --git a/src/omniparser_schemas/parser/universal_etl_parser.py b/src/omniparser_schemas/parser/universal_etl_parser.py deleted file mode 100644 index d155702..0000000 --- a/src/omniparser_schemas/parser/universal_etl_parser.py +++ /dev/null @@ -1,29 +0,0 @@ -import sys -import os -import requests -from omniparser_schemas.common.globals import( - PARSER_SCHEMA, - PARSER_TIMEOUT -) -from http import HTTPStatus - -UNIVERSAL_ETL_PARSER_CONTENT_SCHEMA=PARSER_SCHEMA -UNIVERSAL_ETL_PARSER_URL=os.environ['PARSER_URL'] -REQUEST_TIMEOUT=PARSER_TIMEOUT - -def fetch_parsed_text(text_to_parse): - headers = {"Content-Schema": UNIVERSAL_ETL_PARSER_CONTENT_SCHEMA} - - http_response = requests.post( - url=UNIVERSAL_ETL_PARSER_URL, - headers=headers, - data=text_to_parse, - timeout=REQUEST_TIMEOUT, - ) - - if http_response.status_code != HTTPStatus.OK: - error_message = http_response.status_code - print("Error code:",error_message, http_response.text) - exit(1) - - return http_response.text diff --git a/src/omniparser_schemas/smilecdr/post_fhir_bundle_smilecdr.py b/src/omniparser_schemas/smilecdr/post_fhir_bundle_smilecdr.py deleted file mode 100644 index 97cc50e..0000000 --- a/src/omniparser_schemas/smilecdr/post_fhir_bundle_smilecdr.py +++ /dev/null @@ -1,52 +0,0 @@ -from http import HTTPStatus -import random -import string -import importlib - -import requests - -from omniparser_schemas.common.globals import( - ROOT_URL -) -from omniparser_schemas.parser.universal_etl_parser import fetch_parsed_text -from omniparser_schemas.smilecdr.smile_cdr_token import get_token - -def postFHIRbunlde(mrn, facilityId): - with importlib.resources.path("omniparser_schemas.smilecdr", "RegressionTestData.txt") as f: - hl7content = f.read_text() - - # The universal parser need to have carriage return - hl7content = hl7content.replace('\\r', '\r') - - # call universal utl parser - fhir_bundle_from_hl7 = fetch_parsed_text(hl7content) - - # Replace test file MRN with unique MRN - fhir_bundle_with_unique_mrn = fhir_bundle_from_hl7.replace('TEST333345038900', mrn) - - # Assign facilityid to fhir bundle - fhir_bundle_with_unique_mrn = fhir_bundle_with_unique_mrn.replace('{{FacilityId}}', facilityId) - - # Remove first and last character of fhir bundle - fhir_bundle_with_unique_mrn_format = fhir_bundle_with_unique_mrn[1:-1] - - # Get Smilecdr Token - token = get_token() - - # Post the fhir bundle in smilecdr - N=10 - request_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=N)) - headers = { - "Content-Type": "application/fhir+json", - "accept": "application/json", - "Authorization": f"Bearer {(token)}", - "x-request-id": f"{request_id}", - } - base_url = f"{ROOT_URL}/fhir-request/" - response = requests.post(base_url, headers=headers, data=fhir_bundle_with_unique_mrn_format) - if response.status_code != HTTPStatus.OK: - error_message = response.json() - print(error_message) - exit(1) - - return(response.json()) diff --git a/src/omniparser_schemas/smilecdr/regression_tests_smilecdr.py b/src/omniparser_schemas/smilecdr/regression_tests_smilecdr.py deleted file mode 100755 index 6066c94..0000000 --- a/src/omniparser_schemas/smilecdr/regression_tests_smilecdr.py +++ /dev/null @@ -1,45 +0,0 @@ - -from http import HTTPStatus -import random -import string -import requests -import json -import sys - -from omniparser_schemas.common.globals import( - ROOT_URL -) -from omniparser_schemas.smilecdr.smile_cdr_token import get_token -from omniparser_schemas.smilecdr.post_fhir_bundle_smilecdr import postFHIRbunlde - -unique_mrn_number = random.randrange(0,999999999999) -unique_mrn_number = str(unique_mrn_number) -facilityId = "477" -token = get_token() - -def regression_test(): - response = postFHIRbunlde(unique_mrn_number, facilityId) - # send the fhir request in smilecdr - N=10 - request_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=N)) - headers = { - "Content-Type": "application/fhir+json", - "accept": "application/json", - "Authorization": f"Bearer {(token)}", - "x-request-id": f"{request_id}", - } - base_url = f"{ROOT_URL}/fhir-request/Patient?identifier=https://pediatrix.com/fhir/NamingSystem/mrn-id|{unique_mrn_number}&mrn-assigner:Organization.identifier-system-facilityId={facilityId}&_revinclude=Encounter:subject&_include:iterate=Encounter:practitioner&_revinclude:iterate=MessageHeader:focus&_revinclude=Coverage:beneficiary&_include:iterate=Coverage:payor&_revinclude=RelatedPerson:patient&_revinclude=Account:subject" - response = requests.get(base_url, headers=headers) - if response.status_code != HTTPStatus.OK: - error_message = response.json() - print(error_message) - exit(1) - with open("output_regression.json", "w") as regoutjson: - json.dump(response.json(), regoutjson) - - -def cli(args=None): - """Process command line arguments.""" - if not args: - args = sys.argv[1:] - regression_test() \ No newline at end of file diff --git a/src/omniparser_schemas/smilecdr/smile_cdr_token.py b/src/omniparser_schemas/smilecdr/smile_cdr_token.py deleted file mode 100644 index fbc941b..0000000 --- a/src/omniparser_schemas/smilecdr/smile_cdr_token.py +++ /dev/null @@ -1,47 +0,0 @@ -import logging -from datetime import datetime, timedelta - -import requests -import jwt - -from omniparser_schemas.common.globals import( - CLIENT_ID, - CLIENT_SECRET, - AUD, - ROOT_URL -) - -TOKEN = None - -def expiration(token): - return datetime.fromtimestamp( - jwt.decode(token, options={"verify_signature": False, "verify_aud": False})[ - "exp" - ] - ) - -def valid(token): - if token is None: - return False - try: - return expiration(token) - timedelta(minutes=30) > datetime.now() - except jwt.ExpiredSignatureError: - return False - except jwt.InvalidAudienceError: - logging.error(f'token in error: [{token}]') - return False - -def get_token(): - payload = { - "client_id": CLIENT_ID, - "client_secret": CLIENT_SECRET, - "scope": AUD, - "grant_type": "client_credentials", - } - header_for_post = {"Content-Type": "application/x-www-form-urlencoded"} - response = requests.post( - f"{ROOT_URL}/smartauth/oauth/token", - data=payload, - headers=header_for_post, - ) - return response.json()["access_token"] diff --git a/tests/regression/account_resource.py b/tests/regression/account_resource.py deleted file mode 100644 index bc0c0d9..0000000 --- a/tests/regression/account_resource.py +++ /dev/null @@ -1,92 +0,0 @@ -from .reg_globals.reference_urls import( - PATIENT_FULL_URL, - ACCOUNT_FULL_URL, - COVERAGE_FULL_URL_1, - COVERAGE_FULL_URL_2, - COVERAGE_FULL_URL_3, - RELATED_PERSON_GUARANTOR_FULL_URL_1, - RELATED_PERSON_GUARANTOR_FULL_URL_2, - RELATED_PERSON_GUARANTOR_FULL_URL_3 -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.account_reg_globals import( - STATUS, - ACCOUNT_CODE, - ACCOUNT_DISPLAY, - CODE_SYSTEM -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from omniparser_schemas.parser.filter import filter_resource - -def acc_test(resource_name, testfile, identifier_url, identifier_id): - acc = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert acc[0]["fullUrl"] == ACCOUNT_FULL_URL, "did not match account URL" - assert acc[0]["request"]["method"] == REQUEST_TYPE[0], "did not match request type" - assert acc[0]["request"]["url"] == f'{RESOURCE_NAME[0]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[0]}|{MRN}-{FACILITY_ID}', "did not match request url" - assert acc[0]["resource"]["coverage"][0]["coverage"]["reference"] == COVERAGE_FULL_URL_1, "did not match coverage full URL" - assert acc[0]["resource"]["coverage"][0]["priority"] == 1, "did not match priority" - assert acc[0]["resource"]["coverage"][1]["coverage"]["reference"] == COVERAGE_FULL_URL_2, "did not match coverage full URL" - assert acc[0]["resource"]["coverage"][1]["priority"] == 2, "did not match priority" - assert acc[0]["resource"]["coverage"][2]["coverage"]["reference"] == COVERAGE_FULL_URL_3, "did not match coverage full URL" - assert acc[0]["resource"]["coverage"][2]["priority"] == 3, "did not match priority" - assert acc[0]["resource"]["guarantor"][0]["party"]["reference"] == RELATED_PERSON_GUARANTOR_FULL_URL_1, "did not match guarantor reference" - assert acc[0]["resource"]["guarantor"][0]["party"]["type"] == RESOURCE_NAME[7], "did not match reference type" - assert acc[0]["resource"]["guarantor"][1]["party"]["reference"] == RELATED_PERSON_GUARANTOR_FULL_URL_2, "did not match guarantor reference" - assert acc[0]["resource"]["guarantor"][1]["party"]["type"] == RESOURCE_NAME[7], "did not match reference type" - assert acc[0]["resource"]["guarantor"][2]["party"]["reference"] == RELATED_PERSON_GUARANTOR_FULL_URL_3, "did not match guarantor reference" - assert acc[0]["resource"]["guarantor"][2]["party"]["type"] == RESOURCE_NAME[7], "did not match reference type" - assert acc[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[0]}', "did not match indentifier system" - assert acc[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}', "did not match identifier value" - assert acc[0]["resource"]["resourceType"] == RESOURCE_NAME[0], "did not match resource" - assert acc[0]["resource"]["status"] == STATUS, "did not match status" - assert acc[0]["resource"]["subject"][0]["reference"] == PATIENT_FULL_URL, "did not match reference URL" - assert acc[0]["resource"]["subject"][0]["type"] == RESOURCE_NAME[5], "did not match reference type" - assert acc[0]["resource"]["type"]["coding"][0]["code"] == ACCOUNT_CODE, "did not match account code" - assert acc[0]["resource"]["type"]["coding"][0]["display"] == ACCOUNT_DISPLAY, "did not match account display" - assert acc[0]["resource"]["type"]["coding"][0]["system"] == CODE_SYSTEM, "did not match code system" - - # Negative test cases - assert not acc[0]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not acc[0]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - assert not acc[0]["request"]["url"] == {MRN}-{FACILITY_ID}, "negative test case failed" - assert not acc[0]["resource"]["coverage"][0]["coverage"]["reference"] == RELATED_PERSON_GUARANTOR_FULL_URL_1, "negative test case failed" - assert not acc[0]["resource"]["coverage"][0]["priority"] == 3, "negative test case failed" - assert not acc[0]["resource"]["coverage"][1]["coverage"]["reference"] == ACCOUNT_FULL_URL, "negative test case failed" - assert not acc[0]["resource"]["coverage"][1]["priority"] == 1, "negative test case failed" - assert not acc[0]["resource"]["coverage"][2]["coverage"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not acc[0]["resource"]["coverage"][2]["priority"] == 2, "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["reference"] == COVERAGE_FULL_URL_1, "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["type"] == RESOURCE_NAME[0], "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["reference"] == COVERAGE_FULL_URL_2, "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["type"] == RESOURCE_NAME[1], "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["reference"] == COVERAGE_FULL_URL_3, "negative test case failed" - assert not acc[0]["resource"]["guarantor"][0]["party"]["type"] == RESOURCE_NAME[2], "negative test case failed" - assert not acc[0]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not acc[0]["resource"]["identifier"][0]["value"] == f'{FACILITY_ID}-{MRN}', "negative test case failed" - assert not acc[0]["resource"]["resourceType"] == RESOURCE_NAME[3], "negative test case failed" - assert not acc[0]["resource"]["status"] == 1, "negative test case failed" - assert not acc[0]["resource"]["subject"][0]["reference"] == ACCOUNT_FULL_URL, "negative test case failed" - assert not acc[0]["resource"]["subject"][0]["type"] == RESOURCE_NAME[3], "negative test case failed" - assert not acc[0]["resource"]["type"]["coding"][0]["code"] == CODE_SYSTEM, "negative test case failed" - assert not acc[0]["resource"]["type"]["coding"][0]["display"] == ACCOUNT_CODE, "negative test case failed" - assert not acc[0]["resource"]["type"]["coding"][0]["system"] == ACCOUNT_DISPLAY, "negative test case failed" - - print("FHIR bundle account resource tests were successful") \ No newline at end of file diff --git a/tests/regression/claim_1_resource.py b/tests/regression/claim_1_resource.py deleted file mode 100644 index e7621ea..0000000 --- a/tests/regression/claim_1_resource.py +++ /dev/null @@ -1,110 +0,0 @@ -from datetime import datetime - -from .reg_globals.claim_reg_globals import( - CLAIM_AUTH_NUMBER, - CLAIM_SEQUENCE, - CLAIM_STATUS, - CLAIM_CODE, - CLAIM_CODE_SYSTEM, - CLAIM_CODE_DISPLAY, - CLAIM_USE -) - -from .reg_globals.coverage_reg_globals import( - COVERAGE_ID -) - -from .reg_globals.reference_urls import( - CLAIM_RESOURCE_FULL_URL_1, - COVERAGE_FULL_URL_1, - PATIENT_FULL_URL, - ORGANIZATION_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.relatedperson_insurance_reg_global import( - INSURANCE_SET_ID -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def claim_1_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - DATE_TIME_NOW = datetime.now() - CURRENT_DATE = DATE_TIME_NOW.strftime("%Y-%m-%d") - claim = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert claim[0]["fullUrl"] == CLAIM_RESOURCE_FULL_URL_1, "did not match full url" - assert claim[0]["request"]["url"] == f'{RESOURCE_NAME[1]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[1]}|{MRN}-{FACILITY_ID}-{COVERAGE_ID[0]}', "did not match request url" - CLAIM_DATE = claim[0]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:10] - assert CURRENT_DATE == CREATED_DATE, "did not match claim created date" - assert claim[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[1]}', "did not match claim identifier system" - assert claim[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[0]}', "did not match value" - assert claim[0]["resource"]["insurance"][0]["coverage"]["reference"] == COVERAGE_FULL_URL_1, "did not match coverage URL" - assert claim[0]["resource"]["insurance"][0]["coverage"]["type"] == RESOURCE_NAME[2], "did not match coverage type" - assert claim[0]["resource"]["insurance"][0]["focal"] == 1, "did not match focal" - assert claim[0]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_AUTH_NUMBER[0], "did not match preAuthRef" - assert claim[0]["resource"]["insurance"][0]["sequence"] == CLAIM_SEQUENCE, "did not match insurance sequence" - assert claim[0]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert claim[0]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match patient type" - assert claim[0]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[0], "did not match claim code" - assert claim[0]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "did not match coding system" - assert claim[0]["resource"]["provider"]["reference"] == ORGANIZATION_FULL_URL, "did not match provider " - assert claim[0]["resource"]["provider"]["type"] == RESOURCE_NAME[4] - assert claim[0]["resource"]["status"] == CLAIM_STATUS - assert claim[0]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[1] - assert claim[0]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE_DISPLAY - assert claim[0]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1] - assert claim[0]["resource"]["use"] == CLAIM_USE - - #Negative test cases - assert not claim[0]["fullUrl"] == ORGANIZATION_FULL_URL, "did not match full url" - assert not claim[0]["request"]["url"] == f'{MRN}-{FACILITY_ID}' - CLAIM_DATE = claim[0]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:9] - assert not CURRENT_DATE == CREATED_DATE - assert not claim[0]["resource"]["identifier"][0]["system"] == MRN, "negative test case failed" - assert not claim[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}', "negative test case failed" - assert not claim[0]["resource"]["insurance"][0]["coverage"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[0]["resource"]["insurance"][0]["coverage"]["type"] == IDENTIFIER_ID[0], "negative test case failed" - assert not claim[0]["resource"]["insurance"][0]["focal"] == 0, "negative test case failed" - assert not claim[0]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_CODE, "negative test case failed" - assert not claim[0]["resource"]["insurance"][0]["sequence"] == CLAIM_AUTH_NUMBER[0], "negative test case failed" - assert not claim[0]["resource"]["patient"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[0]["resource"]["patient"]["type"] == IDENTIFIER_ID, "negative test case failed" - assert not claim[0]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[0]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1], "negative test case failed" - assert not claim[0]["resource"]["provider"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not claim[0]["resource"]["provider"]["type"] == RESOURCE_NAME[2], "negative test case failed" - assert not claim[0]["resource"]["status"] == CREATED_DATE, "negative test case failed" - assert not claim[0]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[0], "negative test case failed" - assert not claim[0]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[0]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "negative test case failed" - assert not claim[0]["resource"]["use"] == CLAIM_STATUS, "negative test case failed" - - print("FHIR bundle claim 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - - claim = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert claim[0]["request"]["url"] == f'{RESOURCE_NAME[1]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[1]}|{MRN}-{FACILITY_ID}-{INSURANCE_SET_ID[0]}', "did not match request url" - assert claim[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{INSURANCE_SET_ID[0]}', "did not match value" - - # Negative test cases - assert not claim[0]["fullUrl"] == ORGANIZATION_FULL_URL, "did not match full url" - assert not claim[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}', "negative test case failed" - - print("FHIR bundle claim 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/claim_2_resource.py b/tests/regression/claim_2_resource.py deleted file mode 100644 index 13c5d51..0000000 --- a/tests/regression/claim_2_resource.py +++ /dev/null @@ -1,94 +0,0 @@ -from datetime import datetime - -from .reg_globals.claim_reg_globals import( - CLAIM_AUTH_NUMBER, - CLAIM_SEQUENCE, - CLAIM_STATUS, - CLAIM_CODE, - CLAIM_CODE_SYSTEM, - CLAIM_CODE_DISPLAY, - CLAIM_USE -) - -from .reg_globals.coverage_reg_globals import( - COVERAGE_ID -) - -from .reg_globals.reference_urls import( - CLAIM_RESOURCE_FULL_URL_2, - COVERAGE_FULL_URL_2, - PATIENT_FULL_URL, - ORGANIZATION_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def claim_2_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - DATE_TIME_NOW = datetime.now() - CURRENT_DATE = DATE_TIME_NOW.strftime("%Y-%m-%d") - claim = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert claim[1]["fullUrl"] == CLAIM_RESOURCE_FULL_URL_2, "did not match full url" - assert claim[1]["request"]["url"] == f'{RESOURCE_NAME[1]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[1]}|{MRN}-{FACILITY_ID}-{COVERAGE_ID[1]}', "did not match request url" - CLAIM_DATE = claim[1]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:10] - assert CURRENT_DATE == CREATED_DATE, "did not match claim created date" - assert claim[1]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[1]}', "did not match claim identifier system" - assert claim[1]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[1]}', "did not match value" - assert claim[1]["resource"]["insurance"][0]["coverage"]["reference"] == COVERAGE_FULL_URL_2, "did not match coverage URL" - assert claim[1]["resource"]["insurance"][0]["coverage"]["type"] == RESOURCE_NAME[2], "did not match coverage type" - assert claim[1]["resource"]["insurance"][0]["focal"] == 1, "did not match focal" - assert claim[1]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_AUTH_NUMBER[1], "did not match preAuthRef" - assert claim[1]["resource"]["insurance"][0]["sequence"] == CLAIM_SEQUENCE, "did not match insurance sequence" - assert claim[1]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert claim[1]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match patient type" - assert claim[1]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[0], "did not match claim code" - assert claim[1]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "did not match coding system" - assert claim[1]["resource"]["provider"]["reference"] == ORGANIZATION_FULL_URL, "did not match provider " - assert claim[1]["resource"]["provider"]["type"] == RESOURCE_NAME[4] - assert claim[1]["resource"]["status"] == CLAIM_STATUS - assert claim[1]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[1] - assert claim[1]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE_DISPLAY - assert claim[1]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1] - assert claim[1]["resource"]["use"] == CLAIM_USE - - #Negative test cases - assert not claim[1]["fullUrl"] == ORGANIZATION_FULL_URL, "did not match full url" - assert not claim[1]["request"]["url"] == f'{MRN}-{FACILITY_ID}' - CLAIM_DATE = claim[1]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:9] - assert not CURRENT_DATE == CREATED_DATE - assert not claim[1]["resource"]["identifier"][0]["system"] == MRN, "negative test case failed" - assert not claim[1]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}', "negative test case failed" - assert not claim[1]["resource"]["insurance"][0]["coverage"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[1]["resource"]["insurance"][0]["coverage"]["type"] == IDENTIFIER_ID[0], "negative test case failed" - assert not claim[1]["resource"]["insurance"][0]["focal"] == 0, "negative test case failed" - assert not claim[1]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_CODE, "negative test case failed" - assert not claim[1]["resource"]["insurance"][0]["sequence"] == CLAIM_AUTH_NUMBER[0], "negative test case failed" - assert not claim[1]["resource"]["patient"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[1]["resource"]["patient"]["type"] == IDENTIFIER_ID, "negative test case failed" - assert not claim[1]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[1]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1], "negative test case failed" - assert not claim[1]["resource"]["provider"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not claim[1]["resource"]["provider"]["type"] == RESOURCE_NAME[2], "negative test case failed" - assert not claim[1]["resource"]["status"] == CREATED_DATE, "negative test case failed" - assert not claim[1]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[0], "negative test case failed" - assert not claim[1]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[1]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "negative test case failed" - assert not claim[1]["resource"]["use"] == CLAIM_STATUS, "negative test case failed" - - print("FHIR bundle claim 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/claim_3_resource.py b/tests/regression/claim_3_resource.py deleted file mode 100644 index fcc7112..0000000 --- a/tests/regression/claim_3_resource.py +++ /dev/null @@ -1,94 +0,0 @@ -from datetime import datetime - -from .reg_globals.claim_reg_globals import( - CLAIM_AUTH_NUMBER, - CLAIM_SEQUENCE, - CLAIM_STATUS, - CLAIM_CODE, - CLAIM_CODE_SYSTEM, - CLAIM_CODE_DISPLAY, - CLAIM_USE -) - -from .reg_globals.coverage_reg_globals import( - COVERAGE_ID -) - -from .reg_globals.reference_urls import( - CLAIM_RESOURCE_FULL_URL_3, - COVERAGE_FULL_URL_3, - PATIENT_FULL_URL, - ORGANIZATION_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def claim_3_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - DATE_TIME_NOW = datetime.now() - CURRENT_DATE = DATE_TIME_NOW.strftime("%Y-%m-%d") - claim = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert claim[2]["fullUrl"] == CLAIM_RESOURCE_FULL_URL_3, "did not match full url" - assert claim[2]["request"]["url"] == f'{RESOURCE_NAME[1]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[1]}|{MRN}-{FACILITY_ID}-{COVERAGE_ID[2]}', "did not match request url" - CLAIM_DATE = claim[2]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:10] - assert CURRENT_DATE == CREATED_DATE, "did not match claim created date" - assert claim[2]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[1]}', "did not match claim identifier system" - assert claim[2]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[2]}', "did not match value" - assert claim[2]["resource"]["insurance"][0]["coverage"]["reference"] == COVERAGE_FULL_URL_3, "did not match coverage URL" - assert claim[2]["resource"]["insurance"][0]["coverage"]["type"] == RESOURCE_NAME[2], "did not match coverage type" - assert claim[2]["resource"]["insurance"][0]["focal"] == 1, "did not match focal" - assert claim[2]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_AUTH_NUMBER[2], "did not match preAuthRef" - assert claim[2]["resource"]["insurance"][0]["sequence"] == CLAIM_SEQUENCE, "did not match insurance sequence" - assert claim[2]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert claim[2]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match patient type" - assert claim[2]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[0], "did not match claim code" - assert claim[2]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "did not match coding system" - assert claim[2]["resource"]["provider"]["reference"] == ORGANIZATION_FULL_URL, "did not match provider " - assert claim[2]["resource"]["provider"]["type"] == RESOURCE_NAME[4] - assert claim[2]["resource"]["status"] == CLAIM_STATUS - assert claim[2]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[1] - assert claim[2]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE_DISPLAY - assert claim[2]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1] - assert claim[2]["resource"]["use"] == CLAIM_USE - - #Negative test cases - assert not claim[2]["fullUrl"] == ORGANIZATION_FULL_URL, "did not match full url" - assert not claim[2]["request"]["url"] == f'{MRN}-{FACILITY_ID}' - CLAIM_DATE = claim[2]["resource"]["created"] - CREATED_DATE = CLAIM_DATE[:9] - assert not CURRENT_DATE == CREATED_DATE - assert not claim[2]["resource"]["identifier"][0]["system"] == MRN, "negative test case failed" - assert not claim[2]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}', "negative test case failed" - assert not claim[2]["resource"]["insurance"][0]["coverage"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[2]["resource"]["insurance"][0]["coverage"]["type"] == IDENTIFIER_ID[0], "negative test case failed" - assert not claim[2]["resource"]["insurance"][0]["focal"] == 0, "negative test case failed" - assert not claim[2]["resource"]["insurance"][0]["preAuthRef"][0] == CLAIM_CODE, "negative test case failed" - assert not claim[2]["resource"]["insurance"][0]["sequence"] == CLAIM_AUTH_NUMBER[0], "negative test case failed" - assert not claim[2]["resource"]["patient"]["reference"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not claim[2]["resource"]["patient"]["type"] == IDENTIFIER_ID, "negative test case failed" - assert not claim[2]["resource"]["priority"]["coding"][0]["code"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[2]["resource"]["priority"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[1], "negative test case failed" - assert not claim[2]["resource"]["provider"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not claim[2]["resource"]["provider"]["type"] == RESOURCE_NAME[2], "negative test case failed" - assert not claim[2]["resource"]["status"] == CREATED_DATE, "negative test case failed" - assert not claim[2]["resource"]["type"]["coding"][0]["code"] == CLAIM_CODE[0], "negative test case failed" - assert not claim[2]["resource"]["type"]["coding"][0]["display"] == CLAIM_CODE[1], "negative test case failed" - assert not claim[2]["resource"]["type"]["coding"][0]["system"] == CLAIM_CODE_SYSTEM[0], "negative test case failed" - assert not claim[2]["resource"]["use"] == CLAIM_STATUS, "negative test case failed" - - print("FHIR bundle claim 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/coverage_1_resource.py b/tests/regression/coverage_1_resource.py deleted file mode 100644 index 269d92a..0000000 --- a/tests/regression/coverage_1_resource.py +++ /dev/null @@ -1,151 +0,0 @@ -from .reg_globals.coverage_reg_globals import( - BENEFICIARY_DISPLAY, - CODING, - CODING_VALUE, - COVERAGE_ID, - COVERAGE_NETWORK, - COVERAGE_ORDER, - COVERAGE_PERIOD_START_DATE, - COVERAGE_PERIOD_END_DATE, - COVERAGE_STATUS, - COVERAGE_SUBSCRIBER_DISPLAY, - COVERAGE_SUBSCRIBER_VALUE, - RELATIONSHIP_CODE, - RELATIONSHIP_DISPLAY -) - -from .reg_globals.reference_urls import( - COVERAGE_FULL_URL_1, - RELATED_PERSON_INSURANCE_FULL_URL_1, - PATIENT_FULL_URL, - ORGANIZATION_PAYOR_FULL_URL_1, -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def insurancecoverage_1_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert cov[0]["fullUrl"] == COVERAGE_FULL_URL_1, "did not match full url" - assert cov[0]["request"]["method"] == REQUEST_TYPE[0], "did not match request type" - assert cov[0]["request"]["url"] == f'{RESOURCE_NAME[2]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[2]}|{MRN}-{FACILITY_ID}-{CODING_VALUE[0]}', "did not match request url" - assert cov[0]["resource"]["beneficiary"]["display"] == BENEFICIARY_DISPLAY, "did not match beneficiary display" - assert cov[0]["resource"]["beneficiary"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[0]["resource"]["beneficiary"]["type"] == RESOURCE_NAME[5], "did not match beneficiary type" - assert cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING[0], "did not match codiing" - assert cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[1], "did not match coding display" - assert cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[2], "did not match coding system" - assert cov[0]["resource"]["identifier"][1]["value"] == CODING_VALUE[0], "did not match coding value" - assert cov[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[2]}' , "did not match identifier system" - assert cov[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[0]}', "did not match identifier value" - assert cov[0]["resource"]["identifier"][1]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[3]}', "did not match identifier system" - assert cov[0]["resource"]["network"] == COVERAGE_NETWORK[0], "did not match coverage network" - assert cov[0]["resource"]["order"] == COVERAGE_ORDER[0], "did not match coverage order" - assert cov[0]["resource"]["payor"][0]["reference"] == ORGANIZATION_PAYOR_FULL_URL_1, "did not match coverage full url" - assert cov[0]["resource"]["period"]["end"] == COVERAGE_PERIOD_END_DATE[0], "did not match coverage end date" - assert cov[0]["resource"]["period"]["start"] == COVERAGE_PERIOD_START_DATE[0], "did not match coverage start date" - assert cov[0]["resource"]["policyHolder"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[0], "did not match relationship code" - assert cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[0], "did not match relationship display" - assert cov[0]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match subscriber system" - assert cov[0]["resource"]["status"] == COVERAGE_STATUS[0], "did not match coverage status" - assert cov[0]["resource"]["subscriber"]["display"] == COVERAGE_SUBSCRIBER_DISPLAY[0], "did not match coverage subscriber display" - assert cov[0]["resource"]["subscriber"]["identifier"]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_SUBSCRIBER_VALUE[0]}', "did not match subscriber identifier value" - assert cov[0]["resource"]["subscriber"]["reference"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "did not match subscriber reference" - assert cov[0]["resource"]["subscriber"]["type"] == RESOURCE_NAME[7], "did not match subscriber type" - - assert cov[2]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[1],"did not match relationship code" - assert cov[2]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[1], "did not match relationship display" - assert cov[2]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match subscriber system" - - #Negative test cases - assert not cov[0]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not cov[0]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - assert not cov[0]["request"]["url"] == CODING, "negative test case failed" - assert not cov[0]["resource"]["beneficiary"]["display"] == RELATIONSHIP_CODE[1], "negative test case failed" - assert not cov[0]["resource"]["beneficiary"]["reference"] == COVERAGE_FULL_URL_1, "negative test case failed" - assert not cov[0]["resource"]["beneficiary"]["type"] == BENEFICIARY_DISPLAY, "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING_VALUE[0], "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[2], "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[1], "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["value"] == CODING_VALUE[1], "negative test case failed" - assert not cov[0]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[0]["resource"]["identifier"][0]["value"] == FACILITY_ID, "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[0]["resource"]["identifier"][1]["value"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[0]["resource"]["network"] == COVERAGE_ORDER[1], "negative test case failed" - assert not cov[0]["resource"]["order"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[0]["resource"]["payor"][0]["reference"] == COVERAGE_PERIOD_START_DATE, "negative test case failed" - assert not cov[0]["resource"]["period"]["end"] == COVERAGE_PERIOD_START_DATE[0], "negative test case failede" - assert not cov[0]["resource"]["period"]["start"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[0]["resource"]["policyHolder"]["reference"] == COVERAGE_FULL_URL_1, "negative test case failed" - assert not cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_DISPLAY[2], "negative test case failed" - assert not cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_CODE[2], "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[0]["resource"]["status"] == COVERAGE_ORDER[0], "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["display"] == COVERAGE_NETWORK, "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["identifier"]["value"] == COVERAGE_SUBSCRIBER_VALUE, "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["reference"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["type"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "negative test case failed" - - assert not cov[2]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[0], "negative test case failed" - assert not cov[2]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[0], "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["identifier"]["system"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "negative test case failed" - - print("FHIR bundle coverage 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[1], "did not match relationship code" - assert cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[1], "did not match relationship display" - assert cov[0]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match subscriber system" - - #Negative test cases - assert not cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_DISPLAY[3], "negative test case failed" - assert not cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_CODE[3], "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - - print("FHIR bundle coverage 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[3], "did not match relationship code" - assert cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[3], "did not match relationship display" - assert cov[0]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[5]}', "did not match subscriber system" - - #Negative test cases - assert not cov[0]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_DISPLAY[1], "negative test case failed" - assert not cov[0]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_CODE[1], "negative test case failed" - assert not cov[0]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - - print("FHIR bundle coverage 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - - - - - - - - diff --git a/tests/regression/coverage_2_resource.py b/tests/regression/coverage_2_resource.py deleted file mode 100644 index 10824f3..0000000 --- a/tests/regression/coverage_2_resource.py +++ /dev/null @@ -1,132 +0,0 @@ -from .reg_globals.coverage_reg_globals import( - BENEFICIARY_DISPLAY, - CODING, - CODING_VALUE, - COVERAGE_ID, - COVERAGE_NETWORK, - COVERAGE_ORDER, - COVERAGE_PERIOD_START_DATE, - COVERAGE_PERIOD_END_DATE, - COVERAGE_STATUS, - COVERAGE_SUBSCRIBER_DISPLAY, - COVERAGE_SUBSCRIBER_VALUE, - RELATIONSHIP_CODE, - RELATIONSHIP_DISPLAY -) - -from .reg_globals.reference_urls import( - COVERAGE_FULL_URL_2, - RELATED_PERSON_INSURANCE_FULL_URL_1, - PATIENT_FULL_URL, - ORGANIZATION_PAYOR_FULL_URL_2, -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def insurancecoverage_2_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert cov[1]["fullUrl"] == COVERAGE_FULL_URL_2, "did not match full url" - assert cov[1]["request"]["method"] == REQUEST_TYPE[0], "did not match request type" - assert cov[1]["request"]["url"] == f'{RESOURCE_NAME[2]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[2]}|{MRN}-{FACILITY_ID}-{CODING_VALUE[1]}', "did not match request url" - assert cov[1]["resource"]["beneficiary"]["display"] == BENEFICIARY_DISPLAY, "did not match beneficiary display" - assert cov[1]["resource"]["beneficiary"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[1]["resource"]["beneficiary"]["type"] == RESOURCE_NAME[5], "did not match beneficiary type" - assert cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING[0], "did not match codiing" - assert cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[1], "did not match coding display" - assert cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[2], "did not match coding system" - assert cov[1]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[2]}', "did not match identifier system" - assert cov[1]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[1]}', "did not match identifier value" - assert cov[1]["resource"]["identifier"][1]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[3]}', "did not match identifier system" - assert cov[1]["resource"]["identifier"][1]["value"] == CODING_VALUE[1], "did not match coding value" - assert cov[1]["resource"]["network"] == COVERAGE_NETWORK[1], "did not match coverage network" - assert cov[1]["resource"]["order"] == COVERAGE_ORDER[1], "did not match coverage order" - assert cov[1]["resource"]["payor"][0]["reference"] == ORGANIZATION_PAYOR_FULL_URL_2, "did not match coverage full url" - assert cov[1]["resource"]["period"]["end"] == COVERAGE_PERIOD_END_DATE[1], "did not match coverage end date" - assert cov[1]["resource"]["period"]["start"] == COVERAGE_PERIOD_START_DATE[1], "did not match coverage start date" - assert cov[1]["resource"]["policyHolder"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[3], "did not match relationship code" - assert cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[3], "did not match relationship display" - assert cov[1]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[5]}', "did not match subscriber system" - assert cov[1]["resource"]["status"] == COVERAGE_STATUS[0], "did not match coverage status" - assert cov[1]["resource"]["subscriber"]["display"] == COVERAGE_SUBSCRIBER_DISPLAY[1], "did not match coverage subscriber display" - assert cov[1]["resource"]["subscriber"]["identifier"]["value"] == f'{MRN}-{FACILITY_ID}', "did not match subscriber identifier value" - assert cov[1]["resource"]["subscriber"]["reference"] == PATIENT_FULL_URL, "did not match subscriber reference" - assert cov[1]["resource"]["subscriber"]["type"] == RESOURCE_NAME[5], "did not match subscriber type" - - #Negative test cases - assert not cov[1]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not cov[1]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - assert not cov[1]["request"]["url"] == CODING, "negative test case failed" - assert not cov[1]["resource"]["beneficiary"]["display"] == RELATIONSHIP_CODE[1], "negative test case failed" - assert not cov[1]["resource"]["beneficiary"]["reference"] == COVERAGE_FULL_URL_2, "negative test case failed" - assert not cov[1]["resource"]["beneficiary"]["type"] == BENEFICIARY_DISPLAY, "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING_VALUE[0], "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[2], "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[1], "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["value"] == CODING_VALUE[2], "negative test case failed" - assert not cov[1]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[1]["resource"]["identifier"][0]["value"] == FACILITY_ID, "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[1]["resource"]["identifier"][1]["value"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[1]["resource"]["network"] == COVERAGE_ORDER[1], "negative test case failed" - assert not cov[1]["resource"]["order"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[1]["resource"]["payor"][0]["reference"] == COVERAGE_PERIOD_START_DATE, "negative test case failed" - assert not cov[1]["resource"]["period"]["end"] == COVERAGE_PERIOD_START_DATE[0], "negative test case failede" - assert not cov[1]["resource"]["period"]["start"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[1]["resource"]["policyHolder"]["reference"] == COVERAGE_FULL_URL_2, "negative test case failed" - assert not cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_DISPLAY[2], "negative test case failed" - assert not cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_CODE[2], "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[1]["resource"]["status"] == COVERAGE_ORDER[0], "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["display"] == COVERAGE_NETWORK, "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["identifier"]["value"] == COVERAGE_SUBSCRIBER_VALUE, "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["reference"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["type"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "negative test case failed" - print("FHIR bundle coverage 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[1], "did not match relationship code" - assert cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[1], "did not match relationship display" - assert cov[1]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match subscriber system" - - #Negative test cases - assert not cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[2], "negative test case failed" - assert not cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[2], "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - - print("FHIR bundle coverage 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[3] - assert cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[3] - assert cov[1]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[5]}' - - #Negative test cases - assert not cov[1]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[0], "negative test case failed" - assert not cov[1]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[0], "negative test case failed" - assert not cov[1]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - - print("FHIR bundle coverage 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/coverage_3_resource.py b/tests/regression/coverage_3_resource.py deleted file mode 100644 index 4057cc9..0000000 --- a/tests/regression/coverage_3_resource.py +++ /dev/null @@ -1,106 +0,0 @@ -from .reg_globals.coverage_reg_globals import( - BENEFICIARY_DISPLAY, - CODING, - CODING_VALUE, - COVERAGE_ID, - COVERAGE_NETWORK, - COVERAGE_ORDER, - COVERAGE_PERIOD_START_DATE, - COVERAGE_PERIOD_END_DATE, - COVERAGE_STATUS, - COVERAGE_SUBSCRIBER_DISPLAY, - COVERAGE_SUBSCRIBER_VALUE, - RELATIONSHIP_CODE, - RELATIONSHIP_DISPLAY -) - -from .reg_globals.reference_urls import( - COVERAGE_FULL_URL_3, - RELATED_PERSON_INSURANCE_FULL_URL_3, - PATIENT_FULL_URL, - ORGANIZATION_PAYOR_FULL_URL_3, -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from omniparser_schemas.parser.filter import filter_resource - -def insurancecoverage_3_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - cov = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert cov[2]["fullUrl"] == COVERAGE_FULL_URL_3, "did not match full url" - assert cov[2]["request"]["method"] == REQUEST_TYPE[0], "did not match request type" - assert cov[2]["request"]["url"] == f'{RESOURCE_NAME[2]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[2]}|{MRN}-{FACILITY_ID}-{CODING_VALUE[2]}', "did not match request url" - assert cov[2]["resource"]["beneficiary"]["display"] == BENEFICIARY_DISPLAY, "did not match beneficiary display" - assert cov[2]["resource"]["beneficiary"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[2]["resource"]["beneficiary"]["type"] == RESOURCE_NAME[5], "did not match beneficiary type" - assert cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING[0], "did not match codiing" - assert cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[1], "did not match coding display" - assert cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[2], "did not match coding system" - assert cov[2]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[2]}', "did not match identifier system" - assert cov[2]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_ID[2]}', "did not match identifier value" - assert cov[2]["resource"]["identifier"][1]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[3]}', "did not match identifier system" - assert cov[2]["resource"]["identifier"][1]["value"] == CODING_VALUE[2], "did not match coding value" - assert cov[2]["resource"]["network"] == COVERAGE_NETWORK[2], "did not match coverage network" - assert cov[2]["resource"]["order"] == COVERAGE_ORDER[2], "did not match coverage order" - assert cov[2]["resource"]["payor"][0]["reference"] == ORGANIZATION_PAYOR_FULL_URL_3, "did not match coverage full url" - assert cov[2]["resource"]["period"]["end"] == COVERAGE_PERIOD_END_DATE[2], "did not match coverage end date" - assert cov[2]["resource"]["period"]["start"] == COVERAGE_PERIOD_START_DATE[2], "did not match coverage start date" - assert cov[2]["resource"]["policyHolder"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert cov[2]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_CODE[1], "did not match relationship code" - assert cov[2]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_DISPLAY[1], "did not match relationship display" - assert cov[2]["resource"]["subscriber"]["identifier"]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match subscriber system" - assert cov[2]["resource"]["status"] == COVERAGE_STATUS[0], "did not match coverage status" - assert cov[2]["resource"]["subscriber"]["display"] == COVERAGE_SUBSCRIBER_DISPLAY[0], "did not match coverage subscriber display" - assert cov[2]["resource"]["subscriber"]["identifier"]["value"] == f'{MRN}-{FACILITY_ID}-{COVERAGE_SUBSCRIBER_VALUE[1]}', "did not match subscriber identifier value" - assert cov[2]["resource"]["subscriber"]["reference"] == RELATED_PERSON_INSURANCE_FULL_URL_3 , "did not match subscriber reference" - assert cov[2]["resource"]["subscriber"]["type"] == RESOURCE_NAME[7], "did not match subscriber type" - - #Negative test cases - assert not cov[2]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not cov[2]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - assert not cov[2]["request"]["url"] == CODING, "negative test case failed" - assert not cov[2]["resource"]["beneficiary"]["display"] == RELATIONSHIP_CODE[1], "negative test case failed" - assert not cov[2]["resource"]["beneficiary"]["reference"] == COVERAGE_FULL_URL_3, "negative test case failed" - assert not cov[2]["resource"]["beneficiary"]["type"] == BENEFICIARY_DISPLAY, "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == CODING_VALUE[0], "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == CODING[2], "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == CODING[1], "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["value"] == CODING_VALUE[1], "negative test case failed" - assert not cov[2]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[2]["resource"]["identifier"][0]["value"] == FACILITY_ID, "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[2]["resource"]["identifier"][1]["value"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[2]["resource"]["network"] == COVERAGE_ORDER[1], "negative test case failed" - assert not cov[2]["resource"]["order"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[2]["resource"]["payor"][0]["reference"] == COVERAGE_PERIOD_START_DATE, "negative test case failed" - assert not cov[2]["resource"]["period"]["end"] == COVERAGE_PERIOD_START_DATE[0], "negative test case failede" - assert not cov[2]["resource"]["period"]["start"] == COVERAGE_PERIOD_END_DATE[0], "negative test case failed" - assert not cov[2]["resource"]["policyHolder"]["reference"] == COVERAGE_FULL_URL_3, "negative test case failed" - assert not cov[2]["resource"]["relationship"]["coding"][0]["code"] == RELATIONSHIP_DISPLAY[2], "negative test case failed" - assert not cov[2]["resource"]["relationship"]["coding"][0]["display"] == RELATIONSHIP_CODE[2], "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["identifier"]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not cov[2]["resource"]["status"] == COVERAGE_ORDER[0], "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["display"] == COVERAGE_NETWORK, "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["identifier"]["value"] == COVERAGE_SUBSCRIBER_VALUE, "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["reference"] == RELATIONSHIP_DISPLAY, "negative test case failed" - assert not cov[2]["resource"]["subscriber"]["type"] == PATIENT_FULL_URL, "negative test case failed" - print("FHIR bundle coverage 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - print("FHIR bundle coverage 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") \ No newline at end of file diff --git a/tests/regression/encounter_resource.py b/tests/regression/encounter_resource.py deleted file mode 100644 index e7f651b..0000000 --- a/tests/regression/encounter_resource.py +++ /dev/null @@ -1,113 +0,0 @@ -from .reg_globals.reference_urls import( - PATIENT_FULL_URL, - ENCOUNTER_FULL_URL, - ACCOUNT_FULL_URL, - ATTENDING_PRACTIONER_FULL_URL, - REFERRING_PRACTIONER_FULL_URL, - ORGANIZATION_DEPARTMENT_FULL_URL, -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.enocunter_reg_globals import( - PACID, - ADMIT_DATETIME, - DISCHARGE_DATETIME, - PATIENT_TYPE, - ADMIT_TYPE, - FINANCIAL_CLASS, - CLASS_DISPLAY, - CLASS_CODE, - CLASS_SYSTEM, - PRACTITIONER_CODE, - PRACTITIONER_DISPLAY, - PRACTITIONER_SYSTEM, - ENCOUNTER_STATUS -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def enc_test(resource_name, testfile, identifier_url, identifier_id): - enc = filter_resource(resource_name, testfile, identifier_url, identifier_id) - admitdate = ADMIT_DATETIME - admitdate = admitdate.replace("-", "") - assert enc[0]["fullUrl"] == ENCOUNTER_FULL_URL, "did not match encounter URL" - assert enc[0]["request"]["ifNoneExist"] == f"identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[6]}|{MRN}-{FACILITY_ID}-{admitdate}", "identifier did not match" - assert enc[0]["request"]["url"] == RESOURCE_NAME[3], "did not match request url" - assert enc[0]["request"]["method"] == REQUEST_TYPE[1], "did not match request type" - assert enc[0]["resource"]["account"][0]["reference"] == ACCOUNT_FULL_URL, "did not match account URL" - assert enc[0]["resource"]["account"][0]["type"] == RESOURCE_NAME[0], "did not match reference type" - assert enc[0]["resource"]["class"]["code"] == CLASS_CODE, "did not match class code" - assert enc[0]["resource"]["class"]["display"] == CLASS_DISPLAY, "did not match class display" - assert enc[0]["resource"]["class"]["system"] == CLASS_SYSTEM, " did not match class system" - assert enc[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[6]}', "did not match identifier system" - assert enc[0]["resource"]["identifier"][0]["value"] == f"{MRN}-{FACILITY_ID}-{admitdate}", "did match identifier value" - assert enc[0]["resource"]["identifier"][1]["system"] ==f'{IDENTIFIER_URL}/{IDENTIFIER_ID[7]}', "did not match identifier system" - assert enc[0]["resource"]["identifier"][1]["value"] == PACID, "did not match pacid" - assert enc[0]["resource"]["participant"][0]["individual"]["reference"] == ATTENDING_PRACTIONER_FULL_URL, "did not match attending practioner full url" - assert enc[0]["resource"]["participant"][0]["individual"]["type"] == RESOURCE_NAME[6], "did not match reference type" - assert enc[0]["resource"]["participant"][1]["individual"]["reference"] == REFERRING_PRACTIONER_FULL_URL, "did not match referring practioner full url" - assert enc[0]["resource"]["participant"][1]["individual"]["type"] == RESOURCE_NAME[6], "did not match reference type" - assert enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["code"] == PRACTITIONER_CODE[0], "did not match practitioner code" - assert enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["display"] == PRACTITIONER_DISPLAY[0], "did not match practitioner display" - assert enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["system"] == PRACTITIONER_SYSTEM, "did not match practitioner system" - assert enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["code"] == PRACTITIONER_CODE[1], "did not match practitioner code" - assert enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["display"] == PRACTITIONER_DISPLAY[1], "did not match practitioner display" - assert enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["system"] == PRACTITIONER_SYSTEM, "did not match practitioner system" - assert enc[0]["resource"]["period"]["start"] == ADMIT_DATETIME, "did not match admit date" - assert enc[0]["resource"]["period"]["end"] == DISCHARGE_DATETIME, "did not match discharge date" - assert enc[0]["resource"]["resourceType"] == RESOURCE_NAME[3], "did not match resource type" - assert enc[0]["resource"]["serviceProvider"]["reference"] == ORGANIZATION_DEPARTMENT_FULL_URL, "did not match organization department full url" - assert enc[0]["resource"]["status"] == ENCOUNTER_STATUS, "did not match encounter status" - assert enc[0]["resource"]["subject"]["reference"] == PATIENT_FULL_URL, "did not match patient full url" - assert enc[0]["resource"]["type"][0]["text"] == (ADMIT_TYPE+"|"+PATIENT_TYPE+"|"+FINANCIAL_CLASS), "did not match admit type or patient type or financial class" - - #Negative tests# - assert not enc[0]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not enc[0]["request"]["ifNoneExist"] == DISCHARGE_DATETIME, "negative test case failed" - assert not enc[0]["request"]["url"] == RESOURCE_NAME[2], "negative test case failed" - assert not enc[0]["request"]["method"] == REQUEST_TYPE[0], "negative test case failed" - assert not enc[0]["resource"]["account"][0]["reference"] == ENCOUNTER_FULL_URL, "negative test case failed" - assert not enc[0]["resource"]["account"][0]["type"] == RESOURCE_NAME[3], "negative test case failed" - assert not enc[0]["resource"]["class"]["code"] == CLASS_SYSTEM, "negative test case failed" - assert not enc[0]["resource"]["class"]["display"] == CLASS_CODE, "negative test case failed" - assert not enc[0]["resource"]["class"]["system"] == CLASS_DISPLAY, "negative test case failed" - assert not enc[0]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL[0], "negative test case failed" - assert not enc[0]["resource"]["identifier"][0]["value"] == admitdate, "negative test case failed" - assert not enc[0]["resource"]["identifier"][1]["system"] == IDENTIFIER_ID[1], "negative test case failed" - assert not enc[0]["resource"]["identifier"][1]["value"] == IDENTIFIER_ID, "negative test case failed" - assert not enc[0]["resource"]["participant"][0]["individual"]["reference"] == REFERRING_PRACTIONER_FULL_URL, "negative test case failed" - assert not enc[0]["resource"]["participant"][0]["individual"]["type"] == RESOURCE_NAME[1], "negative test case failed" - assert not enc[0]["resource"]["participant"][1]["individual"]["reference"] == ATTENDING_PRACTIONER_FULL_URL, "negative test case failed" - assert not enc[0]["resource"]["participant"][1]["individual"]["type"] == RESOURCE_NAME[2], "negative test case failed" - assert not enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["code"] == PRACTITIONER_SYSTEM[0], "negative test case failed" - assert not enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["display"] == PRACTITIONER_DISPLAY[1], "negative test case failed" - assert not enc[0]["resource"]["participant"][0]["type"][0]["coding"][0]["system"] == PRACTITIONER_CODE, "negative test case failed" - assert not enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["code"] == PRACTITIONER_SYSTEM[1], "negative test case failed" - assert not enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["display"] == PRACTITIONER_DISPLAY[0], "negative test case failed" - assert not enc[0]["resource"]["participant"][1]["type"][0]["coding"][0]["system"] == PRACTITIONER_CODE, "negative test case failed" - assert not enc[0]["resource"]["period"]["start"] == DISCHARGE_DATETIME, "negative test case failed" - assert not enc[0]["resource"]["period"]["end"] == ADMIT_DATETIME, "negative test case failed" - assert not enc[0]["resource"]["resourceType"] == RESOURCE_NAME[2], "negative test case failed" - assert not enc[0]["resource"]["serviceProvider"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not enc[0]["resource"]["status"] == 1, "negative test case failed" - assert not enc[0]["resource"]["subject"]["reference"] == ACCOUNT_FULL_URL, "negative test case failed" - assert not enc[0]["resource"]["type"][0]["text"] == "failed", "negative test case failed" - - print("FHIR bundle encounter resource tests were successful") \ No newline at end of file diff --git a/tests/regression/main.py b/tests/regression/main.py deleted file mode 100644 index d1420b3..0000000 --- a/tests/regression/main.py +++ /dev/null @@ -1,82 +0,0 @@ -import sys - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from tests.regression.patient_resource import patient_test -from tests.regression.organization_resource import org_test -from tests.regression.encounter_resource import enc_test -from tests.regression.account_resource import acc_test -from tests.regression.coverage_1_resource import insurancecoverage_1_test -from tests.regression.coverage_2_resource import insurancecoverage_2_test -from tests.regression.coverage_3_resource import insurancecoverage_3_test -from tests.regression.relatedperson_resource import relatedperson_test -from tests.regression.relatedperson_insurance_1_resource import relatedperson_insurance_1_test -from tests.regression.relatedperson_insurance_2_resource import relatedperson_insurance_2_test -from tests.regression.relatedperson_insurance_3_resource import relatedperson_insurance_3_test -from tests.regression.practitioner_attending_resource import practitioner_attending_test -from tests.regression.practitioner_referring_resource import practitioner_referring_test -from tests.regression.claim_1_resource import claim_1_test -from tests.regression.claim_2_resource import claim_2_test -from tests.regression.claim_3_resource import claim_3_test -from tests.regression.missing_segment import missing_segment_test - - -def run_tests(): - acc_test(RESOURCE_NAME[0], "1", IDENTIFIER_URL, IDENTIFIER_ID[0]) - claim_1_test(RESOURCE_NAME[1], "1", IDENTIFIER_URL, IDENTIFIER_ID[1]) - claim_1_test(RESOURCE_NAME[1], "2", IDENTIFIER_URL, IDENTIFIER_ID[1]) - claim_2_test(RESOURCE_NAME[1], "1", IDENTIFIER_URL, IDENTIFIER_ID[1]) - claim_3_test(RESOURCE_NAME[1], "1", IDENTIFIER_URL, IDENTIFIER_ID[1]) - insurancecoverage_1_test(RESOURCE_NAME[2], "1", IDENTIFIER_URL, IDENTIFIER_ID[2]) - insurancecoverage_1_test(RESOURCE_NAME[2], "2", IDENTIFIER_URL, IDENTIFIER_ID[2]) - insurancecoverage_1_test(RESOURCE_NAME[2], "3", IDENTIFIER_URL, IDENTIFIER_ID[2]) - insurancecoverage_2_test(RESOURCE_NAME[2], "1", IDENTIFIER_URL, IDENTIFIER_ID[2]) - insurancecoverage_2_test(RESOURCE_NAME[2], "2", IDENTIFIER_URL, IDENTIFIER_ID[2]) - insurancecoverage_2_test(RESOURCE_NAME[2], "3", IDENTIFIER_URL, IDENTIFIER_ID[2]) - # If added insurancecoverage_3_test("insurancecoverage", "2"), insurancecoverage_3_test("insurancecoverage", "3"), it will be repetitive - # The test cases were covered in insurancecoverage_2_test("insurancecoverage", "2"), insurancecoverage_2_test("insurancecoverage", "3") - insurancecoverage_3_test(RESOURCE_NAME[2], "1", IDENTIFIER_URL, IDENTIFIER_ID[2]) - enc_test(RESOURCE_NAME[3], "1", IDENTIFIER_URL, IDENTIFIER_ID[6]) - org_test(RESOURCE_NAME[4], "1", IDENTIFIER_URL, IDENTIFIER_ID[8]) - patient_test(RESOURCE_NAME[5], "1", IDENTIFIER_URL, IDENTIFIER_ID[5]) - patient_test(RESOURCE_NAME[5], "2", IDENTIFIER_URL, IDENTIFIER_ID[5]) - patient_test(RESOURCE_NAME[5], "3", IDENTIFIER_URL, IDENTIFIER_ID[5]) - patient_test(RESOURCE_NAME[5], "4", IDENTIFIER_URL, IDENTIFIER_ID[5]) - patient_test(RESOURCE_NAME[5], "5", IDENTIFIER_URL, IDENTIFIER_ID[5]) - practitioner_attending_test(RESOURCE_NAME[6], "1", IDENTIFIER_URL, IDENTIFIER_ID[10]) - #practitioner referring tests use same test file that is being used by practitioner attending tests - practitioner_referring_test(RESOURCE_NAME[6], "1", IDENTIFIER_URL, IDENTIFIER_ID[10]) - relatedperson_test(RESOURCE_NAME[7], "1", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_test(RESOURCE_NAME[7], "2", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_test(RESOURCE_NAME[7], "3", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_test(RESOURCE_NAME[7], "4", IDENTIFIER_URL, IDENTIFIER_ID[4]) - - relatedperson_insurance_1_test(RESOURCE_NAME[7], "1", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "2", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "3", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "4", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "5", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "6", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_1_test(RESOURCE_NAME[7], "7", IDENTIFIER_URL, IDENTIFIER_ID[4]) - - relatedperson_insurance_2_test(RESOURCE_NAME[7], "1", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_2_test(RESOURCE_NAME[7], "2", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_2_test(RESOURCE_NAME[7], "3", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_2_test(RESOURCE_NAME[7], "4", IDENTIFIER_URL, IDENTIFIER_ID[4]) - - relatedperson_insurance_3_test(RESOURCE_NAME[7], "1", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_3_test(RESOURCE_NAME[7], "2", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_3_test(RESOURCE_NAME[7], "3", IDENTIFIER_URL, IDENTIFIER_ID[4]) - relatedperson_insurance_3_test(RESOURCE_NAME[7], "4", IDENTIFIER_URL, IDENTIFIER_ID[4]) - - missing_segment_test() - -def cli(args=None): - """Process command line arguments.""" - if not args: - args = sys.argv[1:] - run_tests() \ No newline at end of file diff --git a/tests/regression/missing_segment.py b/tests/regression/missing_segment.py deleted file mode 100644 index 7d9db31..0000000 --- a/tests/regression/missing_segment.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import importlib -import json -from omniparser_schemas.parser.universal_etl_parser import fetch_parsed_text - - - -def missing_segment_test(): - - # Get the segments to be tested - segments = "MissingSegments" - - missing_segment_test_data_dir = f"tests/regression/regression_test_data/{segments}" - - filenames = os.listdir(missing_segment_test_data_dir) - - for filename in filenames: - with importlib.resources.path("tests.regression.regression_test_data." + str(segments), str(filename)) as f: - hl7content = f.read_text() - - # The universal parser need to have carriage return - hl7content = hl7content.replace('\\r', '\r') - - # call universal etl parser - fhir_bundle_from_hl7=fetch_parsed_text(hl7content) - fhir_bundle = fhir_bundle_from_hl7[1:-1] - - json_data = json.loads(fhir_bundle) - - OUTPUT_ROOT_PATH = "tests/regression/regression_output/" - PATH = OUTPUT_ROOT_PATH + str(segments) - if not os.path.exists(PATH): - os.makedirs(PATH) - - with open(PATH + "/regression_" + str(segments) + "_" + str(filename) + ".json", "w") as f: - json.dump(json_data, f) - - - print("FHIR bundle with missing segments tests were successful") \ No newline at end of file diff --git a/tests/regression/organization_resource.py b/tests/regression/organization_resource.py deleted file mode 100644 index b719faa..0000000 --- a/tests/regression/organization_resource.py +++ /dev/null @@ -1,40 +0,0 @@ -from .reg_globals.reference_urls import( - ORGANIZATION_FULL_URL, -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def org_test(resource_name, testfile, identifier_url, identifier_id): - org = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert org[0]["fullUrl"] == ORGANIZATION_FULL_URL, "did not match organization resource full url" - assert org[0]["request"]["ifNoneExist"] == f"identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[8]}|{FACILITY_ID}", "did not match organization identifier" - assert org[0]["request"]["method"] == REQUEST_TYPE[1], "did not match post request type" - assert org[0]["request"]["url"] == RESOURCE_NAME[4], "did not match url" - assert org[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[8]}', "did not match system" - assert org[0]["resource"]["identifier"][0]["value"] == FACILITY_ID, "did not match value" - assert org[0]["resource"]["resourceType"] == RESOURCE_NAME[4], "did not match resource type" - - #Negative test cases - assert not org[0]["fullUrl"] == IDENTIFIER_ID[3], "negative test case failed" - assert not org[0]["request"]["ifNoneExist"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not org[0]["request"]["method"] == REQUEST_TYPE[0], "negative test case failed" - assert not org[0]["request"]["url"] == RESOURCE_NAME[1], "negative test case failed" - assert not org[0]["resource"]["identifier"][0]["system"] == FACILITY_ID, "negative test case failed" - assert not org[0]["resource"]["identifier"][0]["value"] == IDENTIFIER_URL, "negative test case failed" - assert not org[0]["resource"]["resourceType"] == IDENTIFIER_ID[3], "negative test case failed" - - print("FHIR bundle organization resource tests were successful") \ No newline at end of file diff --git a/tests/regression/patient_resource.py b/tests/regression/patient_resource.py deleted file mode 100755 index 039398b..0000000 --- a/tests/regression/patient_resource.py +++ /dev/null @@ -1,209 +0,0 @@ -from .reg_globals.patient_reg_global import ( - MRN, - LASTNAME, - FIRSTNAME, - MIDDLENAME, - DOB, - DOD, - GENDER, - ADDRESS1, - ADDRESS2, - CITY, - STATE, - ZIP, - COUNTRY, - ADDRESSTYPE, - ADDRESSUSE, - HOMEPHONE, - HOMEEMAIL, - WORKPHONE, - WORKEMAIL, - PHONETYPE, - HOSPITALPATIENTNUMBER, - SSN, - BIRTHORDER, - MR_CODE, - MR_DISPLAY, - MR_SYSTEM, - SSN_SYSTEM, - SSN_CODE, - SSN_DISPLAY, - SSN_TERMINOLOGY_SYSTEM, - PATIENT_INTERNAL_CODE, - PATIENT_INTERNAL_DISPLAY, - PATIENT_INTERNAL_SYSTEM, - MARITALSTATUS_CODE, - MARITALSTATUS_DISPLAY, - MARITALSTATUS_SYSTEM -) - -from .reg_globals.reference_urls import( - PATIENT_FULL_URL, - ORGANIZATION_FULL_URL -) - -from .reg_globals.request_type import( - REQUEST_TYPE -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def patient_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - pat = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert pat[0]["fullUrl"] == PATIENT_FULL_URL, "did not match patient's full url" - assert pat[0]["request"]["method"] == REQUEST_TYPE[0], "did not match request method" - assert pat[0]["resource"]["identifier"][0]["value"] == MRN, "did not match MRN" - assert pat[0]["resource"]["name"][0]["family"] == LASTNAME, "did not match lastname""" - assert pat[0]["resource"]["name"][0]["given"][0] == FIRSTNAME, "did not match firstname" - assert pat[0]["resource"]["name"][0]["given"][1] == MIDDLENAME, "did not match middlename" - assert pat[0]["resource"]["birthDate"] == DOB, "did not match dob" - assert pat[0]["resource"]["deceasedDateTime"] == DOD, "did not match dod" - assert pat[0]["resource"]["gender"] == GENDER[0], "did not match gender" - assert pat[0]["resource"]["address"][0]["line"][0] == ADDRESS1, "did not match address1" - assert pat[0]["resource"]["address"][0]["line"][1] == ADDRESS2, "did not match address2" - assert pat[0]["resource"]["address"][0]["city"] == CITY, "did not match city" - assert pat[0]["resource"]["address"][0]["state"] == STATE, "did not match state" - assert pat[0]["resource"]["address"][0]["postalCode"] == ZIP, "did not match zip" - assert pat[0]["resource"]["address"][0]["country"] == COUNTRY, "did not match country" - assert pat[0]["resource"]["address"][0]["type"] == ADDRESSTYPE, "did not match addresstype" - assert pat[0]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match addressuse" - assert pat[0]["resource"]["telecom"][0]["value"] == HOMEPHONE, "did not match homephone" - assert pat[0]["resource"]["telecom"][0]["use"] == PHONETYPE[0], "did not match homephonetype" - assert pat[0]["resource"]["telecom"][2]["value"] == HOMEEMAIL, "did not match homeemail" - assert pat[0]["resource"]["telecom"][1]["value"] == WORKPHONE, "did not match workphone" - assert pat[0]["resource"]["telecom"][3]["use"] == PHONETYPE[2], "did not match workphonetype" - assert pat[0]["resource"]["telecom"][3]["value"] == WORKEMAIL, "did not match workemail" - assert pat[0]["resource"]["telecom"][2]["use"] == PHONETYPE[0], "did not match phone type" - assert pat[0]["resource"]["identifier"][2]["value"] == HOSPITALPATIENTNUMBER, "did not match hospital patient number" - assert pat[0]["resource"]["identifier"][1]["value"] == SSN, "did not match SSN" - assert pat[0]["resource"]["multipleBirthInteger"] == BIRTHORDER, "did not match birthorder" - - assert pat[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[5]}', "did not match identifier system" - assert pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == MR_CODE, "did not match MR code" - assert pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["display"] == MR_DISPLAY, "did not match MR display" - assert pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == MR_SYSTEM, "did not match MR system" - assert pat[0]["resource"]["identifier"][1]["system"] == SSN_SYSTEM, "did not match SSN system" - assert pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == SSN_CODE, "did not match SSN code" - assert pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == SSN_DISPLAY, "did not match SSN display" - assert pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_TERMINOLOGY_SYSTEM, "did not match SSN terminology system" - assert pat[0]["resource"]["identifier"][2]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[9]}', "did not match hospital patient system" - assert pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["code"] == PATIENT_INTERNAL_CODE, "did not match patient internal code" - assert pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["display"] == PATIENT_INTERNAL_DISPLAY, "did not match patient internal display" - assert pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["system"] == PATIENT_INTERNAL_SYSTEM, "did not match patient internal system" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_CODE[0], "did not match marital status code" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_DISPLAY[0], "did not match marital status display" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["system"] == MARITALSTATUS_SYSTEM, "did not match marital status system" - assert pat[0]["request"]["url"] == f'{RESOURCE_NAME[5]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[5]}|{MRN}&mrn-assigner={ORGANIZATION_FULL_URL}' - assert pat[0]["resource"]["identifier"][0]["assigner"]["reference"] == ORGANIZATION_FULL_URL, "patient MRN reference did not match with organization reference URL" - assert pat[0]["resource"]["identifier"][2]["assigner"]["reference"] == ORGANIZATION_FULL_URL, "patient account reference did not match with organization reference URL" - - #Negative test cases - assert not pat[0]["resource"]["identifier"][0]["value"] == MR_CODE, "negative test case failed" - assert not pat[0]["resource"]["name"][0]["family"] == MIDDLENAME, "negative test case failed" - assert not pat[0]["resource"]["name"][0]["given"][0] == LASTNAME, "negative test case failed" - assert not pat[0]["resource"]["name"][0]["given"][1] == FIRSTNAME, "negative test case failed" - assert not pat[0]["resource"]["birthDate"] == DOD, "negative test case failed" - assert not pat[0]["resource"]["deceasedDateTime"] == DOB, "negative test case failed" - assert not pat[0]["resource"]["gender"] == CITY, "negative test case failedr" - assert not pat[0]["resource"]["address"][0]["line"][0] == ADDRESS2, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["line"][1] == ADDRESS1, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["city"] == GENDER, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["state"] == COUNTRY, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["postalCode"] == SSN, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["country"] == ADDRESSTYPE, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["type"] == COUNTRY, "negative test case failed" - assert not pat[0]["resource"]["address"][0]["use"] == HOMEEMAIL, "negative test case failed" - assert not pat[0]["resource"]["telecom"][0]["value"] == WORKEMAIL, "negative test case failed" - assert not pat[0]["resource"]["telecom"][0]["use"] == WORKPHONE, "negative test case failed" - assert not pat[0]["resource"]["telecom"][2]["value"] == HOMEPHONE, "negative test case failed" - assert not pat[0]["resource"]["telecom"][1]["value"] == WORKEMAIL, "negative test case failed" - assert not pat[0]["resource"]["telecom"][3]["use"] == PHONETYPE, "negative test case failed" - assert not pat[0]["resource"]["telecom"][2]["use"] == ADDRESSTYPE, "negative test case failed" - assert not pat[0]["resource"]["telecom"][3]["value"] == HOMEEMAIL, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == ADDRESSUSE, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["value"] == SSN, "negative test case failed" - assert not pat[0]["resource"]["identifier"][1]["value"] == HOSPITALPATIENTNUMBER, "negative test case failed" - assert not pat[0]["resource"]["multipleBirthInteger"] == HOMEPHONE, "negative test case failed" - - assert not pat[0]["resource"]["identifier"][0]["system"] == MR_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == MR_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["display"] == MR_CODE, "negative test case failed" - assert not pat[0]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == MR_DISPLAY, "negative test case failed" - assert not pat[0]["resource"]["identifier"][1]["system"] == SSN_CODE, "negative test case failed" - assert not pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == SSN_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == SSN_TERMINOLOGY_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_DISPLAY, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["system"] == PATIENT_INTERNAL_CODE, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["code"] == HOSPITALPATIENTNUMBER, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["display"] == PATIENT_INTERNAL_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["type"]["coding"][0]["system"] == PATIENT_INTERNAL_DISPLAY, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_SYSTEM, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_CODE, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["system"] == MARITALSTATUS_DISPLAY, "negative test case failed" - assert not pat[0]["fullUrl"] == ORGANIZATION_FULL_URL, "negative test case failed" - assert not pat[0]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - - assert not pat[0]["request"]["url"] == {MRN} - - assert not pat[0]["resource"]["identifier"][0]["assigner"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - assert not pat[0]["resource"]["identifier"][2]["assigner"]["reference"] == PATIENT_FULL_URL, "negative test case failed" - - print("FHIR bundle patient resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - pat=filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert pat[0]["resource"]["gender"] == GENDER[1], "did not match gender" - assert pat[0]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match addressuse" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_CODE[1], "did not match marital status code" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_DISPLAY[1], "did not match marital status display" - assert pat[0]["resource"]["telecom"][0]["use"] == PHONETYPE[1], "did not match phone type" - - #negative test cases - - assert not pat[0]["resource"]["gender"] == ADDRESSUSE, "negative test case failedr" - assert not pat[0]["resource"]["address"][0]["use"] == GENDER, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_DISPLAY, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_CODE, "negative test case failed" - assert not pat[0]["resource"]["telecom"][2]["use"] == WORKPHONE, "negative test case failed" - print("FHIR bundle patient resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - pat=filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert pat[0]["resource"]["gender"] == GENDER[2], "did not match gender" - assert pat[0]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "did not match addressuse" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_CODE[2], "did not match marital status code" - assert pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_DISPLAY[2], "did not match marital status display" - - #negative test cases - assert not pat[0]["resource"]["gender"] == ADDRESSUSE, "negative test case failedr" - assert not pat[0]["resource"]["address"][0]["use"] == GENDER, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["code"] == MARITALSTATUS_DISPLAY, "negative test case failed" - assert not pat[0]["resource"]["maritalStatus"]["coding"][0]["display"] == MARITALSTATUS_CODE, "negative test case failed" - - print("FHIR bundle patient resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "4"): - pat=filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert pat[0]["resource"]["address"][0]["use"] == ADDRESSUSE[2], "did not match addressuse" - assert pat[0]["resource"]["birthDate"] == DOB, "did not match dob" - - #negative test cases - assert not pat[0]["resource"]["address"][0]["use"] == ADDRESSTYPE, "negative test case failed" - - print("FHIR bundle patient resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "5"): - pat=filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert pat[0]["resource"]["birthDate"] == DOB, "did not match dob" - diff --git a/tests/regression/practitioner_attending_resource.py b/tests/regression/practitioner_attending_resource.py deleted file mode 100644 index f92385d..0000000 --- a/tests/regression/practitioner_attending_resource.py +++ /dev/null @@ -1,70 +0,0 @@ -from .reg_globals.reference_urls import( - ATTENDING_PRACTIONER_FULL_URL -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.practitioner_reg_globals import( - PRACTITIONER_NPI_NUMBER, - PRACTITIONER_CODING_CODE, - PRACTITIONER_CODING_DSIPLAY, - PRACTITIONER_CODING_SYSTEM, - PRACTITIONER_GIVEN_NAME, - PRACTITIONER_FAMILY_NAME -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def practitioner_attending_test(resource_name, testfile, identifier_url, identifier_id): - attphys = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert attphys[0]["fullUrl"] == ATTENDING_PRACTIONER_FULL_URL, "did not match organization resource full url" - assert attphys[0]["request"]["ifNoneExist"] == f'identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[10]}|{MRN}-{FACILITY_ID}-{PRACTITIONER_NPI_NUMBER[0]}', "did not match practitioner identifier" - assert attphys[0]["request"]["method"] == REQUEST_TYPE[1], "did not match request" - assert attphys[0]["request"]["url"] == RESOURCE_NAME[6], "did not match URL" - assert attphys[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[10]}', "did not match practitioner identifier system" - assert attphys[0]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[0], "did not match practitioner code" - assert attphys[0]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM, "did not match practitioner coding system" - assert attphys[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{PRACTITIONER_NPI_NUMBER[0]}', "did not match practitioner identifier value" - assert attphys[0]["resource"]["identifier"][1]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[11]}', "did not match practitioner identifier system" - assert attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[1], "did not match practitioner code" - assert attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM, "did not match practitioner coding system" - assert attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == PRACTITIONER_CODING_DSIPLAY, "did not match practitioner coding display" - assert attphys[0]["resource"]["identifier"][1]["value"] == PRACTITIONER_NPI_NUMBER[0], "did not match practitioner identifier value" - assert attphys[0]["resource"]["name"][0]["family"] == PRACTITIONER_FAMILY_NAME[0], "did not match practitioner family name" - assert attphys[0]["resource"]["name"][0]["given"][0] == PRACTITIONER_GIVEN_NAME[0], "did not match practitioner given name" - - #negative test cases - assert not attphys[0]["fullUrl"] == PRACTITIONER_NPI_NUMBER[0], "negative test case failed" - assert not attphys[0]["request"]["ifNoneExist"] == f'{MRN}-{PRACTITIONER_NPI_NUMBER[0]}', "negative test case failed" - assert not attphys[0]["request"]["method"] == REQUEST_TYPE[0], "negative test case failed" - assert not attphys[0]["request"]["url"] == IDENTIFIER_ID[2], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][0]["system"] == IDENTIFIER_ID[1], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[1], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM[1], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][0]["value"] == PRACTITIONER_NPI_NUMBER[1], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][1]["system"] == IDENTIFIER_ID[0], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[0], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM[0], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == REQUEST_TYPE[1], "negative test case failed" - assert not attphys[0]["resource"]["identifier"][1]["value"] == PRACTITIONER_NPI_NUMBER[1], "negative test case failed" - assert not attphys[0]["resource"]["name"][0]["family"] == PRACTITIONER_GIVEN_NAME, "negative test case failed" - assert not attphys[0]["resource"]["name"][0]["given"][0] == PRACTITIONER_FAMILY_NAME, "negative test case failed" - - - print("FHIR bundle attending practitioner resource tests were successful") \ No newline at end of file diff --git a/tests/regression/practitioner_referring_resource.py b/tests/regression/practitioner_referring_resource.py deleted file mode 100644 index 0fdf6c3..0000000 --- a/tests/regression/practitioner_referring_resource.py +++ /dev/null @@ -1,70 +0,0 @@ -from .reg_globals.reference_urls import( - REFERRING_PRACTIONER_FULL_URL -) - -from .reg_globals.request_type import( - REQUEST_TYPE, -) - -from .reg_globals.practitioner_reg_globals import( - PRACTITIONER_NPI_NUMBER, - PRACTITIONER_CODING_CODE, - PRACTITIONER_CODING_DSIPLAY, - PRACTITIONER_CODING_SYSTEM, - PRACTITIONER_GIVEN_NAME, - PRACTITIONER_FAMILY_NAME -) - -from .reg_globals.patient_reg_global import( - MRN -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def practitioner_referring_test(resource_name, testfile, identifier_url, identifier_id): - refphys = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert refphys[1]["fullUrl"] == REFERRING_PRACTIONER_FULL_URL, "did not match organization resource full url" - assert refphys[1]["request"]["ifNoneExist"] == f'identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[10]}|{MRN}-{FACILITY_ID}-{PRACTITIONER_NPI_NUMBER[1]}', "did not match practitioner identifier" - assert refphys[1]["request"]["method"] == REQUEST_TYPE[1], "did not match request" - assert refphys[1]["request"]["url"] == RESOURCE_NAME[6], "did not match URL" - assert refphys[1]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[10]}', "did not match practitioner identifier system" - assert refphys[1]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[0], "did not match practitioner code" - assert refphys[1]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM, "did not match practitioner coding system" - assert refphys[1]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{PRACTITIONER_NPI_NUMBER[1]}', "did not match practitioner identifier value" - assert refphys[1]["resource"]["identifier"][1]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[11]}', "did not match practitioner identifier system" - assert refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[1], "did not match practitioner code" - assert refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM, "did not match practitioner coding system" - assert refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == PRACTITIONER_CODING_DSIPLAY, "did not match practitioner coding display" - assert refphys[1]["resource"]["identifier"][1]["value"] == PRACTITIONER_NPI_NUMBER[1], "did not match practitioner identifier value" - assert refphys[1]["resource"]["name"][0]["family"] == PRACTITIONER_FAMILY_NAME[1], "did not match practitioner family name" - assert refphys[1]["resource"]["name"][0]["given"][0] == PRACTITIONER_GIVEN_NAME[1], "did not match practitioner given name" - - #negative test cases - assert not refphys[1]["fullUrl"] == PRACTITIONER_NPI_NUMBER[0], "negative test case failed" - assert not refphys[1]["request"]["ifNoneExist"] == f'{MRN}-{PRACTITIONER_NPI_NUMBER[0]}', "negative test case failed" - assert not refphys[1]["request"]["method"] == REQUEST_TYPE[0], "negative test case failed" - assert not refphys[1]["request"]["url"] == IDENTIFIER_ID[2], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][0]["system"] == IDENTIFIER_ID[1], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][0]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[1], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][0]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM[1], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][0]["value"] == PRACTITIONER_NPI_NUMBER[1], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][1]["system"] == IDENTIFIER_ID[0], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["code"] == PRACTITIONER_CODING_CODE[0], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == PRACTITIONER_CODING_SYSTEM[0], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][1]["type"]["coding"][0]["display"] == REQUEST_TYPE[0], "negative test case failed" - assert not refphys[1]["resource"]["identifier"][1]["value"] == PRACTITIONER_NPI_NUMBER[0], "negative test case failed" - assert not refphys[1]["resource"]["name"][0]["family"] == PRACTITIONER_GIVEN_NAME, "negative test case failed" - assert not refphys[1]["resource"]["name"][0]["given"][0] == PRACTITIONER_FAMILY_NAME, "negative test case failed" - - - print("FHIR bundle referring practitioner resource tests were successful") \ No newline at end of file diff --git a/tests/regression/reg_globals/account_reg_globals.py b/tests/regression/reg_globals/account_reg_globals.py deleted file mode 100644 index c44cffa..0000000 --- a/tests/regression/reg_globals/account_reg_globals.py +++ /dev/null @@ -1,4 +0,0 @@ -STATUS="active" -ACCOUNT_CODE="PBILLACCT" -ACCOUNT_DISPLAY="Patient Billing Account" -CODE_SYSTEM="http://terminology.hl7.org/CodeSystem/v3-ActCode" \ No newline at end of file diff --git a/tests/regression/reg_globals/claim_reg_globals.py b/tests/regression/reg_globals/claim_reg_globals.py deleted file mode 100644 index e7fbeef..0000000 --- a/tests/regression/reg_globals/claim_reg_globals.py +++ /dev/null @@ -1,7 +0,0 @@ -CLAIM_AUTH_NUMBER=["3456T789", "20071PED", "7899PDX1"] -CLAIM_SEQUENCE=1 -CLAIM_STATUS="active" -CLAIM_CODE=["normal","institutional"] -CLAIM_CODE_SYSTEM=["http://terminology.hl7.org/CodeSystem/processpriority", "http://terminology.hl7.org/CodeSystem/claim-type"] -CLAIM_CODE_DISPLAY="Institutional" -CLAIM_USE="preauthorization" \ No newline at end of file diff --git a/tests/regression/reg_globals/coverage_reg_globals.py b/tests/regression/reg_globals/coverage_reg_globals.py deleted file mode 100644 index 9a055c9..0000000 --- a/tests/regression/reg_globals/coverage_reg_globals.py +++ /dev/null @@ -1,15 +0,0 @@ -BENEFICIARY_DISPLAY="Patient (Ins Policy Beneficiary)" -CLASS=["group","Group","http://terminology.hl7.org/CodeSystem/coverage-class"] -CLASS_VALUE=["1234"] -COVERAGE_ID=["5678", "1789", "1112"] -CODING=["MB", "Member Number", "http://terminology.hl7.org/CodeSystem/v2-0203"] -CODING_VALUE=["5678","1789", "1112"] -COVERAGE_NETWORK=["130", "131", "132"] -COVERAGE_ORDER=[1, 2, 3] -COVERAGE_PERIOD_START_DATE=["2023-01-01", "2023-02-02", "2023-03-03"] -COVERAGE_PERIOD_END_DATE=["2025-01-01", "2025-02-02", "2025-03-03"] -COVERAGE_STATUS=["active"] -COVERAGE_SUBSCRIBER_DISPLAY=["Subscriber (RelatedPerson)", "Subscriber (Patient)"] -COVERAGE_SUBSCRIBER_VALUE=["2000805", "211145"] -RELATIONSHIP_CODE = ["spouse", "child", "other", "self"] -RELATIONSHIP_DISPLAY = ["Spouse", "Child", "Other", "Self"] diff --git a/tests/regression/reg_globals/enocunter_reg_globals.py b/tests/regression/reg_globals/enocunter_reg_globals.py deleted file mode 100644 index 9fe9c3c..0000000 --- a/tests/regression/reg_globals/enocunter_reg_globals.py +++ /dev/null @@ -1,14 +0,0 @@ -ADMIT_TYPE="NB" -PATIENT_TYPE="CONF" -FINANCIAL_CLASS="COMM C" -ADMIT_DATETIME="2023-04-11" -DISCHARGE_DATETIME="2023-05-11" -PACID="pacid123" - -CLASS_CODE="IMP" -CLASS_DISPLAY="inpatient encounter" -CLASS_SYSTEM="http://terminology.hl7.org/CodeSystem/v3-ActCode" -PRACTITIONER_CODE=["ATND","REF"] -PRACTITIONER_DISPLAY=["Attending","Referring"] -PRACTITIONER_SYSTEM="http://terminology.hl7.org/CodeSystem/v3-ParticipationType" -ENCOUNTER_STATUS="planned" \ No newline at end of file diff --git a/tests/regression/reg_globals/identifier_urls.py b/tests/regression/reg_globals/identifier_urls.py deleted file mode 100644 index 4469a6a..0000000 --- a/tests/regression/reg_globals/identifier_urls.py +++ /dev/null @@ -1,3 +0,0 @@ -IDENTIFIER_URL="https://pediatrix.com/fhir/NamingSystem" -IDENTIFIER_ID=["patientAccount-id", "claim-id", "coverage-id", "insurance-policy-id", "relatedPerson-id", "mrn-id", "patient-demographics-update-id", "pac-id", "facilityId-id", "hospital-patient-id", "us-npi-id", "npi-id"] -RESOURCE_NAME=["Account", "Claim", "Coverage", "Encounter", "Organization", "Patient", "Practitioner", "RelatedPerson"] \ No newline at end of file diff --git a/tests/regression/reg_globals/organization_reg_globals.py b/tests/regression/reg_globals/organization_reg_globals.py deleted file mode 100644 index 5e8cfc0..0000000 --- a/tests/regression/reg_globals/organization_reg_globals.py +++ /dev/null @@ -1 +0,0 @@ -FACILITY_ID="{{FacilityId}}" diff --git a/tests/regression/reg_globals/patient_reg_global.py b/tests/regression/reg_globals/patient_reg_global.py deleted file mode 100644 index 6d98426..0000000 --- a/tests/regression/reg_globals/patient_reg_global.py +++ /dev/null @@ -1,41 +0,0 @@ -MRN="TEST333345038900" -LASTNAME="patient1" -FIRSTNAME="girl1testing" -MIDDLENAME="sprg" -DOB="2023-04-11" -DOD="2123-06-20" -GENDER=["male", "female", "unknown"] -ADDRESS1="111 first st" -ADDRESS2="apt 1" -CITY="somewhere" -STATE="fl" -ZIP="55555-5555" -COUNTRY="US" -ADDRESSUSE=["home","billing","work"] -ADDRESSTYPE="physical" -HOMEPHONE="(479)555-5874" -HOMEEMAIL="pid1@gmail.com" -WORKPHONE="(479)555-5875" -WORKEMAIL="pid12@gmail.com" -PHONETYPE=["home","mobile","work"] -HOSPITALPATIENTNUMBER="9543332222" -SSN="999999999" -#MULTIPLEBIRTH in HL7 message will transform to mulitplebirth integer if multiple birth is "Y" -BIRTHORDER=2 -MR_CODE="MR" -MR_DISPLAY="Medical Record Number" -MR_SYSTEM="http://terminology.hl7.org/CodeSystem/v2-0203" -SSN_SYSTEM="http://hl7.org/fhir/sid/us-ssn" -SSN_CODE="SS" -SSN_DISPLAY="Social Security Number" -SSN_TERMINOLOGY_SYSTEM="http://terminology.hl7.org/CodeSystem/v2-0203" -PATIENT_INTERNAL_CODE="PI" -PATIENT_INTERNAL_DISPLAY="Patient Internal Identifier" -PATIENT_INTERNAL_SYSTEM="http://terminology.hl7.org/CodeSystem/v2-0203" -MARITALSTATUS_CODE=["M","U","D"] -MARITALSTATUS_DISPLAY=["Married", "Unmarried", "Divorced"] -MARITALSTATUS_SYSTEM="http://terminology.hl7.org/CodeSystem/v3-MaritalStatus" - -# Below are place holders but we are not transforming admit date and dsicharge date from PID segment -#ADMITDATE="" -#DISCHARGEDATE="" \ No newline at end of file diff --git a/tests/regression/reg_globals/practitioner_reg_globals.py b/tests/regression/reg_globals/practitioner_reg_globals.py deleted file mode 100644 index 191edf5..0000000 --- a/tests/regression/reg_globals/practitioner_reg_globals.py +++ /dev/null @@ -1,7 +0,0 @@ -PRACTITIONER_CODING_CODE=["PRN","NPI"] -PRACTITIONER_CODING_DSIPLAY="National Provider Identifier" -PRACTITIONER_CODING_SYSTEM="http://terminology.hl7.org/CodeSystem/v2-0203" -PRACTITIONER_NPI_NUMBER=["15236798", "15236799"] -PRACTITIONER_GIVEN_NAME=["PHYSICIAN", "NURSE"] -PRACTITIONER_FAMILY_NAME=["SOM IP", "MOV GR"] - diff --git a/tests/regression/reg_globals/reference_urls.py b/tests/regression/reg_globals/reference_urls.py deleted file mode 100644 index 7e4dc41..0000000 --- a/tests/regression/reg_globals/reference_urls.py +++ /dev/null @@ -1,22 +0,0 @@ -PATIENT_FULL_URL="urn:uuid:61ebe121-aa01-0001-0001-983a382abcd7" -ORGANIZATION_FULL_URL="urn:uuid:61ebe121-aa02-0001-0001-983a382abcd7" -ORGANIZATION_PAYOR_FULL_URL_1="urn:uuid:61ebe121-aa02-0002-0001-983a382abcd7" -ORGANIZATION_PAYOR_FULL_URL_2="urn:uuid:61ebe121-aa02-0002-0002-983a382abcd7" -ORGANIZATION_PAYOR_FULL_URL_3="urn:uuid:61ebe121-aa02-0002-0003-983a382abcd7" -ORGANIZATION_DEPARTMENT_FULL_URL="urn:uuid:61ebe121-aa02-0003-0001-983a382abcd7" -ENCOUNTER_FULL_URL="urn:uuid:61ebe121-aa03-0001-0001-983a382abcd7" -ACCOUNT_FULL_URL="urn:uuid:61ebe121-aa04-0001-0001-983a382abcd7" -RELATED_PERSON_GUARANTOR_FULL_URL_1="urn:uuid:61ebe121-aa05-0001-0001-983a382abcd7" -RELATED_PERSON_GUARANTOR_FULL_URL_2="urn:uuid:61ebe121-aa05-0001-0002-983a382abcd7" -RELATED_PERSON_GUARANTOR_FULL_URL_3="urn:uuid:61ebe121-aa05-0001-0003-983a382abcd7" -RELATED_PERSON_INSURANCE_FULL_URL_1="urn:uuid:61ebe121-aa05-0002-0001-983a382abcd7" -RELATED_PERSON_INSURANCE_FULL_URL_2="urn:uuid:61ebe121-aa05-0002-0002-983a382abcd7" -RELATED_PERSON_INSURANCE_FULL_URL_3="urn:uuid:61ebe121-aa05-0002-0003-983a382abcd7" -COVERAGE_FULL_URL_1="urn:uuid:61ebe121-aa06-0001-0001-983a382abcd7" -COVERAGE_FULL_URL_2="urn:uuid:61ebe121-aa06-0001-0002-983a382abcd7" -COVERAGE_FULL_URL_3="urn:uuid:61ebe121-aa06-0001-0003-983a382abcd7" -ATTENDING_PRACTIONER_FULL_URL="urn:uuid:61ebe121-aa07-0001-0001-983a382abcd7" -REFERRING_PRACTIONER_FULL_URL="urn:uuid:61ebe121-aa07-0002-0001-983a382abcd7" -CLAIM_RESOURCE_FULL_URL_1="urn:uuid:61ebe121-aa08-0001-0001-983a382abcd7" -CLAIM_RESOURCE_FULL_URL_2="urn:uuid:61ebe121-aa08-0001-0002-983a382abcd7" -CLAIM_RESOURCE_FULL_URL_3="urn:uuid:61ebe121-aa08-0001-0003-983a382abcd7" \ No newline at end of file diff --git a/tests/regression/reg_globals/relatedperson_insurance_reg_global.py b/tests/regression/reg_globals/relatedperson_insurance_reg_global.py deleted file mode 100644 index 806e2b0..0000000 --- a/tests/regression/reg_globals/relatedperson_insurance_reg_global.py +++ /dev/null @@ -1,24 +0,0 @@ -ADDRESS1=["123 downing st", "456 downing st", "789 downing st"] -ADDRESS2=["apt 1", "apt 2", "apt 3"] -CITY=["Gainesville", "Edison", "BOSTON"] -STATE=["FL", "NJ", "MA"] -ZIP=["33312-5555", "19702-5342", "98912-6543"] -COUNTRY="US" -ADDRESSUSE=["home","billing","work"] -DOB=["1985-02-07","1987-03-04", "1989-02-01"] -GENDER=["female", "male", "unknown"] -HOMEPHONE=["(479)555-5874", "(489)556-5875", "(499)557-5876"] -SSN=["999999999", "999999999", "999999999"] -SSN_CODING_SYSTEM="https://terminology.hl7.org/5.0.0/CodeSystem-v2-0203" -LASTNAME=["relpatientIN1", "relpatient2IN1", "relpatient3IN1"] -FIRSTNAME=["reltestingIN1", "reltesting2IN1", "reltesting3IN1"] -MIDDLENAME=["relSPRGIN1", "relSPRG2IN1", "relSPRG3IN1"] -TELECOM_SYSTEM=["phone","email"] -ADDRESSTYPE="physical" -HOMEPHONE=["(555)111-2221", "(556)112-2222", "(557)113-2223"] -HOMEEMAIL=["In1@gmail.com", "In2@gmail.com", "In3@gmail.com"] -WORKPHONE=["(555)111-2222", "(556)112-2223", "(557)113-2224"] -WORKEMAIL=["In12@gmail.com", "In22@gmail.com", "In32@gmail.com"] -PHONETYPE=["home","mobile","work"] -RELATEDPERSON_INSURANCE_ID=["2000805", "2007118", "2000805"] -INSURANCE_SET_ID=["IN1-1"] diff --git a/tests/regression/reg_globals/relatedperson_reg_global.py b/tests/regression/reg_globals/relatedperson_reg_global.py deleted file mode 100644 index 1829d3a..0000000 --- a/tests/regression/reg_globals/relatedperson_reg_global.py +++ /dev/null @@ -1,24 +0,0 @@ -RELATED_PERSON_ID=["100003699"] -ADDRESS1=["1500 corporate Drive"] -ADDRESS2=["Suite 101"] -CITY="SUNRISE" -STATE="FL" -ZIP="33322" -COUNTRY="US" -ADDRESSUSE=["home","billing","work"] -DOB="1987-01-08" -GENDER=["female", "male", "unknown"] -HOMEPHONE="(479)555-5874" -SSN="999999999" -SSN_CODING_SYSTEM="https://terminology.hl7.org/5.0.0/CodeSystem-v2-0203" -LASTNAME=["relpatient1"] -FIRSTNAME=["reltesting1"] -MIDDLENAME=["relSPRG1"] -TELECOM_SYSTEM=["phone","email"] -ADDRESSTYPE="physical" -HOMEPHONE="(555)555-5551" -HOMEEMAIL="gt1@gmail.com" -WORKPHONE="(555)555-5552" -WORKEMAIL="gt12@gmail.com" -PHONETYPE=["home","mobile","work"] -RELATEDPERSON_ID=["100003699"] diff --git a/tests/regression/reg_globals/request_type.py b/tests/regression/reg_globals/request_type.py deleted file mode 100644 index 71b1a73..0000000 --- a/tests/regression/reg_globals/request_type.py +++ /dev/null @@ -1,2 +0,0 @@ -REQUEST_TYPE=["PUT", "POST"] -N_REQUEST_TYPE=["GET", "PATCH"] \ No newline at end of file diff --git a/tests/regression/regression_test_data/Account/Account_test_data_1.txt b/tests/regression/regression_test_data/Account/Account_test_data_1.txt deleted file mode 100644 index 458509f..0000000 --- a/tests/regression/regression_test_data/Account/Account_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rGT1|2|1000036100|patient1^testing1^SPRG1^||1501 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt2@gmail.com^^555^5555551|(555)555-5552^P^7^gt22@gmail.com^^555^5555551|19870107|F|P/F|MOT|105-45-2155||||||||\rGT1|3|1000036101|patient2^testing2^SPRG2^||1502 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt3@gmail.com^^555^5555551|(555)555-5552^P^7^gt32@gmail.com^^555^5555551|19870106|F|P/F|MOT|105-45-2156||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Claim/Claim_test_data_1.txt b/tests/regression/regression_test_data/Claim/Claim_test_data_1.txt deleted file mode 100644 index 1d7b5ba..0000000 --- a/tests/regression/regression_test_data/Claim/Claim_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|7899PDX1|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|1112|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Claim/Claim_test_data_2.txt b/tests/regression/regression_test_data/Claim/Claim_test_data_2.txt deleted file mode 100644 index cea205a..0000000 --- a/tests/regression/regression_test_data/Claim/Claim_test_data_2.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465||||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202||130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|7899PDX1|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Coverage/Coverage_test_data_1.txt b/tests/regression/regression_test_data/Coverage/Coverage_test_data_1.txt deleted file mode 100644 index 5458959..0000000 --- a/tests/regression/regression_test_data/Coverage/Coverage_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|SPOUSE|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|131|PATIENT^TESTING^K^|SELF|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|211145^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1112|TEST|||20230303|20250303|3456T789|132|patient^testing^L^|FATHER|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|1112|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1||2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Coverage/Coverage_test_data_2.txt b/tests/regression/regression_test_data/Coverage/Coverage_test_data_2.txt deleted file mode 100644 index 9ea1398..0000000 --- a/tests/regression/regression_test_data/Coverage/Coverage_test_data_2.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|FAT|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|131|PATIENT^TESTING^K^|MOT|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|CHILD|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Coverage/Coverage_test_data_3.txt b/tests/regression/regression_test_data/Coverage/Coverage_test_data_3.txt deleted file mode 100644 index d6facae..0000000 --- a/tests/regression/regression_test_data/Coverage/Coverage_test_data_3.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|SELF|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|S|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1||2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|CHILD|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Encounter/Encounter_test_data_1.txt b/tests/regression/regression_test_data/Encounter/Encounter_test_data_1.txt deleted file mode 100644 index d0ea5ad..0000000 --- a/tests/regression/regression_test_data/Encounter/Encounter_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/AL1DG1.txt b/tests/regression/regression_test_data/MissingSegments/AL1DG1.txt deleted file mode 100644 index 343a29a..0000000 --- a/tests/regression/regression_test_data/MissingSegments/AL1DG1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rAL1|1|SYSTEMIC|^NO KNOWN ALLERGIES^\rDG1|1||^Newborn|Newborn||^W\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZSU|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/ARV.txt b/tests/regression/regression_test_data/MissingSegments/ARV.txt deleted file mode 100644 index 7b2d331..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ARV.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rARV|1|S|CELEBCONFIDENTIAL||Patient is a widely known celebrity. Restrict communication of parties involved.\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rAL1|1|SYSTEMIC|^NO KNOWN ALLERGIES^\rDG1|1||^Newborn|Newborn||^W\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZSU|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/IAM.txt b/tests/regression/regression_test_data/MissingSegments/IAM.txt deleted file mode 100644 index 868dd87..0000000 --- a/tests/regression/regression_test_data/MissingSegments/IAM.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rARV|1|S|CELEBCONFIDENTIAL||Patient is a widely known celebrity. Restrict communication of parties involved.\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rIAM|1|DRUG INGREDI|4615^SERTRALINE^HIC||OTHER|A|12345678||||20230907||20230907|119444^BLUE^JIM||||119444^BLUE^JIM||20230907\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/NK1.txt b/tests/regression/regression_test_data/MissingSegments/NK1.txt deleted file mode 100644 index bf0254c..0000000 --- a/tests/regression/regression_test_data/MissingSegments/NK1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rNK1|1|ARES^ARES^^|F|MANOVER STREET^BLOCK 23 2077^NEW YORK^NY^10001^US|(555)111-2222^^PH^^^555^1112222||Emergency Contact 1\rNK1|2|ARES^ARES^^|F|MANOVER STREET^BLOCK 23 2077^NEW YORK^NY^10001^US|(555)111-2222^^PH^^^555^1112222||Partner\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rAL1|1|SYSTEMIC|^NO KNOWN ALLERGIES^\rDG1|1||^Newborn|Newborn||^W\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZSU|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/ZAC.txt b/tests/regression/regression_test_data/MissingSegments/ZAC.txt deleted file mode 100644 index d7c664a..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ZAC.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|1|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|1|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|2|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|3|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|4|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|1|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|1|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|2|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\r diff --git a/tests/regression/regression_test_data/MissingSegments/ZCS.txt b/tests/regression/regression_test_data/MissingSegments/ZCS.txt deleted file mode 100644 index 7b2d331..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ZCS.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rARV|1|S|CELEBCONFIDENTIAL||Patient is a widely known celebrity. Restrict communication of parties involved.\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rAL1|1|SYSTEMIC|^NO KNOWN ALLERGIES^\rDG1|1||^Newborn|Newborn||^W\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZSU|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/ZMS.txt b/tests/regression/regression_test_data/MissingSegments/ZMS.txt deleted file mode 100644 index 55d6759..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ZMS.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZMS|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/MissingSegments/ZNM.txt b/tests/regression/regression_test_data/MissingSegments/ZNM.txt deleted file mode 100644 index feb3338..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ZNM.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|1|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|1|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|2|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|3|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|4|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|1|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|1|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|2|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rUB1||||||||||||||||23^20230907\rZAD|NA|||||||||||||||||WILLSTOUT,STUART|NO|\rZNM|LIU,BABY GIRL SHARON PAN|945687|A||NEWBORN, C SECTION, PREMATURITY/RDS|||||||\rZVQ|||||||N|101||||||||||||||||||\rZMS||||||||||||||||||||||||||||||||||||||||||||||||||||||||\rZMD|2429^1386053031|2429^1386053031||||\rZET|202404091315\rZCQ|1|1|ST|HIE^HIE OPT OUT?|N|||\rZCQ|1|1|CE|MEDGROUP^MEDICAL GROUP|RMG^REGAL MED GRP|||\rZCQ|2|1|CE|MEDGROUP^MEDICAL GROUP|RMG^REGAL MED GRP|||\rZCQ|3|1|CE|MEDGROUP^MEDICAL GROUP|NONE^NONE|||\r diff --git a/tests/regression/regression_test_data/MissingSegments/ZSU.txt b/tests/regression/regression_test_data/MissingSegments/ZSU.txt deleted file mode 100644 index 9ffef9e..0000000 --- a/tests/regression/regression_test_data/MissingSegments/ZSU.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\\&|MS4_NY|BAOM|PDX|437|20230907070903||ADT^A08|00000000300746007|P|2.3\rEVN|A08|20230907070902|||TUSER1\rPID|1|H1234^^^MS4^PN|MR4567^^^MS4^MR^437||WICK^JOHN||19960513|Male||2106-3|123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|NYC|(555)888-1234||en|Single|OTH|31184017||||U|NY|||USA\rZPD||||ACTIVATED|||Y|20240507||||||||||N\rZTP|Health Maintenance Reminders^Health Maintenance Reminders|MYCH^Y\rZTP|Bulk Communication^Bulk Communication|MYCH^Y~Mail^Y\rZTP|Communication Management^Communication Management|MYCH^Y\rZTP|New Estimate^New Estimate|Email^Y~Push^Y~Text^Y\rPD1||||128303^BAUER^JANE^A|||N|||||N\rPV1||E||1|||116596^KAPUR^SIMRAN^S^^^MD|128303^BAUER^JANE^A||EER||||1||||E|00031184017437|2115|||||||||||||||||||BAOM|||||202309070619\rDG1|0001|I10||POV CP DIFF BREATHING||A|||||||||0\rOBX|0001|NM|PRICSN|1|735464236||||||M|||||||||||||||||||||\rOBX|0002|NM|HT^HEIGHT||51.5|cm||||||||20230745145100||||||||||||||||||\rOBX|0003|NM|WT^WEIGHT||2.872|kg||||||||20230752000000||||||||||||||||||\rOBX|0004|TX|ContactType^CONTACT TYPE|1|3|||||||||20240508||||||||||||||||||\rGT1|0001|00H1234^^^MS4^PN|WICK^JOHN||123 MAIN ST^^ANYTOWN^NY^11210^USA^^NYC|(555)888-1234||19960513|M||A|||||DISABLED||||2|||||||||0000000002|S||||||||Y|||YYY||||||||||||||C\rIN1|0001|INS123456|2115|MERCY CARE RBHA|PO BOX 64835^^PHOENIX^NY^85082||(866)796-5598||||||||MCD|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||1|||||N|||||||||INS123456||||||3|M||N||||00H1234\rIN1|0002|INS222456|0094|PENDING MEDICAID IHMS|^^^^ |||999999|PENDING||||||COM|WICK^JOHN|A|19960513|123 MAIN ST^^ANYTOWN^NY^11210^USA|||2|||||N|||||||||INS222456||||||3|M||N||||00H1234\rUB1||||||||||||||||23^20230907\rZAC|EXPLOSIVE EXPLODED IN PT FACE\rZQA|1|589723|^589724~^589725~^589726~^589727~^589728~^589729~^589730~^589731~^589732~^589733~^589734~^589735~^589736~^589737~^589738~^589739~^589740~^589741~^589742~^589743~^589744~^589745~^589746~^589747~^589748~^589749~^589750~^589751~^589752~^589753~^589754~^589755~^589756~^589757~^589758~^589759~^589760~^589761~^589762\rZCS||^^^^||||00005\rZSU|A44\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/Organization/Organization_test_data_1.txt b/tests/regression/regression_test_data/Organization/Organization_test_data_1.txt deleted file mode 100644 index d0ea5ad..0000000 --- a/tests/regression/regression_test_data/Organization/Organization_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Patient/Patient_test_data_1.txt b/tests/regression/regression_test_data/Patient/Patient_test_data_1.txt deleted file mode 100644 index 0dabd00..0000000 --- a/tests/regression/regression_test_data/Patient/Patient_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|male|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||MARRIED||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Patient/Patient_test_data_2.txt b/tests/regression/regression_test_data/Patient/Patient_test_data_2.txt deleted file mode 100644 index 68cf063..0000000 --- a/tests/regression/regression_test_data/Patient/Patient_test_data_2.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||2023041110|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^H||(479)555-5874^^CP^pid1@gmail.com^^479^5555874|(479)555-5875^^CP^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Patient/Patient_test_data_3.txt b/tests/regression/regression_test_data/Patient/Patient_test_data_3.txt deleted file mode 100644 index 6a92d28..0000000 --- a/tests/regression/regression_test_data/Patient/Patient_test_data_3.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||202304111030||||111 first st^apt 1^somewhere^fl^55555-5555^US^M||(479)555-5874^^CP^pid1@gmail.com^^479^5555874|(479)555-5875^^CP^pid12@gmail.com^^479^5555874||D||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Patient/Patient_test_data_4.txt b/tests/regression/regression_test_data/Patient/Patient_test_data_4.txt deleted file mode 100644 index df44902..0000000 --- a/tests/regression/regression_test_data/Patient/Patient_test_data_4.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411103000|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^O||(479)555-5874^^CP^pid1@gmail.com^^479^5555874|(479)555-5875^^CP^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Patient/Patient_test_data_5.txt b/tests/regression/regression_test_data/Patient/Patient_test_data_5.txt deleted file mode 100644 index bee8672..0000000 --- a/tests/regression/regression_test_data/Patient/Patient_test_data_5.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||202304111030-0500|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^||(479)555-5874^^CP^pid1@gmail.com^^479^5555874|(479)555-5875^^CP^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/Practitioner/Practitioner_test_data_1.txt b/tests/regression/regression_test_data/Practitioner/Practitioner_test_data_1.txt deleted file mode 100644 index 36e7550..0000000 --- a/tests/regression/regression_test_data/Practitioner/Practitioner_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|male|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||MARRIED||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^MOV GR^NURSE^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|patient^testing^SPRG^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_1.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_1.txt deleted file mode 100644 index 6be3ec0..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_1.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|0001|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US|(555)555-5551^P^7^gt1@gmail.com^^555^5555551|(555)555-5552^P^7^gt12@gmail.com^^555^5555551|19870108103000-0500^s|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|relpatientIN1^reltestingIN1^relSPRGIN1^|Child|198502071030.123|123 downing st^apt 1^Gainesville^FL^33312-5555^US^H|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^^In1@gmail.com|(555)111-2222^^^In12@gmail.com\rIN2||954-333-2223|||Payer Plan|789101|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^^In1@gmail.com|(555)111-2222^^^In12@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|relpatient2IN1^reltesting2IN1^relSPRG2IN1^|Child|19870304161242.0000-0400|456 downing st^apt 2^Edison^NJ^19702-5342^US|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||(556)112-2222^^^In2@gmail.com|(556)112-2223^^^In22@gmail.com\rIN2||954-333-2223|||Payer Plan|121314|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^^In1@gmail.com|(555)111-2222^^^In12@gmail.com\rIN2||954-333-2223|||Payer Plan|151617|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^^In1@gmail.com|(555)111-2222^^^In12@gmail.com\rIN1|3|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|relpatient3IN1^reltesting3IN1^relSPRG3IN1^|Child|19890201|789 downing st^apt 3^BOSTON^MA^98912-6543^US|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2225|||Payer Plan|181920|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(557)113-2223^^^In3@gmail.com|(557)113-2224^^^In32@gmail.com\rIN2||954-333-2223|||Payer Plan|212223|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^^In1@gmail.com|(555)111-2222^^^In12@gmail.com\r \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_2.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_2.txt deleted file mode 100644 index 9ebcd80..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_2.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^H|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|M|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|00240507161242.0000-0400|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||M||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^CP^In2@gmail.com|(555)111-2222^^CP^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870108|456 main st^apt 1^anywhere^fl^55555-5555^US|||2|||YES||||||||||466|1789|||||||M||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^CP^In2sec@gmail.com|5552223333^^CP^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US|||1|||YES||||||||||465|5678|||||||M||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^CP^In2@gmail.com|(555)111-2222^^CP^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_3.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_3.txt deleted file mode 100644 index 51d58cc..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_3.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^P||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^M|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|U|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|20241307|123 main st^apt 1^anywhere^fl^55555-5555^US^M|||1|||YES||||||||||465|5678|||||||U||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|20240007|456 main st^apt 1^anywhere^fl^55555-5555^US^M|||2|||YES||||||||||466|1789|||||||U||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US^M|||1|||YES||||||||||465|5678|||||||U||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_4.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_4.txt deleted file mode 100644 index be1cd0e..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_4.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^O||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^O|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|20240632|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|20240600|456 main st^apt 1^anywhere^fl^55555-5555^US^O|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_5.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_5.txt deleted file mode 100644 index c8d761b..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_5.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^O||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^O|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19850207251242.0000-0400|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870304166142.0000-0400|456 main st^apt 1^anywhere^fl^55555-5555^US^O|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_6.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_6.txt deleted file mode 100644 index 17f0052..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_6.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^O||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^O|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19850207161261.0000-0400|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870304161242.99999-0400|456 main st^apt 1^anywhere^fl^55555-5555^US^O|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_7.txt b/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_7.txt deleted file mode 100644 index 8dc950f..0000000 --- a/tests/regression/regression_test_data/RelatedPerson/RelatedPerson_test_data_7.txt +++ /dev/null @@ -1 +0,0 @@ -MSH|^~\&|Epic|STL|Pediatrix||20230411105743145038900|TCO4A|ADT^A08|13503|T|2.3|\rEVN|A08|20230411105743145038900||A31A08A31|TCO4A^COOK^TIM^^^^^^SJMH^^^^^SJMMC|\rPID|1||TEST333345038900^^^EPI^EPI||patient1^girl1testing^sprg^^^^D||20230411|F|||111 first st^apt 1^somewhere^fl^55555-5555^US^O||(479)555-5874^CP^7^pid1@gmail.com^^479^5555874|(479)555-5875^P^7^pid12@gmail.com^^479^5555874||SINGLE||9543332222|954-331-2222|||||Y|2||||21230620|||||||||||||||20230611|20230811|\rPD1|||MERCY HOSPITAL ST LOUIS^^20101|||||||||\rNK1|1|PATIENT^TESTING^SPRG^|Mother|^^^^^US|(555)555-5551^^7^^^555^5555551||EC1||||^^||\rNK1|2|PATIENT^TESTING^SPRG^||^^^^^US|(555)555-5551^^7^^^555^5555551||MOTHER||||^^||\rNK1|3||||||EMP||||^^||NOT EMPLOYED\rPV1|1|INPATIENT|SJMNICUS^2107^^SJMMC^Dirty^^^^STLO NICU 2|NB|||15236798^SOM IP^PHYSICIAN^HOSPITALIST|15236799^SOM IP^REFERRING^HOSPITALIST||NURSERY||||BORN INSIDE |||15236798^SOM IP^PHYSICIAN^HOSPITALIST^|CONF|17723456|COMM C||||||||||||||||||||||||20230411080900|20230511080900|\rPV2||Level 2||||||||||Hospital Encounter||\rDG1|1||^Newborn|Newborn||A|\rGT1|1|100003699|relpatient1^reltesting1^relSPRG1^||1500 corporate Drive^Suite 101^SUNRISE^FL^33322^US^O|(555)555-5551^^CP^gt1@gmail.com^^555^5555551|(555)555-5552^^CP^gt12@gmail.com^^555^5555551|19870108|F|P/F|MOT|105-45-2154||||||||\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19850207161242.0000-9999|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|2|2007118^CIGNA HEALTHSCOPE PPO|20071|CIGNA HEALTHCARE|PO BOX 188061^^CHATTANOOGA^TN^37422-8061^||7898678090|1234||||20230202|20250202|20071PED|130|PATIENT^TESTING^K^|Child|19870304103000-0500^f|456 main st^apt 1^anywhere^fl^55555-5555^US^O|||2|||YES||||||||||466|1789|||||||F||||BOTH||466\rIN2||954-333-2224|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654321||5551112222^^In2sec@gmail.com|5552223333^^In2sec12@gmail.com\rIN1|1|2000805^AETNA PPO|20008|AETNA|PO BOX 981106^^EL PASO^TX^79998-1106^||(800)789-9009|1234|TEST|||20230101|20250101|3456T789|130|patient^testing^L^|Child|19870108|123 main st^apt 1^anywhere^fl^55555-5555^US^O|||1|||YES||||||||||465|5678|||||||F||||BOTH||465\rIN2||954-333-2223|||Payer Plan|123456|||||||||||||||||||||||||||||||||||||||||||||||||||||||9876543211||(555)111-2221^^In2@gmail.com|(555)111-2222^^In212@gmail.com\rIN1|3|2007119^BCBS HEALTHSCOPE PPO|20072|BCBS HEALTHCARE|PO BOX 199045^^NASHVILLE^TN^37423-8062^||7898678919|4567||||20220202|20250301|20078PED|131|PATIENT^TESTING^K^|Child|19880108|789 main st^apt 1^somewhere^fl^44444-4444^US|||2|||YES||||||||||467|1790|||||||F||||BOTH||467\rIN2||954-444-2225|||Payer Plan||||||||||||||||||||||||||||||||||||||||||||||||||||||||987654322||5551112223^^In3sec@gmail.com|5552223334^^In3sec12@gmail.com \ No newline at end of file diff --git a/tests/regression/relatedperson_insurance_1_resource.py b/tests/regression/relatedperson_insurance_1_resource.py deleted file mode 100644 index 0f0750d..0000000 --- a/tests/regression/relatedperson_insurance_1_resource.py +++ /dev/null @@ -1,209 +0,0 @@ -from.reg_globals.relatedperson_insurance_reg_global import ( - RELATEDPERSON_INSURANCE_ID, - ADDRESS1, - ADDRESS2, - CITY, - STATE, - ZIP, - COUNTRY, - ADDRESSUSE, - DOB, - GENDER, - HOMEPHONE, - SSN, - SSN_CODING_SYSTEM, - LASTNAME, - FIRSTNAME, - MIDDLENAME, - TELECOM_SYSTEM, - ADDRESSTYPE, - HOMEPHONE, - HOMEEMAIL, - WORKPHONE, - WORKEMAIL, - PHONETYPE -) - -from tests.regression.reg_globals.request_type import ( - REQUEST_TYPE -) - -from tests.regression.reg_globals.reference_urls import ( - RELATED_PERSON_INSURANCE_FULL_URL_1, - PATIENT_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN, - SSN_SYSTEM -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource -from omniparser_schemas.custom.check_FHIR_resource_element import check_if_FHIR_resource_element_exists - -def relatedperson_insurance_1_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert rel[0]["fullUrl"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "did not match related person resource full url" - assert rel[0]["request"]["method"] == REQUEST_TYPE[0], "did not match put request type" - assert rel[0]["request"]["url"] == f'{RESOURCE_NAME[7]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[4]}|{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[0]}', "did not match request url" - assert rel[0]["resource"]["address"][0]["city"] == CITY[0], "did not match city" - assert rel[0]["resource"]["address"][0]["country"] == COUNTRY, "did not match country" - assert rel[0]["resource"]["address"][0]["line"][0] == ADDRESS1[0], "did not match address1" - assert rel[0]["resource"]["address"][0]["line"][1] == ADDRESS2[0], "did not match address2" - assert rel[0]["resource"]["address"][0]["postalCode"] == ZIP[0], "did not match postal code" - assert rel[0]["resource"]["address"][0]["state"] == STATE[0], "did not match state" - assert rel[0]["resource"]["address"][0]["type"] == ADDRESSTYPE, "did not match address type" - assert rel[0]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - assert rel[0]["resource"]["birthDate"] == DOB[0], "did not match DOB" - assert rel[0]["resource"]["gender"] == GENDER[0], "did not match gender" - assert rel[0]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match identifier system" - assert rel[0]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[0]}', "did not match related person id value" - assert rel[0]["resource"]["identifier"][1]["system"] == SSN_SYSTEM, "did not match ssn system" - assert rel[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_CODING_SYSTEM, "did not match SSN coding system" - assert rel[0]["resource"]["identifier"][1]["value"] == SSN[0], "did not match SSN" - assert rel[0]["resource"]["name"][0]["family"] == LASTNAME[0], "did not match lastname" - assert rel[0]["resource"]["name"][0]["given"][0] == FIRSTNAME[0], "did not match firstname" - assert rel[0]["resource"]["name"][0]["given"][1] == MIDDLENAME[0], "did not match middlename" - assert rel[0]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match full url" - assert rel[0]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match type" - assert rel[0]["resource"]["telecom"][0]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[0]["resource"]["telecom"][0]["use"] == PHONETYPE[0], "did not match telecom use" - assert rel[0]["resource"]["telecom"][0]["value"] == HOMEPHONE[0], "did not match homephone" - assert rel[0]["resource"]["telecom"][1]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[0]["resource"]["telecom"][1]["use"] == PHONETYPE[2], "did not match telecom use" - assert rel[0]["resource"]["telecom"][1]["value"] == WORKPHONE[0], "did not match workphone" - assert rel[0]["resource"]["telecom"][2]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[0]["resource"]["telecom"][2]["use"] == PHONETYPE[0], "did not match email use" - assert rel[0]["resource"]["telecom"][2]["value"] == HOMEEMAIL[0], "did not match homeemail" - assert rel[0]["resource"]["telecom"][3]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[0]["resource"]["telecom"][3]["use"] == PHONETYPE[2], "did not match email use" - assert rel[0]["resource"]["telecom"][3]["value"] == WORKEMAIL[0], "did not match homeemail" - - ##Negative test cases - assert not rel[0]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not rel[0]["request"]["method"] == FACILITY_ID, "negative test case failed" - assert not rel[0]["request"]["url"] == RELATEDPERSON_INSURANCE_ID[0], "negative test case failed" - assert not rel[0]["resource"]["address"][0]["city"] == ADDRESSUSE, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["country"] == ADDRESSTYPE, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["line"][0] == ADDRESS2, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["line"][1] == ADDRESS1, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["postalCode"] == STATE, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["state"] == ZIP, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["type"] == COUNTRY, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["use"] == CITY, "negative test case failed" - assert not rel[0]["resource"]["birthDate"] == GENDER, "negative test case failed" - assert not rel[0]["resource"]["gender"] == DOB, "negative test case failed" - assert not rel[0]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not rel[0]["resource"]["identifier"][0]["value"] == RELATED_PERSON_INSURANCE_FULL_URL_1[0], "negative test case failed" - assert not rel[0]["resource"]["identifier"][1]["system"] == SSN_CODING_SYSTEM, "negative test case failed" - assert not rel[0]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN, "negative test case failed" - assert not rel[0]["resource"]["identifier"][1]["value"] == SSN_SYSTEM, "negative test case failed" - assert not rel[0]["resource"]["name"][0]["family"] == MIDDLENAME, "negative test case failed" - assert not rel[0]["resource"]["name"][0]["given"][0] == LASTNAME, "negative test case failed" - assert not rel[0]["resource"]["name"][0]["given"][1] == FIRSTNAME, "negative test case failed" - assert not rel[0]["resource"]["patient"]["reference"] == RELATED_PERSON_INSURANCE_FULL_URL_1, "negative test case failed" - assert not rel[0]["resource"]["patient"]["type"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[0]["resource"]["telecom"][0]["system"] == RESOURCE_NAME[0], "negative test case failed" - assert not rel[0]["resource"]["telecom"][0]["use"] == HOMEPHONE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][0]["value"] == ADDRESSUSE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][1]["system"] == PHONETYPE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][1]["use"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[0]["resource"]["telecom"][1]["value"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[0]["resource"]["telecom"][2]["system"] == WORKPHONE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][2]["use"] == HOMEEMAIL, "negative test case failed" - assert not rel[0]["resource"]["telecom"][2]["value"] == PHONETYPE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][3]["system"] == WORKEMAIL, "negative test case failed" - assert not rel[0]["resource"]["telecom"][3]["use"] == WORKPHONE, "negative test case failed" - assert not rel[0]["resource"]["telecom"][3]["value"] == TELECOM_SYSTEM, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[0]["resource"]["gender"] == GENDER[1], "did not match gender" - assert rel[0]["resource"]["telecom"][0]["use"] == PHONETYPE[1], "did not match telecom use" - assert rel[0]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - - #Negative test cases - assert not rel[0]["resource"]["gender"] == GENDER[0], "negative test case failed" - assert not rel[0]["resource"]["telecom"][0]["use"] == ADDRESSUSE, "negative test case failed" - assert not rel[0]["resource"]["address"][0]["use"] == PHONETYPE, "negative test case failed" - ##Check improper year https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert check_if_FHIR_resource_element_exists(rel, 0, "resource", "birthDate") == "FHIR resource element not found", "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[0]["resource"]["gender"] == GENDER[2], "did not match gender" - assert rel[0]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "did not match address use" - - #Negative test cases - assert not rel[0]["resource"]["gender"] == GENDER[1], "negative test case failed" - assert not rel[0]["resource"]["address"][0]["use"] == PHONETYPE, "negative test case failed" - ##Check improper months https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert check_if_FHIR_resource_element_exists(rel, 0, "resource", "birthDate") == "FHIR resource element not found", "negative test case failed" - assert check_if_FHIR_resource_element_exists(rel, 1, "resource", "birthDate") == "FHIR resource element not found", "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "4"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[0]["resource"]["address"][0]["use"] == ADDRESSUSE[2], "did not match address use" - - #Negative test cases - assert not rel[0]["resource"]["address"][0]["use"] == PHONETYPE, "negative test case failed" - ##Check improper dates https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert check_if_FHIR_resource_element_exists(rel, 0, "resource", "birthDate") == "FHIR resource element not found", "negative test case failed" - assert check_if_FHIR_resource_element_exists(rel, 1, "resource", "birthDate") == "FHIR resource element not found", "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "5"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - #Negative test cases - ##Check improper HH https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[0]["resource"]["birthDate"] == DOB[0], "did not match DOB" - ##Check improper MM https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[1]["resource"]["birthDate"] == DOB[1], "did not match DOB" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - elif(testfile == "6"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - #Negative test cases - ##Check improper SS https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[0]["resource"]["birthDate"] == DOB[0], "did not match DOB" - ##Check improper Fractional seconds https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[1]["resource"]["birthDate"] == DOB[1], "did not match DOB" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - elif(testfile == "7"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - #Negative test cases - ##Check improper TimeZone https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[0]["resource"]["birthDate"] == DOB[0], "did not match DOB" - ##Check improper Precision https://mednax1500.atlassian.net/browse/SMILECDR-882 - assert rel[1]["resource"]["birthDate"] == DOB[1], "did not match DOB" - - print("FHIR bundle " + str(resource_name) + " subscriber 1 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/relatedperson_insurance_2_resource.py b/tests/regression/relatedperson_insurance_2_resource.py deleted file mode 100644 index 03aa631..0000000 --- a/tests/regression/relatedperson_insurance_2_resource.py +++ /dev/null @@ -1,170 +0,0 @@ -from.reg_globals.relatedperson_insurance_reg_global import ( - RELATEDPERSON_INSURANCE_ID, - ADDRESS1, - ADDRESS2, - CITY, - STATE, - ZIP, - COUNTRY, - ADDRESSUSE, - DOB, - GENDER, - HOMEPHONE, - SSN, - SSN_CODING_SYSTEM, - LASTNAME, - FIRSTNAME, - MIDDLENAME, - TELECOM_SYSTEM, - ADDRESSTYPE, - HOMEPHONE, - HOMEEMAIL, - WORKPHONE, - WORKEMAIL, - PHONETYPE -) - -from tests.regression.reg_globals.request_type import ( - REQUEST_TYPE -) - -from tests.regression.reg_globals.reference_urls import ( - RELATED_PERSON_INSURANCE_FULL_URL_2, - PATIENT_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN, - SSN_SYSTEM -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -## Note, we are not using ETL parser in these tests, we are re utilizing the files that were already ran for the test "relatedperson_resource.py" -## Also these tests are performed on independent segments(additional subscriber segments can also be added, for example we can see 3 IN1 segments) that's why these test files can be resused for all related person resources(guarantor & subscriber) - -def relatedperson_insurance_2_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[1]["fullUrl"] == RELATED_PERSON_INSURANCE_FULL_URL_2, "did not match related person resource full url" - assert rel[1]["request"]["method"] == REQUEST_TYPE[0], "did not match put request type" - assert rel[1]["request"]["url"] == f'{RESOURCE_NAME[7]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[4]}|{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[1]}', "did not match request url" - assert rel[1]["resource"]["address"][0]["city"] == CITY[1], "did not match city" - assert rel[1]["resource"]["address"][0]["country"] == COUNTRY, "did not match country" - assert rel[1]["resource"]["address"][0]["line"][0] == ADDRESS1[1], "did not match address1" - assert rel[1]["resource"]["address"][0]["line"][1] == ADDRESS2[1], "did not match address2" - assert rel[1]["resource"]["address"][0]["postalCode"] == ZIP[1], "did not match postal code" - assert rel[1]["resource"]["address"][0]["state"] == STATE[1], "did not match state" - assert rel[1]["resource"]["address"][0]["type"] == ADDRESSTYPE, "did not match address type" - assert rel[1]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - assert rel[1]["resource"]["birthDate"] == DOB[1], "did not match DOB" - assert rel[1]["resource"]["gender"] == GENDER[0], "did not match gender" - assert rel[1]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match identifier system" - assert rel[1]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[1]}', "did not match related person id value" - assert rel[1]["resource"]["identifier"][1]["system"] == SSN_SYSTEM, "did not match ssn system" - assert rel[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_CODING_SYSTEM, "did not match SSN coding system" - assert rel[1]["resource"]["identifier"][1]["value"] == SSN[1], "did not match SSN" - assert rel[1]["resource"]["name"][0]["family"] == LASTNAME[1], "did not match lastname" - assert rel[1]["resource"]["name"][0]["given"][0] == FIRSTNAME[1], "did not match firstname" - assert rel[1]["resource"]["name"][0]["given"][1] == MIDDLENAME[1], "did not match middlename" - assert rel[1]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match full url" - assert rel[1]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match type" - assert rel[1]["resource"]["telecom"][0]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[1]["resource"]["telecom"][0]["use"] == PHONETYPE[0], "did not match telecom use" - assert rel[1]["resource"]["telecom"][0]["value"] == HOMEPHONE[1], "did not match homephone" - assert rel[1]["resource"]["telecom"][1]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[1]["resource"]["telecom"][1]["use"] == PHONETYPE[2], "did not match telecom use" - assert rel[1]["resource"]["telecom"][1]["value"] == WORKPHONE[1], "did not match workphone" - assert rel[1]["resource"]["telecom"][2]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[1]["resource"]["telecom"][2]["use"] == PHONETYPE[0], "did not match email use" - assert rel[1]["resource"]["telecom"][2]["value"] == HOMEEMAIL[1], "did not match homeemail" - assert rel[1]["resource"]["telecom"][3]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[1]["resource"]["telecom"][3]["use"] == PHONETYPE[2], "did not match email use" - assert rel[1]["resource"]["telecom"][3]["value"] == WORKEMAIL[1], "did not match homeemail" - - #Negative test cases - assert not rel[1]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not rel[1]["request"]["method"] == FACILITY_ID, "negative test case failed" - assert not rel[1]["request"]["url"] == RELATEDPERSON_INSURANCE_ID[0], "negative test case failed" - assert not rel[1]["resource"]["address"][0]["city"] == ADDRESSUSE, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["country"] == ADDRESSTYPE, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["line"][0] == ADDRESS2, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["line"][1] == ADDRESS1, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["postalCode"] == STATE, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["state"] == ZIP, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["type"] == COUNTRY, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["use"] == CITY, "negative test case failed" - assert not rel[1]["resource"]["birthDate"] == GENDER, "negative test case failed" - assert not rel[1]["resource"]["gender"] == DOB, "negative test case failed" - assert not rel[1]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not rel[1]["resource"]["identifier"][0]["value"] == RELATED_PERSON_INSURANCE_FULL_URL_2[0], "negative test case failed" - assert not rel[1]["resource"]["identifier"][1]["system"] == SSN_CODING_SYSTEM, "negative test case failed" - assert not rel[1]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN, "negative test case failed" - assert not rel[1]["resource"]["identifier"][1]["value"] == SSN_SYSTEM, "negative test case failed" - assert not rel[1]["resource"]["name"][0]["family"] == MIDDLENAME, "negative test case failed" - assert not rel[1]["resource"]["name"][0]["given"][0] == LASTNAME, "negative test case failed" - assert not rel[1]["resource"]["name"][0]["given"][1] == FIRSTNAME, "negative test case failed" - assert not rel[1]["resource"]["patient"]["reference"] == RELATED_PERSON_INSURANCE_FULL_URL_2, "negative test case failed" - assert not rel[1]["resource"]["patient"]["type"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[1]["resource"]["telecom"][0]["system"] == RESOURCE_NAME[0], "negative test case failed" - assert not rel[1]["resource"]["telecom"][0]["use"] == HOMEPHONE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][0]["value"] == ADDRESSUSE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][1]["system"] == PHONETYPE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][1]["use"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[1]["resource"]["telecom"][1]["value"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[1]["resource"]["telecom"][2]["system"] == WORKPHONE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][2]["use"] == HOMEEMAIL, "negative test case failed" - assert not rel[1]["resource"]["telecom"][2]["value"] == PHONETYPE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][3]["system"] == WORKEMAIL, "negative test case failed" - assert not rel[1]["resource"]["telecom"][3]["use"] == WORKPHONE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][3]["value"] == TELECOM_SYSTEM, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[1]["resource"]["gender"] == GENDER[1], "did not match gender" - assert rel[1]["resource"]["telecom"][0]["use"] == PHONETYPE[1], "did not match telecom use" - assert rel[1]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - - #Negative test cases - assert not rel[1]["resource"]["gender"] == ADDRESSUSE, "negative test case failed" - assert not rel[1]["resource"]["telecom"][0]["use"] == GENDER, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["use"] == PHONETYPE, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[1]["resource"]["gender"] == GENDER[2], "did not match gender" - assert rel[1]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "did not match address use" - - #Negative test cases - assert not rel[1]["resource"]["gender"] == ADDRESSUSE, "negative test case failed" - assert not rel[1]["resource"]["address"][0]["use"] == GENDER, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - elif(testfile == "4"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[1]["resource"]["address"][0]["use"] == ADDRESSUSE[2], "did not match address use" - - #Negative test cases - assert not rel[1]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 2 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/relatedperson_insurance_3_resource.py b/tests/regression/relatedperson_insurance_3_resource.py deleted file mode 100644 index a4cdf3b..0000000 --- a/tests/regression/relatedperson_insurance_3_resource.py +++ /dev/null @@ -1,169 +0,0 @@ -from.reg_globals.relatedperson_insurance_reg_global import ( - RELATEDPERSON_INSURANCE_ID, - ADDRESS1, - ADDRESS2, - CITY, - STATE, - ZIP, - COUNTRY, - ADDRESSUSE, - DOB, - GENDER, - HOMEPHONE, - SSN, - SSN_CODING_SYSTEM, - LASTNAME, - FIRSTNAME, - MIDDLENAME, - TELECOM_SYSTEM, - ADDRESSTYPE, - HOMEPHONE, - HOMEEMAIL, - WORKPHONE, - WORKEMAIL, - PHONETYPE -) - -from tests.regression.reg_globals.request_type import ( - REQUEST_TYPE -) - -from tests.regression.reg_globals.reference_urls import ( - RELATED_PERSON_INSURANCE_FULL_URL_3, - PATIENT_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN, - SSN_SYSTEM -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -## Note, we are not using ETL parser in these tests, we are re utilizing the files that were already ran for the test "relatedperson_resource.py" -## Also these tests are performed on independent segments(additional subscriber segments can also be added, for example we can see 3 IN1 segments) that's why these test files can be resused for all related person resources(guarantor & subscriber) - -def relatedperson_insurance_3_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[2]["fullUrl"] == RELATED_PERSON_INSURANCE_FULL_URL_3, "did not match related person resource full url" - assert rel[2]["request"]["method"] == REQUEST_TYPE[0], "did not match put request type" - assert rel[2]["request"]["url"] == f'{RESOURCE_NAME[7]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[4]}|{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[2]}', "did not match request url" - assert rel[2]["resource"]["address"][0]["city"] == CITY[2], "did not match city" - assert rel[2]["resource"]["address"][0]["country"] == COUNTRY, "did not match country" - assert rel[2]["resource"]["address"][0]["line"][0] == ADDRESS1[2], "did not match address1" - assert rel[2]["resource"]["address"][0]["line"][1] == ADDRESS2[2], "did not match address2" - assert rel[2]["resource"]["address"][0]["postalCode"] == ZIP[2], "did not match postal code" - assert rel[2]["resource"]["address"][0]["state"] == STATE[2], "did not match state" - assert rel[2]["resource"]["address"][0]["type"] == ADDRESSTYPE, "did not match address type" - assert rel[2]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - assert rel[2]["resource"]["birthDate"] == DOB[2], "did not match DOB" - assert rel[2]["resource"]["gender"] == GENDER[0], "did not match gender" - assert rel[2]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match identifier system" - assert rel[2]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{RELATEDPERSON_INSURANCE_ID[2]}', "did not match related person id value" - assert rel[2]["resource"]["identifier"][1]["system"] == SSN_SYSTEM, "did not match ssn system" - assert rel[2]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_CODING_SYSTEM, "did not match SSN coding system" - assert rel[2]["resource"]["identifier"][1]["value"] == SSN[2], "did not match SSN" - assert rel[2]["resource"]["name"][0]["family"] == LASTNAME[2], "did not match lastname" - assert rel[2]["resource"]["name"][0]["given"][0] == FIRSTNAME[2], "did not match firstname" - assert rel[2]["resource"]["name"][0]["given"][1] == MIDDLENAME[2], "did not match middlename" - assert rel[2]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match full url" - assert rel[2]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match type" - assert rel[2]["resource"]["telecom"][0]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[2]["resource"]["telecom"][0]["use"] == PHONETYPE[0], "did not match telecom use" - assert rel[2]["resource"]["telecom"][0]["value"] == HOMEPHONE[2], "did not match homephone" - assert rel[2]["resource"]["telecom"][1]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[2]["resource"]["telecom"][1]["use"] == PHONETYPE[2], "did not match telecom use" - assert rel[2]["resource"]["telecom"][1]["value"] == WORKPHONE[2], "did not match workphone" - assert rel[2]["resource"]["telecom"][2]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[2]["resource"]["telecom"][2]["use"] == PHONETYPE[0], "did not match email use" - assert rel[2]["resource"]["telecom"][2]["value"] == HOMEEMAIL[2], "did not match homeemail" - assert rel[2]["resource"]["telecom"][3]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[2]["resource"]["telecom"][3]["use"] == PHONETYPE[2], "did not match email use" - assert rel[2]["resource"]["telecom"][3]["value"] == WORKEMAIL[2], "did not match homeemail" - - #Negative test cases - assert not rel[2]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not rel[2]["request"]["method"] == FACILITY_ID, "negative test case failed" - assert not rel[2]["request"]["url"] == RELATEDPERSON_INSURANCE_ID[0], "negative test case failed" - assert not rel[2]["resource"]["address"][0]["city"] == ADDRESSUSE, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["country"] == ADDRESSTYPE, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["line"][0] == ADDRESS2, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["line"][1] == ADDRESS1, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["postalCode"] == STATE, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["state"] == ZIP, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["type"] == COUNTRY, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["use"] == CITY, "negative test case failed" - assert not rel[2]["resource"]["birthDate"] == GENDER, "negative test case failed" - assert not rel[2]["resource"]["gender"] == DOB, "negative test case failed" - assert not rel[2]["resource"]["identifier"][0]["system"] == IDENTIFIER_URL, "negative test case failed" - assert not rel[2]["resource"]["identifier"][0]["value"] == RELATED_PERSON_INSURANCE_FULL_URL_3, "negative test case failed" - assert not rel[2]["resource"]["identifier"][1]["system"] == SSN_CODING_SYSTEM, "negative test case failed" - assert not rel[2]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN, "negative test case failed" - assert not rel[2]["resource"]["identifier"][1]["value"] == SSN_SYSTEM, "negative test case failed" - assert not rel[2]["resource"]["name"][0]["family"] == MIDDLENAME, "negative test case failed" - assert not rel[2]["resource"]["name"][0]["given"][0] == LASTNAME, "negative test case failed" - assert not rel[2]["resource"]["name"][0]["given"][1] == FIRSTNAME, "negative test case failed" - assert not rel[2]["resource"]["patient"]["reference"] == RELATED_PERSON_INSURANCE_FULL_URL_3, "negative test case failed" - assert not rel[2]["resource"]["patient"]["type"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[2]["resource"]["telecom"][0]["system"] == RESOURCE_NAME[0], "negative test case failed" - assert not rel[2]["resource"]["telecom"][0]["use"] == HOMEPHONE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][0]["value"] == ADDRESSUSE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][1]["system"] == PHONETYPE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][1]["use"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[2]["resource"]["telecom"][1]["value"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[2]["resource"]["telecom"][2]["system"] == WORKPHONE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][2]["use"] == HOMEEMAIL, "negative test case failed" - assert not rel[2]["resource"]["telecom"][2]["value"] == PHONETYPE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][3]["system"] == WORKEMAIL, "negative test case failed" - assert not rel[2]["resource"]["telecom"][3]["use"] == WORKPHONE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][3]["value"] == TELECOM_SYSTEM, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert rel[2]["resource"]["gender"] == GENDER[1], "did not match gender" - assert rel[2]["resource"]["telecom"][0]["use"] == PHONETYPE[1], "did not match telecom use" - assert rel[2]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - - #Negative test cases - assert not rel[2]["resource"]["gender"] == ADDRESSUSE, "negative test case failed" - assert not rel[2]["resource"]["telecom"][0]["use"] == GENDER, "negative test case failed" - assert not rel[2]["resource"]["address"][0]["use"] == PHONETYPE, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[2]["resource"]["gender"] == GENDER[2], "did not match gender" - assert rel[2]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "did not match address use" - - #Negative test cases - assert not rel[2]["resource"]["gender"] == ADDRESSUSE[1], "negative test case failed" - assert not rel[2]["resource"]["address"][0]["use"] == GENDER[1], "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - elif(testfile == "4"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[2]["resource"]["address"][0]["use"] == ADDRESSUSE[2], "did not match address use" - - #Negative test cases - assert not rel[2]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " subscriber 3 resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") diff --git a/tests/regression/relatedperson_resource.py b/tests/regression/relatedperson_resource.py deleted file mode 100644 index b48f770..0000000 --- a/tests/regression/relatedperson_resource.py +++ /dev/null @@ -1,172 +0,0 @@ -from.reg_globals.relatedperson_reg_global import ( - RELATED_PERSON_ID, - ADDRESS1, - ADDRESS2, - CITY, - STATE, - ZIP, - COUNTRY, - ADDRESSUSE, - DOB, - GENDER, - HOMEPHONE, - SSN, - SSN_CODING_SYSTEM, - LASTNAME, - FIRSTNAME, - MIDDLENAME, - TELECOM_SYSTEM, - ADDRESSTYPE, - HOMEPHONE, - HOMEEMAIL, - WORKPHONE, - WORKEMAIL, - PHONETYPE -) - -from tests.regression.reg_globals.request_type import ( - REQUEST_TYPE -) - -from tests.regression.reg_globals.reference_urls import ( - RELATED_PERSON_GUARANTOR_FULL_URL_1, - PATIENT_FULL_URL -) - -from .reg_globals.organization_reg_globals import( - FACILITY_ID -) - -from .reg_globals.patient_reg_global import( - MRN, - SSN_SYSTEM -) - -from .reg_globals.identifier_urls import( - IDENTIFIER_URL, - IDENTIFIER_ID, - RESOURCE_NAME -) - -from omniparser_schemas.parser.filter import filter_resource - -def relatedperson_test(resource_name, testfile, identifier_url, identifier_id): - if(testfile == "1"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - assert rel[3]["fullUrl"] == RELATED_PERSON_GUARANTOR_FULL_URL_1, "did not match related person resource full url" - assert rel[3]["request"]["method"] == REQUEST_TYPE[0], "did not match put request type" - assert rel[3]["request"]["url"] == f'{RESOURCE_NAME[7]}?identifier={IDENTIFIER_URL}/{IDENTIFIER_ID[4]}|{MRN}-{FACILITY_ID}-{RELATED_PERSON_ID[0]}', "did not match request url" - assert rel[3]["resource"]["address"][0]["city"] == CITY, "did not match city" - assert rel[3]["resource"]["address"][0]["country"] == COUNTRY, "did not match country" - assert rel[3]["resource"]["address"][0]["line"][0] == ADDRESS1[0], "did not match address1" - assert rel[3]["resource"]["address"][0]["line"][1] == ADDRESS2[0], "did not match address2" - assert rel[3]["resource"]["address"][0]["postalCode"] == ZIP, "did not match postal code" - assert rel[3]["resource"]["address"][0]["state"] == STATE, "did not match state" - assert rel[3]["resource"]["address"][0]["type"] == ADDRESSTYPE, "did not match address type" - assert rel[3]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - assert rel[3]["resource"]["birthDate"] == DOB, "did not match DOB" - assert rel[3]["resource"]["gender"] == GENDER[0], "did not match gender" - assert rel[3]["resource"]["identifier"][0]["system"] == f'{IDENTIFIER_URL}/{IDENTIFIER_ID[4]}', "did not match identifier system" - assert rel[3]["resource"]["identifier"][0]["value"] == f'{MRN}-{FACILITY_ID}-{RELATED_PERSON_ID[0]}', "did not match related person id value" - assert rel[3]["resource"]["identifier"][1]["system"] == SSN_SYSTEM, "did not match ssn system" - assert rel[3]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_CODING_SYSTEM, "did not match SSN coding system" - assert rel[3]["resource"]["identifier"][1]["value"] == SSN, "did not match SSN" - assert rel[3]["resource"]["name"][0]["family"] == LASTNAME[0], "did not match lastname" - assert rel[3]["resource"]["name"][0]["given"][0] == FIRSTNAME[0], "did not match firstname" - assert rel[3]["resource"]["name"][0]["given"][1] == MIDDLENAME[0], "did not match middlename" - assert rel[3]["resource"]["patient"]["reference"] == PATIENT_FULL_URL, "did not match full url" - assert rel[3]["resource"]["patient"]["type"] == RESOURCE_NAME[5], "did not match type" - assert rel[3]["resource"]["telecom"][0]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[3]["resource"]["telecom"][0]["use"] == PHONETYPE[0], "did not match telecom use" - assert rel[3]["resource"]["telecom"][0]["value"] == HOMEPHONE, "did not match homephone" - assert rel[3]["resource"]["telecom"][1]["system"] == TELECOM_SYSTEM[0], "did not match telecom system" - assert rel[3]["resource"]["telecom"][1]["use"] == PHONETYPE[2], "did not match telecom use" - assert rel[3]["resource"]["telecom"][1]["value"] == WORKPHONE, "did not match workphone" - assert rel[3]["resource"]["telecom"][2]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[3]["resource"]["telecom"][2]["use"] == PHONETYPE[0], "did not match email use" - assert rel[3]["resource"]["telecom"][2]["value"] == HOMEEMAIL, "did not match homeemail" - assert rel[3]["resource"]["telecom"][3]["system"] == TELECOM_SYSTEM[1], "did not match email system" - assert rel[3]["resource"]["telecom"][3]["use"] == PHONETYPE[2], "did not match email use" - assert rel[3]["resource"]["telecom"][3]["value"] == WORKEMAIL, "did not match homeemail" - - ##Negative test cases - assert not rel[3]["fullUrl"] == PATIENT_FULL_URL, "negative test case failed" - assert not rel[3]["request"]["method"] == REQUEST_TYPE[1], "negative test case failed" - assert not rel[3]["request"]["url"] == RELATED_PERSON_ID[0], "negative test case failed" - assert not rel[3]["resource"]["address"][0]["city"] == ADDRESSUSE, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["country"] == STATE, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["line"][0] == ZIP, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["line"][1] == CITY, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["postalCode"] == COUNTRY, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["state"] == ADDRESS1, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["type"] == ADDRESSUSE, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["use"] == ADDRESSTYPE, "negative test case failed" - assert not rel[3]["resource"]["birthDate"] == GENDER, "negative test case failed" - assert not rel[3]["resource"]["gender"] == DOB, "negative test case failed" - assert not rel[3]["resource"]["identifier"][0]["system"] == MRN, "negative test case failed" - assert not rel[3]["resource"]["identifier"][0]["value"] == IDENTIFIER_ID[0], "negative test case failed" - assert not rel[3]["resource"]["identifier"][1]["system"] == SSN_CODING_SYSTEM, "negative test case failed" - assert not rel[3]["resource"]["identifier"][1]["type"]["coding"][0]["system"] == SSN_SYSTEM, "negative test case failed" - assert not rel[3]["resource"]["identifier"][1]["value"] == MRN, "negative test case failed" - assert not rel[3]["resource"]["name"][0]["family"] == FIRSTNAME, "negative test case failed" - assert not rel[3]["resource"]["name"][0]["given"][0] == LASTNAME, "negative test case failed" - assert not rel[3]["resource"]["name"][0]["given"][1] == MIDDLENAME, "negative test case failed" - assert not rel[3]["resource"]["patient"]["reference"] == RELATED_PERSON_GUARANTOR_FULL_URL_1, "negative test case failed" - assert not rel[3]["resource"]["patient"]["type"] == RESOURCE_NAME[1], "negative test case failed" - assert not rel[3]["resource"]["telecom"][0]["system"] == PHONETYPE, "negative test case failed" - assert not rel[3]["resource"]["telecom"][0]["use"] == ADDRESSUSE, "negative test case failed" - assert not rel[3]["resource"]["telecom"][0]["value"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[3]["resource"]["telecom"][1]["system"] == HOMEEMAIL, "negative test case failed" - assert not rel[3]["resource"]["telecom"][1]["use"] == WORKPHONE, "negative test case failed" - assert not rel[3]["resource"]["telecom"][1]["value"] == WORKEMAIL, "negative test case failed" - assert not rel[3]["resource"]["telecom"][2]["system"] == PHONETYPE, "negative test case failed" - assert not rel[3]["resource"]["telecom"][2]["use"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[3]["resource"]["telecom"][2]["value"] == TELECOM_SYSTEM, "negative test case failed" - assert not rel[3]["resource"]["telecom"][3]["system"] == HOMEEMAIL, "negative test case failed" - assert not rel[3]["resource"]["telecom"][3]["use"] == WORKEMAIL, "negative test case failed" - assert not rel[3]["resource"]["telecom"][3]["value"] == HOMEEMAIL, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " guarantor resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "2"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[3]["resource"]["gender"] == GENDER[1], "did not match gender" - assert rel[3]["resource"]["telecom"][0]["use"] == PHONETYPE[1], "did not match telecom use" - assert rel[3]["resource"]["address"][0]["use"] == ADDRESSUSE[0], "did not match address use" - - #Negative test cases - assert not rel[3]["resource"]["gender"] == ADDRESSUSE, "negative test case failed" - assert not rel[3]["resource"]["telecom"][0]["use"] == GENDER, "negative test case failed" - assert not rel[3]["resource"]["address"][0]["use"] == TELECOM_SYSTEM, "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " guarantor resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - elif(testfile == "3"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[3]["resource"]["gender"] == GENDER[2], "did not match gender" - assert rel[3]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "did not match address use" - - #Negative test cases - assert not rel[3]["resource"]["gender"] == ADDRESSUSE[0], "negative test case failed" - assert not rel[3]["resource"]["address"][0]["use"] == GENDER[0], "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " guarantor resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - elif(testfile == "4"): - rel = filter_resource(resource_name, testfile, identifier_url, identifier_id) - - assert rel[3]["resource"]["address"][0]["use"] == ADDRESSUSE[2], "did not match address use" - - #Negative test cases - assert not rel[3]["resource"]["address"][0]["use"] == ADDRESSUSE[1], "negative test case failed" - - print("FHIR bundle " + str(resource_name) + " guarantor resource tests for " + str(resource_name) + " testfile " + str(testfile) + " were successful") - - - - - -