Skip to content

Commit

Permalink
mock up of last updated guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
healthedata1 committed Mar 20, 2024
1 parent 97fb83c commit 5b35e8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
{% include StructureDefinition-us-core-vital-signs-notes.md code2="85354-9" code3="96607-7" %}

<div class="bg-success" markdown="1">

1. **SHOULD** support searching using **[`patient`](SearchParameter-us-core-observation-patient.html)** and **[`code`](SearchParameter-us-core-observation-code.html)** and **[`_lastUpdated`](SearchParameter-us-core-observation-date.html)** search parameters:
- including optional support for *OR* search on `code` (e.g.`code={system|}[code],{system|}[code],...`)
- including support for these `date` comparators: `gt,lt,ge,le`
- including optional support for *AND* search on `date` (e.g.`date=[date]&date=[date]]&...`)

`GET [base]/Observation?patient={Type/}[id]&code={system|}[code]{,{system|}[code],...}&_lastUpdated={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}`

Example:

1. GET [base]/Observation?patient=1186747&amp;code={{code1}},{{code2}},{{code3}}&amp;_lastUpdated=ge2024-03-19

*Implementation Notes:* Fetches a bundle of all Observation resources for the specified patient and code(s) based on ***the last time they were changed***. **SHOULD** support search by multiple codes. ([how to search by reference] and [how to search by token] and [how to search by date]. ***See the [General Guidance](guidance.html#searching-using-lastupdated) section for additional guidance on searching using `_lastUpdated`.***)
</div><!-- new-content -->

{% include link-list.md %}
17 changes: 16 additions & 1 deletion input/pagecontent/guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,22 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc imperdiet nunc at
### Searching using lastUpdated

<div class="bg-success" markdown="1">
👉👉👉 Last_update guidance here.... 👈👈👈

Servers that can accurately populate [`Meta.lastUpdated`](#) **SHOULD** support the [`_lastUpdated`](#) search parameter as defined in the core FHIR specifications. If `Meta.lastUpdated` is populated:
- Any change in the resource implies a change in `Meta.lastUpdated`; conversely, an unchanged `Meta.lastUpdated` implies no change in the resource.
- Note to clients that the most recent time does not necessarily reflect changes they can access. A record may change, but the client's view of the resource may not (for example, if the client is not authorized to see the changed data).
- Servers cannot populate `Meta.lastUpdated` if they cannot update it per the rules in the FHIR core specification.
- Supporting `Meta.lastUpdated` in a resource does not imply support for searches using the `_lastUpdated` search parameter.
- Support for searches using the `_lastUpdated` search parameter does not require servers to support `Meta.lastUpdated`; servers can use an alternative method to reliably track changes to an instance.
- Note to servers that updating the timestamp too frequently is better than missing updates.

<div class="stu-note" markdown="1">
Many servers are unable to populate the `Meta.lastUpdated` element accurately. However,
they **SHOULD** expose a method for clients to know if there are new or modified resources since their last polling time and advertise that mechanism in their CapabilityStatement. Work is in progress to:
- Define an alternative search parameter that provides similar functionality. (see FHIR-45012 - Extension for tracking changes in facade contexts).
- Enable Subscriptions for notifications on relevant events as an alternative to search polling.
</div><!-- stu-note -->

</div><!-- new-content -->

### Compartment Based Search
Expand Down

0 comments on commit 5b35e8c

Please sign in to comment.