Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CareTeam and groups module to use server side pagination and search #1251

Merged
merged 12 commits into from
Sep 6, 2023

Conversation

peterMuriuki
Copy link
Collaborator

@peterMuriuki peterMuriuki commented Sep 1, 2023

Close #1249

Update CareTeam and groups module to use server side pagination and search

On R4 version. search for these resources is not supported, and loading this views and searching will throw ab error that name is not a supported search parameter for the above resources. This issue can be fixed by updating the SearchParameter resource

Here is a sample payload that adds capability to search careTeams by the name property

{
  "resourceType": "SearchParameter",
  "id": "7a923ed5-fac0-44f8-a0de-8cab219e217f",
  "name": "careTeam-search",
  "status": "active",
  "description": "Custom search parameter using name for CareTeams",
  "code": "name",
  "base": ["CareTeam"],
  "type": "string",
  "expression": "CareTeam.name",
  "xpath": "f:CareTeam/f:name",
  "comparator": ["eq"],
  "modifier": ["contains"],
  "multipleOr": false,
  "multipleAnd": false
}

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2023

Codecov Report

Merging #1251 (8ab7acb) into master (8beec0d) will decrease coverage by 0.01%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master    #1251      +/-   ##
==========================================
- Coverage   92.98%   92.97%   -0.01%     
==========================================
  Files         201      201              
  Lines        5517     5525       +8     
  Branches     1212     1214       +2     
==========================================
+ Hits         5130     5137       +7     
- Misses        381      382       +1     
  Partials        6        6              
Files Changed Coverage Δ
...ages/react-utils/src/hooks/useSimpleTabularView.ts 91.66% <ø> (ø)
...s/fhir-care-team/src/components/ListView/index.tsx 93.93% <83.33%> (-2.62%) ⬇️
...onents/BaseComponents/BaseGroupsListView/index.tsx 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@kahummer kahummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@peterMuriuki peterMuriuki merged commit 07c62ba into master Sep 6, 2023
2 checks passed
@peterMuriuki peterMuriuki deleted the 1249-no-local-search branch September 6, 2023 08:32
@peterMuriuki
Copy link
Collaborator Author

One can also post the following to support name- search for both groups and careTeams

{
	"resourceType": "Bundle",
	"type": "transaction",
	"entry": [
		{
			"resource": {
				"resourceType": "SearchParameter",
				"id": "7a923ed5-fac0-44f8-a0de-8cab219e217f",
				"name": "careTeam-search",
				"status": "active",
				"description": "Custom search parameter using name for CareTeams",
				"code": "name",
				"base": [
					"CareTeam"
				],
				"type": "string",
				"expression": "CareTeam.name",
				"xpath": "f:CareTeam/f:name",
				"comparator": [
					"eq"
				],
				"modifier": [
					"contains"
				],
				"multipleOr": false,
				"multipleAnd": false
			},
			"request": {
				"method": "PUT",
				"url": "SearchParameter/7a923ed5-fac0-44f8-a0de-8cab219e217f"
			}
		},
		{
			"resource": {
				"resourceType": "SearchParameter",
				"id": "b1740f3e-70ec-4bb4-a12e-c92b5b4ddc51",
				"name": "Group-search",
				"status": "active",
				"description": "Custom search parameter using name for Groups",
				"code": "name",
				"base": [
					"Group"
				],
				"type": "string",
				"expression": "Group.name",
				"xpath": "f:Group/f:name",
				"comparator": [
					"eq"
				],
				"modifier": [
					"contains"
				],
				"multipleOr": false,
				"multipleAnd": false
			},
			"request": {
				"method": "PUT",
				"url": "SearchParameter/b1740f3e-70ec-4bb4-a12e-c92b5b4ddc51"
			}
		}
	]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants