Skip to content

Commit 647cc46

Browse files
committed
Update Patient-Everything
Include details on how the results are returned.
1 parent d77d138 commit 647cc46

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed

articles/healthcare-apis/azure-api-for-fhir/patient-everything.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: cavoeg
1212

1313
# Patient-everything in FHIR
1414

15-
The [Patient-everything](https://www.hl7.org/fhir/patient-operation-everything.html) operation is used to provide a patient with access to their entire record or, for a provider or other user, to perform a bulk data download. This operation can be useful to give patients' access to their entire record or for a provider or other user to perform a bulk data download related to a patient. According to the FHIR specification, Patient-everything returns all the information related to one or more patients described in the resource or context on which this operation is invoked. In the Azure API for FHIR, Patient-everything is available to pull data related to a specific patient.
15+
The [Patient-everything](https://www.hl7.org/fhir/patient-operation-everything.html) operation is used to provide a view of all resources related to a patient. This operation can be useful to give patients' access to their entire record or for a provider or other user to perform a bulk data download related to a patient. According to the FHIR specification, Patient-everything returns all the information related to one or more patients described in the resource or context on which this operation is invoked. In the Azure API for FHIR, Patient-everything is available to pull data related to a specific patient.
1616

1717
## Use Patient-everything
1818
To call Patient-everything, use the following command:
@@ -26,8 +26,10 @@ The Azure API for FHIR validates that it can find the patient matching the provi
2626
* Resources that are directly referenced by the patient resource, except [link](https://www.hl7.org/fhir/patient-definitions.html#Patient.link) references that are not of [seealso](https://www.hl7.org/fhir/codesystem-link-type.html#content) or if the `seealso` link references a `RelatedPerson`.
2727
* If there are `seealso` link reference(s) to other patient(s), the results will include Patient-everything operation against the `seealso` patient(s) listed.
2828
* Resources in the [Patient Compartment](https://www.hl7.org/fhir/compartmentdefinition-patient.html)
29-
* [Device resources](https://www.hl7.org/fhir/device.html) that reference the patient resource. This resource is limited to 100 devices. If the patient has more than 100 devices linked to them, only 100 will be returned.
29+
* [Device resources](https://www.hl7.org/fhir/device.html) that reference the patient resource.
3030

31+
> [!Note]
32+
> If the patient has more than 100 devices linked to them, only 100 will be returned.
3133
3234
## Patient-everything parameters
3335
The Azure API for FHIR supports the following query parameters. All of these parameters are optional:
@@ -54,7 +56,7 @@ The FHIR specification has a detailed overview of the different types of [patien
5456
* [seealso](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-seealso) - Patient contains a link to another patient that's equally valid.
5557
* [replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by) - The Patient resource replaces a different Patient.
5658

57-
### Patient-everything patient links details:
59+
### Patient-everything patient links details
5860

5961
The Patient-everything operation in Azure API for FHIR processes patient links in different ways to give you the most holistic view of the patient.
6062

@@ -66,9 +68,9 @@ Right now, [replaces](https://www.hl7.org/fhir/codesystem-link-type.html#link-ty
6668
As described above, [seealso](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-seealso) links reference another patient that's considered equally valid to the original. After the Patient-everything operation is run, if the patient has `seealso` links to other patients, the operation runs Patient-everything on each `seealso` link. This means if a patient links to five other patients with a type `seealso` link, we'll run Patient-everything on each of those five patients.
6769

6870
> [!Note]
69-
> This is set up to only follow `seealso` links one **layer deep**. It doesn't process a `seealso` link's `seealso` links.
71+
> This is set up to only follow `seealso` links one layer deep. It doesn't process a `seealso` link's `seealso` links.
7072
71-
[ ![See also flow diagram.](media/patient-everything/see-also-flow.png) ](media/patient-everything/see-also-flow.png#lightbox)
73+
[![See also flow diagram.](media/patient-everything/see-also-flow.png)](media/patient-everything/see-also-flow.png#lightbox)
7274

7375
The final link type is [replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by). In this case, the original patient resource is no longer being used and the `replaced-by` link points to the patient that should be used. This implementation of `Patient-everything` will include by default an operation outcome at the start of the bundle with a warning that the patient is no longer valid. This will also be the behavior when the `Prefer` header is set to `handling=lenient`.
7476

@@ -77,6 +79,17 @@ In addition, you can set the `Prefer` header to `handling=strict` to throw an er
7779
> [!Note]
7880
> If a `replaced-by` link is present, `Prefer: handling=lenient` and results are returned asynchronously in multiple bundles, only an operation outcome is returned in one bundle.
7981
82+
## Patient-everything response order
83+
84+
This implementation of Patient-everything does not support the _count parameter. Patient-everything returns the results by executing several phases. After each phase, the results from the next phase will start on a new page by following the next link in the bundle. The phases are outlined below:
85+
86+
1. Phase 1 returns the `Patient` resource and any `generalPractitioner` and `managingOrganization` resources linked to the patient.
87+
1. Phase 2 will return resources from the patient compartment that can be filtered by their clinical date if start or end are specified. If no start or end date is passed in, this phase is skipped.
88+
1. Phase 3 will return resources from the patient compartment that cannot be filtered by their clinical data **or** will return all patient-compartment resources if no start or end date was specified.
89+
1. Phase 4 will return any devices that reference the patient.
90+
91+
If the original patient has any `seealso` links, phases 1 through 4 will be repeated for each of those patients.
92+
8093
## Examples of Patient-everything
8194

8295
Below are some examples of using the Patient-everything operation. In addition to the examples below, we have a [sample REST file](https://github.com/microsoft/fhir-server/blob/main/docs/rest/PatientEverythingLinks.http) that illustrates how the `seealso` and `replaced-by` behavior works.

articles/healthcare-apis/fhir/patient-everything.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ The FHIR service validates that it can find the patient matching the provided pa
2929
* Resources that are directly referenced by the patient resource, except [link](https://www.hl7.org/fhir/patient-definitions.html#Patient.link) references that are not of [seealso](https://www.hl7.org/fhir/codesystem-link-type.html#content) or if the `seealso` link references a `RelatedPerson`.
3030
* If there are `seealso` link reference(s) to other patient(s), the results will include Patient-everything operation against the `seealso` patient(s) listed.
3131
* Resources in the [Patient Compartment](https://www.hl7.org/fhir/compartmentdefinition-patient.html)
32-
* [Device resources](https://www.hl7.org/fhir/device.html) that reference the patient resource. This resource is limited to 100 devices. If the patient has more than 100 devices linked to them, only 100 will be returned.
32+
* [Device resources](https://www.hl7.org/fhir/device.html) that reference the patient resource.
33+
34+
> [!Note]
35+
> If the patient has more than 100 devices linked to them, only 100 will be returned.
3336
3437

3538
## Patient-everything parameters
@@ -56,7 +59,7 @@ The FHIR specification has a detailed overview of the different types of [patien
5659
* [seealso](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-seealso) - Patient contains a link to another patient that's equally valid.
5760
* [replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by) - The Patient resource replaces a different Patient.
5861

59-
### Patient-everything patient links details:
62+
### Patient-everything patient links details
6063

6164
The Patient-everything operation in the FHIR service processes patient links in different ways to give you the most holistic view of the patient.
6265

@@ -70,7 +73,7 @@ As described above, [seealso](https://www.hl7.org/fhir/codesystem-link-type.html
7073
> [!Note]
7174
> This is set up to only follow `seealso` links one **layer deep**. It doesn't process a `seealso` link's `seealso` links.
7275
73-
[ ![See also flow diagram.](media/patient-everything/see-also-flow.png) ](media/patient-everything/see-also-flow.png#lightbox)
76+
[![See also flow diagram.](media/patient-everything/see-also-flow.png)](media/patient-everything/see-also-flow.png#lightbox)
7477

7578
The final link type is [replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by). In this case, the original patient resource is no longer being used and the `replaced-by` link points to the patient that should be used. This implementation of `Patient-everything` will include by default an operation outcome at the start of the bundle with a warning that the patient is no longer valid. This will also be the behavior when the `Prefer` header is set to `handling=lenient`.
7679

@@ -79,6 +82,17 @@ In addition, you can set the `Prefer` header to `handling=strict` to throw an er
7982
> [!Note]
8083
> If a `replaced-by` link is present, `Prefer: handling=lenient` and results are returned asynchronously in multiple bundles, only an operation outcome is returned in one bundle.
8184
85+
## Patient-everything response order
86+
87+
This implementation of Patient-everything does not support the _count parameter. Patient-everything returns the results by executing several phases. After each phase, the results from the next phase will start on a new page by following the next link in the bundle. The phases are outlined below:
88+
89+
1. Phase 1 returns the `Patient` resource and any `generalPractitioner` and `managingOrganization` resources linked to the patient.
90+
1. Phase 2 will return resources from the patient compartment that can be filtered by their clinical date if start or end are specified. If no start or end date is passed in, this phase is skipped.
91+
1. Phase 3 will return resources from the patient compartment that cannot be filtered by their clinical data **or** will return all patient-compartment resources if no start or end date was specified.
92+
1. Phase 4 will return any devices that reference the patient.
93+
94+
If the original patient has any `seealso` links, phases 1 through 4 will be repeated for each of those patients.
95+
8296
## Examples of Patient-everything
8397

8498
Below are some examples of using the Patient-everything operation. In addition to the examples below, we have a [sample REST file](https://github.com/microsoft/fhir-server/blob/main/docs/rest/PatientEverythingLinks.http) that illustrates how the `seealso` and `replaced-by` behavior works.

0 commit comments

Comments
 (0)