Skip to content

Commit

Permalink
Tweaks to fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyfagan committed Jun 13, 2024
1 parent f933556 commit fd80111
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/fhir/bluebutton/views/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def __init__(self, version=1):
self.resource_type = "Patient"

def get(self, request, *args, **kwargs):
c4dic = request.query_params['_profile'] == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient"
if c4dic:
profile = request.query_params.get('_profile', '')
if profile == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient":
return Response(get_response_json("patient_read_c4dic"))
else:
return super().get(request, *args, **kwargs)
Expand All @@ -70,8 +70,8 @@ def __init__(self, version=1):
self.resource_type = "Coverage"

def get(self, request, *args, **kwargs):
c4dic = request.query_params['_profile'] == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage"
if c4dic:
profile = request.query_params.get('_profile', '')
if profile == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient":
return Response(get_response_json("coverage_read_c4dic"))
else:
return super().get(request, *args, **kwargs)
Expand Down
8 changes: 4 additions & 4 deletions apps/fhir/bluebutton/views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def build_parameters(self, request, *args, **kwargs):
}

def get(self, request, *args, **kwargs):
c4dic = request.query_params['_profile'] == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient"
if c4dic:
profile = request.query_params.get('_profile', '')
if profile == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient":
return Response(get_response_json("patient_search_c4dic"))
else:
return super().get(request, *args, **kwargs)
Expand All @@ -108,8 +108,8 @@ def build_parameters(self, request, *args, **kwargs):
}

def get(self, request, *args, **kwargs):
c4dic = request.query_params['_profile'] == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Coverage"
if c4dic:
profile = request.query_params.get('_profile', '')
if profile == "http://hl7.org/fhir/us/insurance-card/StructureDefinition/C4DIC-Patient":
return Response(get_response_json("coverage_search_c4dic"))
else:
return super().get(request, *args, **kwargs)
Expand Down

0 comments on commit fd80111

Please sign in to comment.