Skip to content

Commit

Permalink
Add more properties on the lookup API for CodeSystem.
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Jan 8, 2025
1 parent 38e5e89 commit 98641ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions care/emr/api/viewsets/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ def get_queryset(self):
).values("user_id")
)


class FacilityUserFilter(FilterSet):
username = CharFilter(field_name="username", lookup_expr="icontains")


class FacilityUsersViewSet(EMRModelReadOnlyViewSet):
database_model = User
pydantic_read_model = UserSpec
Expand Down
4 changes: 3 additions & 1 deletion care/emr/api/viewsets/valueset.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def lookup_code(self, request, *args, **kwargs):
Coding(**request.data) # Validate
result = (
CodeConceptResource()
.filter(code=request.data["code"], system=request.data["system"])
.filter(
code=request.data["code"], system=request.data["system"], property="*"
)
.get()
)
return Response(result)
2 changes: 1 addition & 1 deletion care/emr/fhir/resources/code_concept.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class CodeConceptResource(ResourceManger):
allowed_properties = ["system", "code"]
allowed_properties = ["system", "code", "property"]
resource = "CodeConcept"

def serialize_lookup(self, result):
Expand Down

0 comments on commit 98641ae

Please sign in to comment.