Searching for Tasks and ClinicalImpressions
Summary
These guidelines provide examples of queries for retrieving and managing Task and ClinicalImpression resources within the eHealth infrastructure.
Content
- 1 Summary
- 2 Content
- 3 Task Searched
- 3.1 How do I get the list of unassigned Task resources for my CareTeam?
- 3.2 How do I get the list of Task resources for an EpisodeOfCare?
- 3.3 How do I get the list of Task resources for my CareTeam sorted by priority and paginated?
- 3.4 How to get the list of Task resources related to a specific solution (eg K-PRO or TELMA)
- 4 Clinical Impression Searches
- 4.1 Model Background
- 4.2 How do I get a list of ClinicalImpression resources referenced in Task resources for my CareTeam?
- 4.3 How do I get a list of ClinicalImpression resources in an EpisodeOfCare or CarePlan?
- 4.4 How do I get a list of ClinicalImpression resources in an EpisodeOfCare
- 4.5 How do I get a list of ClinicalImpression resources in an Careplan
Task Searched
How do I get the list of unassigned Task resources for my CareTeam?
GET [task.base]/Task/?status=requested&reponsible=<my CareTeam reference>
How do I get the list of Task resources for an EpisodeOfCare?
Being implemented as part of CCR0219. Not in production or test yet.
GET [task.base]/Task/?status=requested&episodeOfCare=<episode of care reference>
This approach retrieves all tasks associated with a specific EpisodeOfCare
, regardless of their current responsible
, owner
, or other attributes. It’s particularly helpful in scenarios where the EpisodeOfCare
has been transferred to a new team (e.g., the EpisodeOfCare.team
has been updated).
By retrieving all tasks linked to the EpisodeOfCare
, your solution can:
Identify all tasks related to the episode, ensuring nothing is missed.
Reassign tasks to the new team if needed, ensuring continuity of care and proper task ownership.
This method ensures that tasks remain aligned with the current team responsible for the episode, even after changes in team assignments.
How do I get the list of Task resources for my CareTeam sorted by priority and paginated?
The ordering of the Priority value is by default lexicographical in FHIR. It is possible to get a descending priority ordering by using the following two queries:
GET [task.base]/Task/?status=requested&reponsible=<my CareTeam reference>&priority=asap,stat&_sort=-status
GET [task.base]/Task/?status=requested&reponsible=<my CareTeam reference>&priority=routine,urgent&_sort=-status
How to get the list of Task resources related to a specific solution (eg K-PRO or TELMA)
Example:
GET [task.base]/Task?_tag=http://ehealth.sundhed.dk/cs/ehealth-system|xa
Possible tags can be found in this CodeSystem: https://ehealth.sundhed.dk/fhir/CodeSystem-ehealth-system.html
Details about co-existence tags can be found here: Multitenancy
Clinical Impression Searches
Model Background
A ClinicalImpression must be associated with exactly one EpisodeOfCare (EOC) (cardinality 1..1).
A ClinicalImpression can optionally be associated with a CarePlan (cardinality 0..1).
That is, the model requires that ClinicalImpression is always linked to an EpisodeOfCare, but allows it to not be linked to a CarePlan.
Below is an example of an object diagram illustrating the relationship between ClinicalImpression, EpisodeOfCare, and CarePlan.
Search | Result | Justification |
---|---|---|
| Clinical Impression A, B, and C | - |
| Clinical Impression A, B, and C | - |
| No result | The EOC context matches parameter “EOC A”, but the CareTeam in context is not part of |
| Clinical Impression C | CareTeam 3 in the context matches |
Notice.
A CareTeam that is included in ClinicalImpression.EpisodeOfCare.team
but the CareTeam are not connected to the CarePalna (via CarePlan.careTeam
) is allowed access to a ClinicalImpression for the EpisodeOfCare even if not connected to the CarePlan.
On the other hand, a CareTeam that is not included in ClinicalImpression.EpisodeOfCare.team
are not allowed access to a ClinicalImpression if that ClinicalImpression is connected to a CarePlan that the CareTeam does not have permission to access.
In other words:
If the CareTeam is absent from the EpisodeOfCare's team list
AND the ClinicalImpression is linked to a CarePlan
AND the CareTeam lacks access rights to that CarePlan
THEN the CareTeam are prevented from accessing the ClinicalImpression
This rule ensures proper access control by preventing CareTeams from accessing clinical impressions through unauthorized pathways when they lack the necessary permissions for the associated care plans.
How do I get a list of ClinicalImpression resources referenced in Task resources for my CareTeam?
GET [task.base]/Task/?reponsible=<my CareTeam reference>&_include=Task:focus
This search gives a paginated result where the same page contains both Tasks and referenced ClinicalImpression.
The _include=Task:focus
works for resources provided on the same service as Task, currently ClinicalImpression only.
How do I get a list of ClinicalImpression resources in an EpisodeOfCare or CarePlan?
Note that ClinicalImpressions are always related to an EpisodeOfCare, and can have a relation to a CarePlan.
To search for ClinicalImpression, the practitioner must have a CareTeam in the security context and can have an EpisodeOfCare in the security context.
Solutions can search for ClinicalImpressions within EpisodeOfCare under the following conditions:
The practitioner’s team is directly assigned to the EOC but is not assigned to any careplan within the EOC
EOC must be provided as a search parameter and, therefore, be in the security context. The search results include all ClinicalImpressions linked to the EOC.
The practitioner’s team is directly assigned to the EOC and assigned to a careplan within the EOC.
EOC can be provided as a search parameter and, therefore, be in the security context. The search results include all ClinicalImpressions linked to the EOC.
EOC is not provided as a search parameter, so CarePlan(s) must be provided as a parameter. The search results include all Clinical Impressions linked to the CarePlan(s).
The practitioner’s team is not directly assigned to the EOC but is assigned to a careplan within the EOC.
EOC can be provided as a search parameter and, therefore, be in the security context. The search results include ClinicalImpressions linked to EOC where the practitioner’s team is involved at the careplan level (even if they are not directly assigned to the EOC itself).
The CarePlan can be provided as a search parameter. The search results include ClinicalImpressions linked to CarePlan if the practitioner’s team is involved at the careplan level.
How do I get a list of ClinicalImpression resources in an EpisodeOfCare
The solution can perform the following search to get the list of ClinicalImpression resources referencing an EpisodeOfCare.
GET [task.base]/ClinicalImpression/?episodeOfCare=<episode of care reference(s)>
How do I get a list of ClinicalImpression resources in an Careplan
Or the following to get the list of ClinicalImpression resources referencing a specific careplan.
GET [task.base]/ClinicalImpression/?carePlan=<careplan reference(s)>