Skip to content

Commit 6021985

Browse files
Address TODO that arose from a change made in BB2-4233
1 parent 80307e3 commit 6021985

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/fhir/bluebutton/views/generic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import voluptuous
44
import logging
55

6+
from apps.dot_ext.utils import get_api_version_number_from_url
67
from apps.versions import VersionNotMatched, Versions
78
import apps.logging.request_logger as bb2logging
89

@@ -166,8 +167,10 @@ def fetch_data(self, request, resource_type, *args, **kwargs):
166167

167168
# Handle the case where it is a patient search call, but neither _id or identifier were passed
168169
if '_id' not in get_parameters.keys() and 'identifier' not in get_parameters.keys():
170+
path_info = request.path
171+
version = get_api_version_number_from_url(path_info)
169172
# depending on if 4166 is merged first, this will need to be updated
170-
get_parameters['_id'] = request.crosswalk.fhir_id(2)
173+
get_parameters['_id'] = request.crosswalk.fhir_id(version)
171174
# Reset the request parameters and the prepped request after adding the missing, but required, _id param
172175
req.params = get_parameters
173176
prepped = s.prepare_request(req)

0 commit comments

Comments
 (0)