Skip to content

Commit

Permalink
Revert "rename message parser configs (#3017)"
Browse files Browse the repository at this point in the history
This reverts commit a2ef121.
  • Loading branch information
mcmcgrath13 authored Dec 11, 2024
1 parent bc6cf1e commit 1c4987e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 25 deletions.
30 changes: 12 additions & 18 deletions containers/ecr-viewer/seed-scripts/create-seed-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ def _process_files(args):
# Holds all of the rquests we are going to make
requests = []
folder_paths = []
configName = "integrated.json"
if os.getenv("METADATA_DATABASE_SCHEMA") == "extended":
configName = "non-integrated-extended.json"
elif os.getenv("METADATA_DATABASE_SCHEMA") == "core":
configName = "non-integrated-core.json"

def _process_eicrs(subfolder, folder, folder_path, payload):
r = grequests.post(f"{URL}/process-message", json=payload)
Expand Down Expand Up @@ -87,7 +82,7 @@ def _process_eicrs(subfolder, folder, folder_path, payload):
payload = {
"message_type": "ecr",
"data_type": "ecr",
"config_file_name": configName,
"config_file_name": "save-eicr-to-ecr-viewer-config.json",
"message": eicr_file.read(),
"rr_data": rr_file.read(),
}
Expand Down Expand Up @@ -115,18 +110,17 @@ def _process_eicrs(subfolder, folder, folder_path, payload):
print(f"Failed to convert {folder_path}.\nResponse:\n{responses_json}")
continue

if "responses" in responses_json.get("processed_values", {}):
for response in responses_json["processed_values"]["responses"]:
if "stamped_ecr" in response:
with open(
os.path.join(folder_path, "bundle.json"),
"w",
) as fhir_file:
json.dump(
response["stamped_ecr"]["extended_bundle"],
fhir_file,
indent=4,
)
for response in responses_json["processed_values"]["responses"]:
if "stamped_ecr" in response:
with open(
os.path.join(folder_path, "bundle.json"),
"w",
) as fhir_file:
json.dump(
response["stamped_ecr"]["extended_bundle"],
fhir_file,
indent=4,
)
print(f"Converted {folder_path} successfully.")

print(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ services:
condition: service_healthy
ports:
- "8081:8081"
environment:
- METADATA_DATABASE_TYPE=${METADATA_DATABASE_TYPE}
env_file:
- ../../ecr-viewer/.env.local
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"endpoint": "/parse_message",
"params": {
"message_format": "fhir",
"parsing_schema_name": "core.json",
"parsing_schema_name": "ecr_viewer_metadata.json",
"credential_manager": "azure"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"endpoint": "/parse_message",
"params": {
"message_format": "fhir",
"parsing_schema_name": "extended.json",
"parsing_schema_name": "philly_ecr.json",
"credential_manager": "azure"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"endpoint": "/parse_message",
"params": {
"message_format": "fhir",
"parsing_schema_name": "core.json"
"parsing_schema_name": "ecr_viewer_metadata.json"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"endpoint": "/parse_message",
"params": {
"message_format": "fhir",
"parsing_schema_name": "core.json",
"parsing_schema_name": "ecr_viewer_metadata.json",
"credential_manager": "azure"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_previous_response_mapping_for_ecr_viewer(setup, clean_up_db):
form_data = {
"message_type": "ecr",
"data_type": "zip",
"config_file_name": "non-integrated-core.json",
"config_file_name": "save-eicr-to-ecr-viewer-config.json",
}
files = {"upload_file": ("file.zip", file)}
orchestration_response = httpx.post(
Expand Down

0 comments on commit 1c4987e

Please sign in to comment.