From aa706cbcca08ab6cd47c0db1a4ce5b721d94b68d Mon Sep 17 00:00:00 2001 From: Katon Minhas Date: Tue, 3 Dec 2024 17:18:11 +0000 Subject: [PATCH] Merged in feature/hotfix_stitch (pull request #315) Feature/hotfix stitch * Add hotfix scripts * Merged main into feature/hotfix_stitch * Moved stitching scripts to scripts folder * Update for 2 * Fixed flat fee issue * Fix payer name issue * All hotfix updates * Merged main into feature/hotfix_stitch * Add rapidfuzz Approved-by: Alex Galarce --- fieldExtraction/poetry.lock | 102 +++++++++++++++++- fieldExtraction/pyproject.toml | 1 + .../{src => scripts}/hotfix_stitch.py | 0 fieldExtraction/scripts/hotfix_stitch_1A.py | 64 +++++++++++ fieldExtraction/scripts/hotfix_stitch_1B.py | 62 +++++++++++ fieldExtraction/src/apply_cnc_hotfix.py | 59 +++++----- fieldExtraction/src/cnc_hotfix.py | 20 ++-- fieldExtraction/src/hotfix_helper_funcs.py | 58 +++++----- fieldExtraction/src/postprocessing_funcs.py | 3 + fieldExtraction/src/prompts.py | 2 +- fieldExtraction/src/valid.py | 8 ++ 11 files changed, 314 insertions(+), 65 deletions(-) rename fieldExtraction/{src => scripts}/hotfix_stitch.py (100%) create mode 100644 fieldExtraction/scripts/hotfix_stitch_1A.py create mode 100644 fieldExtraction/scripts/hotfix_stitch_1B.py diff --git a/fieldExtraction/poetry.lock b/fieldExtraction/poetry.lock index b7bde36..d2ecb96 100644 --- a/fieldExtraction/poetry.lock +++ b/fieldExtraction/poetry.lock @@ -2522,6 +2522,106 @@ files = [ [package.dependencies] cffi = {version = "*", markers = "implementation_name == \"pypy\""} +[[package]] +name = "rapidfuzz" +version = "3.10.1" +description = "rapid fuzzy string matching" +optional = false +python-versions = ">=3.9" +files = [ + {file = "rapidfuzz-3.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f17d9f21bf2f2f785d74f7b0d407805468b4c173fa3e52c86ec94436b338e74a"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b31f358a70efc143909fb3d75ac6cd3c139cd41339aa8f2a3a0ead8315731f2b"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f4f43f2204b56a61448ec2dd061e26fd344c404da99fb19f3458200c5874ba2"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9d81bf186a453a2757472133b24915768abc7c3964194406ed93e170e16c21cb"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3611c8f45379a12063d70075c75134f2a8bd2e4e9b8a7995112ddae95ca1c982"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3c3b537b97ac30da4b73930fa8a4fe2f79c6d1c10ad535c5c09726612cd6bed9"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:231ef1ec9cf7b59809ce3301006500b9d564ddb324635f4ea8f16b3e2a1780da"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ed4f3adc1294834955b7e74edd3c6bd1aad5831c007f2d91ea839e76461a5879"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:7b6015da2e707bf632a71772a2dbf0703cff6525732c005ad24987fe86e8ec32"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:1b35a118d61d6f008e8e3fb3a77674d10806a8972c7b8be433d6598df4d60b01"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:bc308d79a7e877226f36bdf4e149e3ed398d8277c140be5c1fd892ec41739e6d"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f017dbfecc172e2d0c37cf9e3d519179d71a7f16094b57430dffc496a098aa17"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-win32.whl", hash = "sha256:36c0e1483e21f918d0f2f26799fe5ac91c7b0c34220b73007301c4f831a9c4c7"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:10746c1d4c8cd8881c28a87fd7ba0c9c102346dfe7ff1b0d021cdf093e9adbff"}, + {file = "rapidfuzz-3.10.1-cp310-cp310-win_arm64.whl", hash = "sha256:dfa64b89dcb906835e275187569e51aa9d546a444489e97aaf2cc84011565fbe"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:92958ae075c87fef393f835ed02d4fe8d5ee2059a0934c6c447ea3417dfbf0e8"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ba7521e072c53e33c384e78615d0718e645cab3c366ecd3cc8cb732befd94967"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d02cbd75d283c287471b5b3738b3e05c9096150f93f2d2dfa10b3d700f2db9"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:efa1582a397da038e2f2576c9cd49b842f56fde37d84a6b0200ffebc08d82350"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f12912acee1f506f974f58de9fdc2e62eea5667377a7e9156de53241c05fdba8"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666d5d8b17becc3f53447bcb2b6b33ce6c2df78792495d1fa82b2924cd48701a"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26f71582c0d62445067ee338ddad99b655a8f4e4ed517a90dcbfbb7d19310474"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8a2ef08b27167bcff230ffbfeedd4c4fa6353563d6aaa015d725dd3632fc3de7"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:365e4fc1a2b95082c890f5e98489b894e6bf8c338c6ac89bb6523c2ca6e9f086"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:1996feb7a61609fa842e6b5e0c549983222ffdedaf29644cc67e479902846dfe"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:cf654702f144beaa093103841a2ea6910d617d0bb3fccb1d1fd63c54dde2cd49"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec108bf25de674781d0a9a935030ba090c78d49def3d60f8724f3fc1e8e75024"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-win32.whl", hash = "sha256:031f8b367e5d92f7a1e27f7322012f3c321c3110137b43cc3bf678505583ef48"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:f98f36c6a1bb9a6c8bbec99ad87c8c0e364f34761739b5ea9adf7b48129ae8cf"}, + {file = "rapidfuzz-3.10.1-cp311-cp311-win_arm64.whl", hash = "sha256:f1da2028cb4e41be55ee797a82d6c1cf589442504244249dfeb32efc608edee7"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1340b56340896bede246f612b6ecf685f661a56aabef3d2512481bfe23ac5835"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2316515169b7b5a453f0ce3adbc46c42aa332cae9f2edb668e24d1fc92b2f2bb"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e06fe6a12241ec1b72c0566c6b28cda714d61965d86569595ad24793d1ab259"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d99c1cd9443b19164ec185a7d752f4b4db19c066c136f028991a480720472e23"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1d9aa156ed52d3446388ba4c2f335e312191d1ca9d1f5762ee983cf23e4ecf6"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:54bcf4efaaee8e015822be0c2c28214815f4f6b4f70d8362cfecbd58a71188ac"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0c955e32afdbfdf6e9ee663d24afb25210152d98c26d22d399712d29a9b976b"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:191633722203f5b7717efcb73a14f76f3b124877d0608c070b827c5226d0b972"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:195baad28057ec9609e40385991004e470af9ef87401e24ebe72c064431524ab"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0fff4a6b87c07366662b62ae994ffbeadc472e72f725923f94b72a3db49f4671"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4ffed25f9fdc0b287f30a98467493d1e1ce5b583f6317f70ec0263b3c97dbba6"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d02cf8e5af89a9ac8f53c438ddff6d773f62c25c6619b29db96f4aae248177c0"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-win32.whl", hash = "sha256:f3bb81d4fe6a5d20650f8c0afcc8f6e1941f6fecdb434f11b874c42467baded0"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:aaf83e9170cb1338922ae42d320699dccbbdca8ffed07faeb0b9257822c26e24"}, + {file = "rapidfuzz-3.10.1-cp312-cp312-win_arm64.whl", hash = "sha256:c5da802a0d085ad81b0f62828fb55557996c497b2d0b551bbdfeafd6d447892f"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fc22d69a1c9cccd560a5c434c0371b2df0f47c309c635a01a913e03bbf183710"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38b0dac2c8e057562b8f0d8ae5b663d2d6a28c5ab624de5b73cef9abb6129a24"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fde3bbb14e92ce8fcb5c2edfff72e474d0080cadda1c97785bf4822f037a309"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9141fb0592e55f98fe9ac0f3ce883199b9c13e262e0bf40c5b18cdf926109d16"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:237bec5dd1bfc9b40bbd786cd27949ef0c0eb5fab5eb491904c6b5df59d39d3c"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18123168cba156ab5794ea6de66db50f21bb3c66ae748d03316e71b27d907b95"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b75fe506c8e02769cc47f5ab21ce3e09b6211d3edaa8f8f27331cb6988779be"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9da82aa4b46973aaf9e03bb4c3d6977004648c8638febfc0f9d237e865761270"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c34c022d5ad564f1a5a57a4a89793bd70d7bad428150fb8ff2760b223407cdcf"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1e96c84d6c2a0ca94e15acb5399118fff669f4306beb98a6d8ec6f5dccab4412"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e8e154b84a311263e1aca86818c962e1fa9eefdd643d1d5d197fcd2738f88cb9"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:335fee93188f8cd585552bb8057228ce0111bd227fa81bfd40b7df6b75def8ab"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-win32.whl", hash = "sha256:6729b856166a9e95c278410f73683957ea6100c8a9d0a8dbe434c49663689255"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-win_amd64.whl", hash = "sha256:0e06d99ad1ad97cb2ef7f51ec6b1fedd74a3a700e4949353871cf331d07b382a"}, + {file = "rapidfuzz-3.10.1-cp313-cp313-win_arm64.whl", hash = "sha256:8d1b7082104d596a3eb012e0549b2634ed15015b569f48879701e9d8db959dbb"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:779027d3307e1a2b1dc0c03c34df87a470a368a1a0840a9d2908baf2d4067956"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:440b5608ab12650d0390128d6858bc839ae77ffe5edf0b33a1551f2fa9860651"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82cac41a411e07a6f3dc80dfbd33f6be70ea0abd72e99c59310819d09f07d945"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:958473c9f0bca250590200fd520b75be0dbdbc4a7327dc87a55b6d7dc8d68552"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ef60dfa73749ef91cb6073be1a3e135f4846ec809cc115f3cbfc6fe283a5584"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7fbac18f2c19fc983838a60611e67e3262e36859994c26f2ee85bb268de2355"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a0d519ff39db887cd73f4e297922786d548f5c05d6b51f4e6754f452a7f4296"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bebb7bc6aeb91cc57e4881b222484c26759ca865794187217c9dcea6c33adae6"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fe07f8b9c3bb5c5ad1d2c66884253e03800f4189a60eb6acd6119ebaf3eb9894"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:bfa48a4a2d45a41457f0840c48e579db157a927f4e97acf6e20df8fc521c79de"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2cf44d01bfe8ee605b7eaeecbc2b9ca64fc55765f17b304b40ed8995f69d7716"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1e6bbca9246d9eedaa1c84e04a7f555493ba324d52ae4d9f3d9ddd1b740dcd87"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-win32.whl", hash = "sha256:567f88180f2c1423b4fe3f3ad6e6310fc97b85bdba574801548597287fc07028"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:6b2cd7c29d6ecdf0b780deb587198f13213ac01c430ada6913452fd0c40190fc"}, + {file = "rapidfuzz-3.10.1-cp39-cp39-win_arm64.whl", hash = "sha256:9f912d459e46607ce276128f52bea21ebc3e9a5ccf4cccfef30dd5bddcf47be8"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ac4452f182243cfab30ba4668ef2de101effaedc30f9faabb06a095a8c90fd16"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:565c2bd4f7d23c32834652b27b51dd711814ab614b4e12add8476be4e20d1cf5"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d9747149321607be4ccd6f9f366730078bed806178ec3eeb31d05545e9e8f"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:616290fb9a8fa87e48cb0326d26f98d4e29f17c3b762c2d586f2b35c1fd2034b"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:073a5b107e17ebd264198b78614c0206fa438cce749692af5bc5f8f484883f50"}, + {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:39c4983e2e2ccb9732f3ac7d81617088822f4a12291d416b09b8a1eadebb3e29"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ac7adee6bcf0c6fee495d877edad1540a7e0f5fc208da03ccb64734b43522d7a"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:425f4ac80b22153d391ee3f94bc854668a0c6c129f05cf2eaf5ee74474ddb69e"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65a2fa13e8a219f9b5dcb9e74abe3ced5838a7327e629f426d333dfc8c5a6e66"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75561f3df9a906aaa23787e9992b228b1ab69007932dc42070f747103e177ba8"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:edd062490537e97ca125bc6c7f2b7331c2b73d21dc304615afe61ad1691e15d5"}, + {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cfcc8feccf63245a22dfdd16e222f1a39771a44b870beb748117a0e09cbb4a62"}, + {file = "rapidfuzz-3.10.1.tar.gz", hash = "sha256:5a15546d847a915b3f42dc79ef9b0c78b998b4e2c53b252e7166284066585979"}, +] + +[package.extras] +all = ["numpy"] + [[package]] name = "referencing" version = "0.35.1" @@ -3138,4 +3238,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "e435292b259bf2e52069be6cc57d06ae639e1925858de23b4ce59ec335adb823" +content-hash = "0e35b66a1f66f50246b5659fd9caccabf943ff29e5685e07e17a18d870b40def" diff --git a/fieldExtraction/pyproject.toml b/fieldExtraction/pyproject.toml index 7177fff..d131c0b 100644 --- a/fieldExtraction/pyproject.toml +++ b/fieldExtraction/pyproject.toml @@ -13,6 +13,7 @@ boto3 = "^1.35.40" anthropic = "^0.36.0" python-dotenv = "^1.0.1" psutil = "^6.1.0" +rapidfuzz = "^3.10.1" [tool.poetry.group.dev.dependencies] black = "^24.10.0" diff --git a/fieldExtraction/src/hotfix_stitch.py b/fieldExtraction/scripts/hotfix_stitch.py similarity index 100% rename from fieldExtraction/src/hotfix_stitch.py rename to fieldExtraction/scripts/hotfix_stitch.py diff --git a/fieldExtraction/scripts/hotfix_stitch_1A.py b/fieldExtraction/scripts/hotfix_stitch_1A.py new file mode 100644 index 0000000..6ea3f96 --- /dev/null +++ b/fieldExtraction/scripts/hotfix_stitch_1A.py @@ -0,0 +1,64 @@ + +import pandas as pd + + +# # Nonprompt +abc_nonprompt = pd.read_excel('hotfix_output/CNC-1A-ABC-NonPrompt-HotfixFull.xlsx') +print("NonPrompt:", abc_nonprompt.shape) +print(len(abc_nonprompt['Contract Name'].unique())) + +# Agreement Name +abc_agreement = pd.read_csv('hotfix_output/CNC-1A-AgreementName-All.csv') +print("Agreement Name:", abc_agreement.shape) +print(len(abc_agreement['Contract Name'].unique())) + +# Effective Date +abc_date = pd.read_csv('hotfix_output/CNC-1A-ContractEffectiveDate-All.csv') +abc_date = abc_date[['Contract Name', 'Contract Effective Date_corrected']] +abc_date.drop_duplicates(inplace=True) +print("Effective Date:", abc_date.shape) +print(len(abc_date['Contract Name'].unique())) + +# Term Group +abc_term = pd.read_csv('hotfix_output/CNC-1A-TermGroup-All.csv') +abc_term.columns = ['Contract Name', 'Term Clause_corrected', 'Contract Auto-Renewal Indicator_corrected', 'Termination Date_corrected'] +print("Term Group:", abc_term.shape) +print(len(abc_term['Contract Name'].unique())) + +# Rate +rate_full = pd.read_csv('hotfix_output/CNC-1A-Rate.csv') +rate_468 = pd.read_excel('hotfix_output/CNC-1A-Rate-468.xlsx') +mask = ~rate_full['Contract Name'].isin(rate_468['Contract Name']) +rate_full_filtered = rate_full[mask] +abc_rate = pd.concat([rate_full_filtered, rate_468], ignore_index=True) +abc_rate = abc_rate[['Contract Name', 'Attachment/Exhibit', 'Reimb. Methodology', 'FULL_METHODOLOGY_fixed', 'LESSER_fixed', 'RATE_STANDARD_fixed', 'RATE_SHORT_fixed', 'FLAT_FEE_STANDARD_fixed', 'LESSER_RATE_fixed', 'NOT_TO_EXCEED_fixed', 'SHORT_METHODOLOGY_fixed']] +abc_rate.drop_duplicates(inplace=True) +print("Rate:", abc_rate.shape) +print(len(abc_rate['Contract Name'].unique())) + +# Merge Effective Date +abc_final = pd.merge(abc_nonprompt, abc_date, how='left', on='Contract Name') +print("After Date:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Rate +abc_final = pd.merge(abc_final, abc_rate, how='left', on=['Contract Name', 'Attachment/Exhibit', 'Reimb. Methodology']) +print("After Rate:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Agreement Name +abc_final = pd.merge(abc_final, abc_agreement, how='left', on='Contract Name') +print("After Agreement:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Term Group +abc_final = pd.merge(abc_final, abc_term, how='left', on='Contract Name') +print("After Term (Final):", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +print(list(abc_final.columns)) + +abc_final.to_excel('CNC-1A-Hotfix-Final.xlsx') + + + diff --git a/fieldExtraction/scripts/hotfix_stitch_1B.py b/fieldExtraction/scripts/hotfix_stitch_1B.py new file mode 100644 index 0000000..0fb38c1 --- /dev/null +++ b/fieldExtraction/scripts/hotfix_stitch_1B.py @@ -0,0 +1,62 @@ + +import pandas as pd + + +# # Nonprompt +abc_nonprompt = pd.read_excel('hotfix_output/CNC-1B-ABC-NonPrompt-HotfixFull.xlsx') +print("NonPrompt:", abc_nonprompt.shape) +print(len(abc_nonprompt['Contract Name'].unique())) + +# Agreement Name +abc_agreement = pd.read_csv('hotfix_output/CNC-1B-AgreementName.csv') +abc_agreement.drop_duplicates(inplace=True) +print("Agreement Name:", abc_agreement.shape) +print(len(abc_agreement['Contract Name'].unique())) + +# Effective Date +abc_date = pd.read_excel('hotfix_output/CNC-1B-ContractEffectiveDate.xlsx') +abc_date = abc_date[['Contract Name', 'Contract Effective Date_corrected']] +abc_date.drop_duplicates(inplace=True) +print("Effective Date:", abc_date.shape) +print(len(abc_date['Contract Name'].unique())) + +# Term Group +abc_term = pd.read_excel('hotfix_output/CNC-1B-TermGroup.xlsx') +abc_term.columns = ['Contract Name', 'Term Clause_corrected', 'Contract Auto-Renewal Indicator_corrected', 'Termination Date_corrected'] +abc_term.drop_duplicates(inplace=True) +print("Term Group:", abc_term.shape) +print(len(abc_term['Contract Name'].unique())) + +# Rate +abc_rate = pd.read_excel('hotfix_output/CNC-1B-Rate.xlsx') +abc_rate = abc_rate[['Contract Name', 'Attachment/Exhibit', 'Reimb. Methodology', 'FULL_METHODOLOGY_fixed', 'LESSER_fixed', 'RATE_STANDARD_fixed', 'RATE_SHORT_fixed', 'FLAT_FEE_STANDARD_fixed', 'LESSER_RATE_fixed', 'NOT_TO_EXCEED_fixed', 'SHORT_METHODOLOGY_fixed']] +abc_rate.drop_duplicates(inplace=True) +print("Rate:", abc_rate.shape) +print(len(abc_rate['Contract Name'].unique())) + +# Merge Effective Date +abc_final = pd.merge(abc_nonprompt, abc_date, how='left', on='Contract Name') +print("After Date:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Rate +abc_final = pd.merge(abc_final, abc_rate, how='left', on=['Contract Name', 'Attachment/Exhibit', 'Reimb. Methodology']) +print("After Rate:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Agreement Name +abc_final = pd.merge(abc_final, abc_agreement, how='left', on='Contract Name') +print("After Agreement:", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +# Merge Term Group +abc_final = pd.merge(abc_final, abc_term, how='left', on='Contract Name') +print("After Term (Final):", abc_final.shape) +print(len(abc_final['Contract Name'].unique())) + +print(list(abc_final.columns)) + +abc_final.to_excel('CNC-1B-Hotfix-Final.xlsx') + + + diff --git a/fieldExtraction/src/apply_cnc_hotfix.py b/fieldExtraction/src/apply_cnc_hotfix.py index 5ce2891..55f6cc2 100644 --- a/fieldExtraction/src/apply_cnc_hotfix.py +++ b/fieldExtraction/src/apply_cnc_hotfix.py @@ -6,11 +6,19 @@ import preprocessing_funcs import keywords import valid + import pandas as pd +from rapidfuzz import fuzz, process import concurrent.futures -ABC_PATH = '~/centene-national-contracting/doczy.ai/fieldExtraction/clean_output/CNC-1A-ABC.xlsx' -FILEMAP_PATH = '~/centene-national-contracting/doczy.ai/fieldExtraction/reference_files/batch1_duplicates_mapping.csv' +ABC_PATH = 'UPDATE_PATH_HERE' + +def get_highest_similarity(target_str, str_list): + if target_str in str_list: + return target_str + best_match = process.extractOne(target_str, str_list) + return best_match[0] if best_match else None + def process_hotfix(abc, contract_text): """ @@ -67,18 +75,18 @@ def process_hotfix(abc, contract_text): # # Provider Type Level 2 abc = cnc_hotfix.clean_provider_type_2(abc) - # ######## Prompt-based ######### + ######## Prompt-based ######### # Rate Standard - # abc = cnc_hotfix.clean_rate_standard(abc) + abc = cnc_hotfix.clean_rate_standard(abc) # Contract Effective Date - # abc = cnc_hotfix.clean_contract_effective_date(abc, filename, text_dict) + abc = cnc_hotfix.clean_contract_effective_date(abc, filename, text_dict) # Term Group - # abc = cnc_hotfix.clean_term_group(abc, filename, text_dict, ac_chunks) + abc = cnc_hotfix.clean_term_group(abc, filename, text_dict, ac_chunks) # Agreement Name - # abc = cnc_hotfix.clean_agreement_name(abc, filename, text_dict) + abc = cnc_hotfix.clean_agreement_name(abc, filename, text_dict) else: abc["Contract Duplicate Issue"] = "No Contract Found" @@ -87,41 +95,44 @@ def process_hotfix(abc, contract_text): def main(): - + # Read clean data print("Reading clean data...") - abc_clean = pd.read_excel(ABC_PATH) + if '.xlsx' in ABC_PATH: + abc_clean = pd.read_excel(ABC_PATH) + else: + abc_clean = pd.read_csv(ABC_PATH) unique_output_files = abc_clean['Contract Name'].unique() + print("ABC Clean: ", abc_clean.shape) print(len(unique_output_files), 'files in clean output...') # print(list(abc_clean.columns)) abc_clean.rename(columns=valid.HOTFIX_MAPPING, inplace=True) - + abc_clean['Contract Name'] = 'Filename: ' + abc_clean['Contract Name'] + print(list(abc_clean.columns)) + # Read input dict print("Reading input .txt files...") input_dict = utils.read_input() - input_dict = {filename.strip('.txt') : contract_text for filename, contract_text in input_dict.items()} + input_dict = {'Filename: ' + filename.strip() : contract_text for filename, contract_text in input_dict.items()} print("Input Dict: ", len(input_dict)) - input_dict_dups = utils.read_input('data_cnc/CNC-1-Dups') - input_dict_dups = {filename.strip('.txt') : contract_text for filename, contract_text in input_dict_dups.items()} - print("Input Dict Dups: ", len(input_dict_dups)) + input_keys = list(input_dict.keys()) + abc_clean['Contract Name'] = abc_clean['Contract Name'].apply( + lambda x: get_highest_similarity(x, input_keys) + ) + unique_output_files = abc_clean['Contract Name'].unique() - input_dict_full = input_dict | input_dict_dups - # input_dict_full = input_dict - - print(f"{len([file for file in input_dict_full.keys() if file not in unique_output_files])} files in full s3, not in output") - print(f"{len([file for file in unique_output_files if file not in input_dict_full.keys()])} files in output, not in full s3") - # print(f"{[file for file in unique_output_files if file not in input_dict_full.keys()]} files in output, not in full s3") + print(f"{len([file for file in input_dict.keys() if file not in unique_output_files])} files in full s3, not in output") + print(f"{len([file for file in unique_output_files if file not in input_dict.keys()])} files in output, not in full s3") # Create list of tuples - abc_clean_list = [(group, input_dict_full.get(name)) for name, group in abc_clean.groupby('Contract Name')] + abc_clean_list = [(group, input_dict.get(name)) for name, group in abc_clean.groupby('Contract Name')] print(f"{len(abc_clean_list)} - files in input") print(f"{len([f for f in abc_clean_list if f[1]])} - valid files in input") - + df_list = [] print("Processing hotfixes...") - for abc_df, contract_text in abc_clean_list: new_df = process_hotfix(abc_df, contract_text) df_list.append(new_df) @@ -132,7 +143,7 @@ def main(): print(list(abc_final.columns)) print("Writing to excel...") - abc_final.to_excel(f'{config.BATCH_ID}-ABC-NonPrompt-HotfixFull.xlsx') + abc_final.to_excel(f'{config.BATCH_ID}-Hotfix-Final.xlsx') if __name__ == "__main__": diff --git a/fieldExtraction/src/cnc_hotfix.py b/fieldExtraction/src/cnc_hotfix.py index bb1e644..6a55fb8 100644 --- a/fieldExtraction/src/cnc_hotfix.py +++ b/fieldExtraction/src/cnc_hotfix.py @@ -307,7 +307,7 @@ def reimb_methodology_fix(rm: str): def clean_rate_standard(df: pd.DataFrame) -> pd.DataFrame: - df_relevant = df.loc[(df['Reimb. Methodology'].isna() == False) & (df[r'If rate is % of Payor or MCR [STANDARD]'].isna() == True) & (df['Flat Fee'].isna() == True), :] + df_relevant = df.loc[(df['Reimb. Methodology'].isna() == False) & (df[r'If rate is % of Payor or MCR [STANDARD]'].isna() == True) & (df['FLAT FEE'].isna() == True), :] if not df_relevant.empty: rm_list = df_relevant['Reimb. Methodology'].unique() @@ -435,11 +435,16 @@ def clean_irs(abc_df, filename, text_dict ): # overwrite the corrected columns with clean output if it already has an answer df_merged['PROV_GROUP_TIN_corrected'] = df_merged['dummy'].fillna(df_merged['PROV_GROUP_TIN_corrected']) - df_merged['PROV_TIN_OTHER_corrected'] = df_merged['dummy_other'].fillna(df_merged['PROV_TIN_OTHER_corrected']) - df_merged['PROV_TIN_GROUP_SIGNATORY_corrected'] = df_merged['dummy_other_signatory'].fillna(df_merged['PROV_TIN_GROUP_SIGNATORY_corrected']) - df_merged = df_merged.rename(columns={'PROV_GROUP_TIN_corrected': 'IRS_corrected'}) - df_merged = df_merged.loc[:, ~df_merged.columns.str.contains('dummy')] + if 'dummy_other' in df_merged.columns: + df_merged['PROV_TIN_OTHER_corrected'] = df_merged['dummy_other'].fillna(df_merged['PROV_TIN_OTHER_corrected']) + + if 'dummy_other_signatory' in df_merged.columns: + df_merged['PROV_TIN_GROUP_SIGNATORY_corrected'] = df_merged['dummy_other_signatory'].fillna(df_merged['PROV_TIN_GROUP_SIGNATORY_corrected']) + + df_merged = df_merged.rename(columns={'PROV_GROUP_TIN_corrected': 'IRS_corrected'}) + + df_merged = df_merged.loc[:, ~df_merged.columns.str.contains('dummy')] return df_merged @@ -516,7 +521,7 @@ def clean_contract_effective_date( contract_effective_date = df['Contract Effective Date'].dropna().unique().tolist()[0] if not df['Contract Effective Date'].dropna().empty else None # previous run's contract effective date (if any) - payer_name = df['Payer Name'].dropna().unique().tolist() + payer_name = df["PAYER NAME"].dropna().unique().tolist() if len(payer_name) == 0: payer_name = "" @@ -556,7 +561,8 @@ def clean_npi(abc_df, filename, text_dict, top_sheet_dict ): df_merged = npi_post_process(df_merged) df_merged['NPI_corrected'] = df_merged['dummy'].fillna(df_merged['NPI_corrected']) - df_merged['NPI_other_corrected'] = df_merged['dummy_other'].fillna(df_merged['NPI_other_corrected']) + if 'dummy_other' in df_merged.columns: + df_merged['NPI_other_corrected'] = df_merged['dummy_other'].fillna(df_merged['NPI_other_corrected']) df_merged = df_merged.loc[:, ~df_merged.columns.str.contains('dummy')] return df_merged diff --git a/fieldExtraction/src/hotfix_helper_funcs.py b/fieldExtraction/src/hotfix_helper_funcs.py index 31795e3..c619b98 100644 --- a/fieldExtraction/src/hotfix_helper_funcs.py +++ b/fieldExtraction/src/hotfix_helper_funcs.py @@ -57,28 +57,27 @@ def remove_alphabets(input_str): def clean_output_postprocess(merged_df): merged_df['dummy'] = merged_df['IRS #'] - merged_df['dummy_other'] = merged_df['PROV_TIN_OTHER'] - merged_df['dummy_other_signatory'] = merged_df["PROV_GROUP_TIN_SIGNATORY"] - merged_df['dummy'] = merged_df['dummy'].astype(str) - merged_df['dummy_other'] = merged_df['dummy_other'].astype(str) - merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].astype(str) - merged_df['dummy'] = merged_df['dummy'].apply(convert_to_list) - merged_df['dummy_other'] = merged_df['dummy_other'].apply(convert_to_list) - merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(convert_to_list) - merged_df['dummy'] = merged_df['dummy'].apply(lambda lst: [x for x in [remove_alphabets(x) for x in lst] if x is not None]) - merged_df['dummy_other'] = merged_df['dummy_other'].apply(lambda lst: [x for x in [remove_alphabets(x) for x in lst] if x is not None]) - merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(lambda lst: [x for x in [remove_alphabets(x) for x in lst] if x is not None]) - merged_df['dummy'] = merged_df['dummy'].apply(lambda lst: [x for x in [add_hyphen_if_needed(x) for x in lst] if x is not None]) - merged_df['dummy_other'] = merged_df['dummy_other'].apply(lambda lst: [x for x in [add_hyphen_if_needed(x) for x in lst] if x is not None]) - merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(lambda lst: [x for x in [add_hyphen_if_needed(x) for x in lst] if x is not None]) - merged_df['dummy'] = merged_df['dummy'].apply(list_to_string) - merged_df['dummy_other'] = merged_df['dummy_other'].apply(list_to_string) - merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(list_to_string) + + if 'PROV_TIN_OTHER' in merged_df.columns: + merged_df['dummy_other'] = merged_df['PROV_TIN_OTHER'] + merged_df['dummy_other'] = merged_df['dummy_other'].astype(str) + merged_df['dummy_other'] = merged_df['dummy_other'].apply(convert_to_list) + merged_df['dummy_other'] = merged_df['dummy_other'].apply(lambda lst: [x for x in [remove_alphabets(x) for x in lst] if x is not None]) + merged_df['dummy_other'] = merged_df['dummy_other'].apply(lambda lst: [x for x in [add_hyphen_if_needed(x) for x in lst] if x is not None]) + merged_df['dummy_other'] = merged_df['dummy_other'].apply(list_to_string) + + if 'PROV_GROUP_TIN_SIGNATORY' in merged_df.columns: + merged_df['dummy_other_signatory'] = merged_df["PROV_GROUP_TIN_SIGNATORY"] + merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].astype(str) + merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(convert_to_list) + merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(lambda lst: [x for x in [remove_alphabets(x) for x in lst] if x is not None]) + merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(lambda lst: [x for x in [add_hyphen_if_needed(x) for x in lst] if x is not None]) + merged_df['dummy_other_signatory'] = merged_df['dummy_other_signatory'].apply(list_to_string) return merged_df @@ -426,28 +425,23 @@ def convert_to_string(value): def npi_post_process(df_merged): df_merged['dummy'] = df_merged['NPI (10-digits)'] - df_merged['dummy_other'] = df_merged["PROV_NPI_OTHER"] - df_merged['dummy'] = df_merged['dummy'].apply(convert_to_string) - df_merged['dummy_other'] = df_merged['dummy_other'].astype(str) - df_merged['dummy'] = df_merged['dummy'].apply(convert_to_list) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(convert_to_list) - df_merged['dummy'] = df_merged['dummy'].apply(remove_dashes) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(remove_dashes) - df_merged['dummy'] = df_merged['dummy'].apply(filter_elements_by_length) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_elements_by_length) - df_merged['dummy'] = df_merged['dummy'].apply(filter_non_digits) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_non_digits) - df_merged['dummy'] = df_merged['dummy'].apply(filter_start_with_1_or_2) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_start_with_1_or_2) - df_merged['dummy'] = df_merged['dummy'].apply(list_to_string) - df_merged['dummy_other'] = df_merged['dummy_other'].apply(list_to_string) + + if 'PROV_NPI_OTHER' in df_merged.columns: + df_merged['dummy_other'] = df_merged["PROV_NPI_OTHER"] + df_merged['dummy_other'] = df_merged['dummy_other'].astype(str) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(convert_to_list) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(remove_dashes) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_elements_by_length) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_non_digits) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(filter_start_with_1_or_2) + df_merged['dummy_other'] = df_merged['dummy_other'].apply(list_to_string) return df_merged diff --git a/fieldExtraction/src/postprocessing_funcs.py b/fieldExtraction/src/postprocessing_funcs.py index 788548f..4a5d8ee 100644 --- a/fieldExtraction/src/postprocessing_funcs.py +++ b/fieldExtraction/src/postprocessing_funcs.py @@ -83,6 +83,9 @@ def correct_misplaced_values(df, columns, valid_values_dict): def filter_service_column(answer_dicts): + """ + Filters the answer_dicts based on the presence of specific keywords. + """ filtered_list = [] for d in answer_dicts: clean_dict = True diff --git a/fieldExtraction/src/prompts.py b/fieldExtraction/src/prompts.py index 612efb0..908123b 100644 --- a/fieldExtraction/src/prompts.py +++ b/fieldExtraction/src/prompts.py @@ -21,7 +21,7 @@ Here are the attributes to be included in each dictionary, and instructions on h 'FULL_METHODOLOGY' : Write the full sentence or paragraph in the text describing the reimbursement methodology. 'PROV_TYPE' : Write the Provider Type of the service. Choose ONLY from the following: {valid.VALID_PROV_TYPES}. Note that Facility may also be referred to as Hospital, Clinic, Institutional or similar. Professional may also be referred to as Physician, Physician Services, Practicioner, Provider or similar. Make sure to break out/differentiate between Professional, Facility, and Ancillary. Do not mix the two. Do NOT write 'N/A' for this field. - Ensure any relevant detail is included, including rates in tables if applicable. Include any 'Lesser of' statement that applies to the reimbursement. The 'Lesser of' statement might not be found in immediate proximity to the reimbursement term and may instead be found in a paragraph above. If the methodology is presented in a table, concatenate any relevant lesser of statement that applies to the table with the portion of the methodology found in the table. +Ensure any relevant detail is included, including rates in tables if applicable. Include any 'Lesser of' statement that applies to the reimbursement. The 'Lesser of' statement might not be found in immediate proximity to the reimbursement term and may instead be found in a paragraph above. If the methodology is presented in a table, concatenate any relevant lesser of statement that applies to the table with the portion of the methodology found in the table. Here are some examples of language with additional context to be included in the FULL_SERVICE: Text: 'Covered Services that are Medicare Covered Services and are not Medicaid Covered Services', diff --git a/fieldExtraction/src/valid.py b/fieldExtraction/src/valid.py index b406606..e86898a 100644 --- a/fieldExtraction/src/valid.py +++ b/fieldExtraction/src/valid.py @@ -673,10 +673,15 @@ HOTFIX_MAPPING = { "LESSER_RATE": "Lesser of Rate", "FULL_METHODOLOGY": "Reimb. Methodology", "SHORT_METHODOLOGY": "Reimb. Methodology_Short", + 'Reimb. Methodology Short' : 'Reimb. Methodology_Short', + 'If rate is % of Payor or MCR [Standard]' : 'If rate is % of Payor or MCR [STANDARD]', 'If Rate is % of Payor or MCR [Standard]' : "If rate is % of Payor or MCR [STANDARD]", + 'If rate is % of Payor or MCR [STANDARD]' : "If rate is % of Payor or MCR [STANDARD]", "RATE_STANDARD": "If rate is % of Payor or MCR [STANDARD]", + 'If rate is % of Payor or MCR [Standard] Short' : 'If rate is % of Payor or MCR [STANDARD]_Short', "RATE_SHORT": "If rate is % of Payor or MCR [STANDARD]_Short", "FLAT_FEE_STANDARD": "FLAT FEE", + 'Flat Fee' : 'FLAT FEE', "DEFAULT_TERM": "Default Term", "DEFAULT_RATE": "Default Rate", "MEDICAL_NECESSITY_LANGUAGE": "Medical Necessity Language (Language)", @@ -684,6 +689,7 @@ HOTFIX_MAPPING = { 'Inclusion of essential RBRVS "Fee Source" Language (Y/N)': 'Inclusion of essential RBRVS "Fee Source" Language (Y/N)', "CDM_IND": "CDM Neutralization Language, included (Y/N)", "CHARGEMASTER": "CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE", + 'Contract Chargemaster Protection Language' : "CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE", "ADD_ON_REIMBURSEMENT_LANGUAGE": "Add On Reimbursement (Language)", "ADD_ON_REIMBURSEMENT_IND": "Add On Reimbursement (Y/N)", "SINGLE_CODE_MULTIPLE_RATES_LANGUAGE": "Single Code Multiple Rates (Language)", @@ -695,7 +701,9 @@ HOTFIX_MAPPING = { "RATE_ESCALATOR_IND": "Escalator or COLA (Y/N)", "RATE_ESCALATOR_DT": "Escalator I, Eff. Date", "CONTRACT_TITLE": "Agreement_Name (Contract Title)", + 'Agreement Name (Contract Title)': "Agreement_Name (Contract Title)", "PAYER_NAME": "PAYER NAME", + "Payer Name" : "PAYER NAME", "AFFILIATION_CLAUSE_IND": "Affiliate (Y/N)", "TERM_CLAUSE": "Term Clause", "CONTRACT_AUTO_RENEWAL_IND": "Contract Auto-Renewal Indicator",