Skip to content

Commit e299f3e

Browse files
committed
VED-740: convert fhir model into json
1 parent 05aeba1 commit e299f3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/src/fhir_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def get_immunization_by_identifier(self, aws_event) -> dict:
102102
try:
103103
if resource := self.fhir_service.get_immunization_by_identifier(
104104
identifiers, imms_vax_type_perms, identifier, element):
105-
return FhirController.create_response(200, resource)
105+
return FhirController.create_response(200, json.dumps(resource))
106106
except UnauthorizedVaxError as unauthorized:
107107
return self.create_response(403, unauthorized.to_operation_outcome())
108108

backend/src/models/utils/generic_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def form_json(response, _element, identifier, baseurl):
180180

181181
fhir_bundle.entry = [entry]
182182
fhir_bundle.total = 1
183-
return fhir_bundle
183+
return fhir_bundle.dict(by_alias=True)
184184

185185

186186
def check_keys_in_sources(event, not_required_keys):

0 commit comments

Comments
 (0)