-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to display documents based on communicationRequest subject
- Loading branch information
1 parent
07c744b
commit ac762a9
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
resources/seeds/Search/subject-id-or-communication-request.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: subject-id-or-communication-request | ||
where: |- | ||
{{table}}.id IN | ||
( | ||
SELECT t.id from | ||
( | ||
SELECT qr.id from questionnaireresponse as qr | ||
WHERE resource#>>'{subject,id}' = {{param}} | ||
OR | ||
resource#>>'{subject,id}' IN | ||
( | ||
SELECT id from communicationrequest | ||
WHERE resource#>>'{subject,id}'={{param}} | ||
) | ||
) as t | ||
) | ||
format: "?" | ||
resource: | ||
id: QuestionnaireResponse | ||
resourceType: Entity | ||
id: QuestionnaireResponse.subject-id-or-communication-request | ||
resourceType: Search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters