Skip to content

Commit

Permalink
Merge branch 'develop' into lisac/cc-helm
Browse files Browse the repository at this point in the history
  • Loading branch information
lisac authored Apr 18, 2024
2 parents 6bb3e32 + f434279 commit 095c76e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api-gateway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

// Spring Cloud
implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.1.2'
implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.1.3'
if (osdetector.classifier == "osx-aarch_64") {
// Fix MacOS error: Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider,
// which may result in incorrect DNS resolutions.
Expand Down
4 changes: 2 additions & 2 deletions domain-cc/cc-app/src/python_src/util/lookup_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_v1_lookup_table(filepath: str, input_key: str, output_key: str) -> dict:
try:
text_to_convert = int(csv_line[input_key])
except ValueError:
text_to_convert = csv_line[input_key].lower()
text_to_convert = csv_line[input_key].strip().lower()
classification_code = int(csv_line[output_key])
classification_code_mappings[text_to_convert] = classification_code
except KeyError:
Expand Down Expand Up @@ -193,7 +193,7 @@ def get_lookup_table(
for row in csv_reader:
for k in v2_input_key:
if row[k] and row[v2_output_key]:
classification_code_mappings[row[k].lower()] = int(
classification_code_mappings[row[k].strip().lower()] = int(
row[v2_output_key]
)
# raises exception if dropdown_v2_filepath is None (only create DC LUT)
Expand Down
14 changes: 14 additions & 0 deletions domain-cc/cc-app/tests/test_condition_dropdown_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,17 @@ def test_new_dropdown_list(client: TestClient):
assert response.status_code == 200
assert response.json()["classification_code"] == 9007
assert response.json()["classification_name"] == "Neurological other System"


def test_whitespace_removal(client: TestClient):
json_post_dict = {
"diagnostic_code": 7,
"claim_id": 700,
"form526_submission_id": 777,
"claim_type": "new",
"contention_text": "pharyngeal cancer (throat cancer) ",
}
response = client.post("/classifier", json=json_post_dict)
assert response.status_code == 200
assert response.json()["classification_code"] == 1230
assert response.json()["classification_name"] == "Cancer - Respiratory"

0 comments on commit 095c76e

Please sign in to comment.