

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 取得患者資料 `Patient/$everything`
<a name="reference-fhir-operations-everything"></a>

 `Patient/$everything` 操作用於查詢 FHIR `Patient` 資源，以及與該 相關的任何其他資源`Patient`。此操作可用來讓病患存取其整個記錄，或讓提供者執行與病患相關的大量資料下載。HealthLake `Patient/$everything` 支援特定病患 `id`。

`Patient/$everything` 是一種 FHIR REST API 操作，可以叫用，如以下範例所示。

------
#### [ GET request ]

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything
```

------

**注意**  
回應中的資源會依資源類型和資源 排序`id`。  
回應一律會填入 `Bundle.total`。

## `Patient/$everything` 參數
<a name="patient-everything-query-params"></a>

HealthLake 支援下列查詢參數


| 參數 | 詳細資訊 | 
| --- | --- | 
| 入門 | 取得指定開始日期之後的所有`Patient`資料。 | 
| end | 在指定的結束日期之前取得`Patient`所有資料。 | 
| since | 在指定日期之後更新`Patient`所有資料。 | 
| \_type | 取得特定資源類型的`Patient`資料。 | 
| \_count | 取得`Patient`資料並指定頁面大小。 | 

**Example - 取得指定開始日期之後的所有患者資料**  
`Patient/$everything` 可以使用`start`篩選條件僅查詢特定日期之後的資料。  

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything?start=2024-03-15T00:00:00.000Z
```

**Example - 在指定的結束日期之前取得`Patient`所有資料**  
病患 $所有項目都可以使用`end`篩選條件，只在特定日期之前查詢資料。  

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything?end=2024-03-15T00:00:00.000Z
```

**Example - 在指定日期之後更新`Patient`所有資料**  
`Patient/$everything` 可以使用`since`篩選條件，僅查詢特定日期之後更新的資料。  

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything?since=2024-03-15T00:00:00.000Z
```

**Example - 取得特定資源類型的`Patient`資料**  
病患 $所有項目都可以使用`_type`篩選條件來指定要包含在回應中的特定資源類型。您可以在逗號分隔清單中指定多種資源類型。  

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything?_type=Observation,Condition
```

**Example - 取得`Patient`資料並指定頁面大小**  
病患 $所有項目都可以使用 `_count`來設定頁面大小。  

```
GET https://healthlake.{{region}}.amazonaws.com/datastore/{{datastoreId}}/r4/Patient/{{id}}/$everything?_count=15
```

## `Patient/$everything`  `start` 和 `end` 屬性
<a name="reference-patient-everything-start-end-attributes"></a>

HealthLake 支援 `Patient/ $everything``start`和 `end`查詢參數的下列資源屬性。


| 資源 | 資源元素 | 
| --- | --- | 
| 帳戶 | Account.servicePeriod.start | 
| AdverseEvent | AdverseEvent.date | 
| AllergyIntolerance | AllergyIntolerance.recordedDate | 
| 約定 | Appointment.start | 
| AppointmentResponse | AppointmentResponse.start | 
| AuditEvent | AuditEvent.period.start | 
| 基本 | Basic.created | 
| BodyStructure | NO\_DATE | 
| CarePlan | CarePlan.period.start | 
| CareTeam | CareTeam.period.start | 
| ChargeItem | ChargeItem.occurrenceDateTime, ChargeItem.occurrencePeriod.start, ChargeItem.occurrenceTiming.event | 
| 取得 | Claim.billablePeriod.start | 
| ClaimResponse | ClaimResponse.created | 
| ClinicalImpression | ClinicalImpression.date | 
| Communication | Communication.sent | 
| CommunicationRequest | CommunicationRequest.occurrenceDateTime,CommCommunicationRequest.occurrencePeriod.start | 
| 合成 | Composition.date | 
| 條件 | Condition.recordedDate | 
| 同意 | consent.dateTime | 
| 涵蓋範圍 | Coverage.period.start | 
| CoverageEligibilityRequest | CoverageEligibilityRequest.created | 
| CoverageEligibilityResponse | CoverageEligibilityResponse.created | 
| DetectedIssue | DetectedIssue.identified | 
| DeviceRequest | DeviceRequest.authoredOn | 
| DeviceUseStatement | DeviceUseStatement.recordedOn | 
| DiagnosticReport | DiagnosticReport.effective | 
| DocumentManifest | DocumentManifest.created | 
| DocumentReference | DocumentReference.context.period.start | 
| 遇到 | Encounter.period.start | 
| EnrollmentRequest | EnrollmentRequest.created | 
| EpisodeOfCare | EpisodeOfCare.period.start | 
| ExplanationOfBenefit | ExplanationOfBenefit.billablePeriod.start | 
| FamilyMemberHistory | NO\_DATE | 
| 旗標 | Flag.period.start | 
| 目標 | Goal.statusDate | 
| Group | NO\_DATE | 
| ImagingStudy | ImagingStudy.started | 
| 預防 | Immunization.recorded | 
| ImmunizationEvaluation | ImmunizationEvaluation.date | 
| ImmunizationRecommendation | ImmunizationRecommendation.date | 
| 發票 | Invoice.date | 
| 清單 | List.date | 
| MeasureReport | MeasureReport.period.start | 
| 媒體 | 媒體。發行 | 
| MedicationAdministration | MedicationAdministration.effective | 
| MedicationDispense | MedicationDispense.whenPrepared | 
| MedicationRequest | MedicationRequest.authoredOn | 
| MedicationStatement | MedicationStatement.dateAsserted | 
| MolecularSequence | NO\_DATE | 
| NutritionOrder | NutritionOrder.dateTime | 
| 觀察 | Observation.effective | 
| 病患 | NO\_DATE | 
| 個人 | NO\_DATE | 
| 程序 | Procedure.performed | 
| 證明 | Provenance.occurredPeriod.start,Provenance.occurredDateTime | 
| QuestionnaireResponse | QuestionnaireResponse.authored | 
| RelatedPerson | NO\_DATE | 
| RequestGroup | RequestGroup.authoredOn | 
| ResearchSubject | ResearchSubject.period | 
| RiskAssessment | RiskAssessment.occurrenceDateTime,RiskAssessment.occurrencePeriod.start | 
| Schedule | Schedule.planningHorizon | 
| ServiceRequest | ServiceRequest.authoredOn | 
| 樣本 | 配置函式.receivedTime | 
| SupplyDelivery | SupplyDelivery.occurrenceDateTime, SupplyDelivery.occurrencePeriod.start, SupplyDelivery.occurrenceTiming.event | 
| SupplyRequest | SupplyRequest.authoredOn | 
| VisionPrescription | VisionPrescription.dateWritten | 