How to get resources pushed into Azure Health Data Services - FHIR service for the Specific time period

P, Pioline (Cognizant) 195 Reputation points
2023-06-28T18:26:06.41+00:00

Hi

I am doing GET operation in Azure Health Data Services - FHIR Service using postman.

My question is: Is it possible to get resources that are pushed within a particular time period (say for the past hour)?

Sample expected request like: GET {{fhirurl}}/Patient/time=16:00-17:00

Thanks

Pioline P

Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
149 questions
0 comments No comments
{count} votes

Accepted answer
  1. navba-MSFT 17,735 Reputation points Microsoft Employee
    2023-06-29T03:29:49.32+00:00

    @P, Pioline (Cognizant) Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that your requirement is to fetch the resources that are pushed within a particular time range.

    Rest API operations and extended operations are defined here.

    _since parameter is defined in Patient-everything operation, this will return only resources that have been modified since the time provided. You can also specify the start and end clinical date. More Info here.

    For search operation, you can rely on the _lastupdated parameter is supported for all resources as defined in https://build.fhir.org/search.html#all. The available common search parameters that apply to all resources in FHIR are listed here. For search parameters that have a specific order (numbers, dates, and quantities), you can use a prefix before the parameter value to refine the search criteria (e.g. Patient?_lastUpdated=gt2022-08-01 where the prefix gt means "greater than").

    The following prefixes are supported for the _lastUpdated field:

    • gt: Greater than
    • lt: Less than
    • ge: Greater than or equal to
    • le: Less than or equal to

    I haven't tested the below API with the query parameters, but definitely worth giving a try. AFAIK, the following request will get all Patient resources that were pushed within the past hour and have a _lastUpdated value that is less than or equal to 16:00 UTC

    GET {{fhirurl}}/Patient?_lastUpdated>2023-06-28T15:00:00Z&_lastUpdated<=2023-06-28T16:00:00Z
    
    

    We also support sorting by the date last updated: _sort=_lastUpdated. We also support _sort on FirstName, LastName, BirthDate, and ClinicalDate elements. More info here

    Example: Depending on the "lastUpdated": "2021-04-22T09:58:16.7823171+00:00" returned in the response, you can send the request for REST API as shown below:

    GET [your-fhir-server]/Patient?_sort=_lastUpdated`  
    

    Hope this helps.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful