Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove input from FHIR conversion error messaging to reduce noise #650

Merged
merged 9 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions containers/fhir-converter/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def convert(input: FhirConverterInput, response: Response):
https://github.com/microsoft/FHIR-Converter.
"""
result = convert_to_fhir(**dict(input))
if "original_request" in result.get("response"):
if "fhir_conversion_failed" in result.get("response"):
response.status_code = status.HTTP_400_BAD_REQUEST

return result
Expand Down Expand Up @@ -242,11 +242,6 @@ def convert_to_fhir(

else:
result = vars(converter_response)
# Include original input data in the result.
result["original_request"] = {
"input_data": input_data,
"input_type": input_type,
"root_template": root_template,
}
result["fhir_conversion_failed"] = "true"

return {"response": result}
6 changes: 1 addition & 5 deletions containers/fhir-converter/tests/test_FHIR-Converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@
"_spec_set": None,
"_spec_signature": None,
"method_calls": [],
"original_request": {
"input_data": "VALID_INPUT_DATA",
"input_type": "elr",
"root_template": "ADT_A01",
},
"fhir_conversion_failed": "true",
"returncode": 1,
}

Expand Down