Skip to content

Commit

Permalink
HCX: Fix payor search filtering and claim supporting info category URL (
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Jul 26, 2024
1 parent cc1185c commit eab3290
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions care/hcx/api/viewsets/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,25 @@ def send_communication(self, request):
def payors(self, request):
payors = Hcx().searchRegistry("roles", "payor")["participants"]

active_payors = list(filter(lambda payor: payor["status"] == "Active", payors))
result = filter(lambda payor: payor["status"] == "Active", payors)

if query := request.query_params.get("query"):
query = query.lower()
result = filter(
lambda payor: (
query in payor["participant_name"].lower()
or query in payor["participant_code"].lower()
),
result,
)

response = list(
map(
lambda payor: {
"name": payor["participant_name"],
"code": payor["participant_code"],
},
active_payors,
result,
)
)

Expand Down
4 changes: 3 additions & 1 deletion care/hcx/utils/fhir.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ class SYSTEM:
claim_bundle_identifier = "https://www.tmh.in/bundle"
coverage_eligibility_request_bundle_identifier = "https://www.tmh.in/bundle"
practitioner_speciality = "http://snomed.info/sct"
claim_supporting_info_category = "https://ig.hcxprotocol.io/v0.7.1/ValueSet-claim-supporting-info-categories.html"
claim_supporting_info_category = (
"http://hcxprotocol.io/codes/claim-supporting-info-categories"
)
related_claim_relationship = (
"http://terminology.hl7.org/CodeSystem/ex-relatedclaimrelationship"
)
Expand Down

0 comments on commit eab3290

Please sign in to comment.