You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/healthcare-apis/azure-api-for-fhir/patient-everything.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: cavoeg
12
12
13
13
# Patient-everything in FHIR
14
14
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.
16
16
17
17
## Use Patient-everything
18
18
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
26
26
* 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`.
27
27
* If there are `seealso` link reference(s) to other patient(s), the results will include Patient-everything operation against the `seealso` patient(s) listed.
28
28
* 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.
30
30
31
+
> [!Note]
32
+
> If the patient has more than 100 devices linked to them, only 100 will be returned.
31
33
32
34
## Patient-everything parameters
33
35
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
54
56
*[seealso](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-seealso) - Patient contains a link to another patient that's equally valid.
55
57
*[replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by) - The Patient resource replaces a different Patient.
56
58
57
-
### Patient-everything patient links details:
59
+
### Patient-everything patient links details
58
60
59
61
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.
60
62
@@ -66,9 +68,9 @@ Right now, [replaces](https://www.hl7.org/fhir/codesystem-link-type.html#link-ty
66
68
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.
67
69
68
70
> [!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.
70
72
71
-
[](media/patient-everything/see-also-flow.png#lightbox)
73
+
[](media/patient-everything/see-also-flow.png#lightbox)
72
74
73
75
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`.
74
76
@@ -77,6 +79,17 @@ In addition, you can set the `Prefer` header to `handling=strict` to throw an er
77
79
> [!Note]
78
80
> 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.
79
81
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
+
80
93
## Examples of Patient-everything
81
94
82
95
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.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/patient-everything.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,10 @@ The FHIR service validates that it can find the patient matching the provided pa
29
29
* 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`.
30
30
* If there are `seealso` link reference(s) to other patient(s), the results will include Patient-everything operation against the `seealso` patient(s) listed.
31
31
* 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.
33
36
34
37
35
38
## Patient-everything parameters
@@ -56,7 +59,7 @@ The FHIR specification has a detailed overview of the different types of [patien
56
59
*[seealso](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-seealso) - Patient contains a link to another patient that's equally valid.
57
60
*[replaced-by](https://www.hl7.org/fhir/codesystem-link-type.html#link-type-replaced-by) - The Patient resource replaces a different Patient.
58
61
59
-
### Patient-everything patient links details:
62
+
### Patient-everything patient links details
60
63
61
64
The Patient-everything operation in the FHIR service processes patient links in different ways to give you the most holistic view of the patient.
62
65
@@ -70,7 +73,7 @@ As described above, [seealso](https://www.hl7.org/fhir/codesystem-link-type.html
70
73
> [!Note]
71
74
> This is set up to only follow `seealso` links one **layer deep**. It doesn't process a `seealso` link's `seealso` links.
72
75
73
-
[](media/patient-everything/see-also-flow.png#lightbox)
76
+
[](media/patient-everything/see-also-flow.png#lightbox)
74
77
75
78
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`.
76
79
@@ -79,6 +82,17 @@ In addition, you can set the `Prefer` header to `handling=strict` to throw an er
79
82
> [!Note]
80
83
> 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.
81
84
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
+
82
96
## Examples of Patient-everything
83
97
84
98
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