Simplifier logo

Confirmation

Are you sure?
Simplifier.net
SNIPPETS FEEDBACK LOG IN SIGN UP

Query
  • Default
    What is FQL?

    FQL is a query language that allows you to retrieve, filter and project data from any data source containing FHIR Resources. It brings the power of three existing languages together: SQL, JSON and FhirPath. It allows you to create tables and is useful for gaining insight and perform quality control.

  • FQL Query resources
    FQL Playground

    Try Firely Query Language in our playground by using this scope as data source.

  • FQL Documentation
  • FQL Language
    Syntax specification

    To learn more about FQL syntax choose this menu item.

  • YamlGen Generate resources
    YamlGen Playground

    Try YamlGen in our playground by using this scope as data source.

  • YamlGen Language
    YamlGen Syntax specification

    To learn more about YamlGen syntax choose this.

  • FHIRPath Inspect resource
    FHIRPath Playground

    Try out the FHIRPath playground and navigate inside this resource.

  • FHIRPath Documentation
    FHIRPath Documentation

    Find out what FHIRPath is or learn how to write FHIRPath scripts.

API
  • Project FHIR API

     This is the location where you can find your resource using a FHIR client.

  • Simplifier FHIR API

     The global endpoint is where users can search for all resources in Simplifier. Resources have a globally unique guid Id here.

Download
  • Download as XML
  • Download as JSON
  • Copy to clipboard as XML
  • Copy to clipboard as JSON
Organization FHIR Core / Project Core OperationDefinitions - STU3

Last N Observations Query

The lastn query meets the common need for searching for the most recent or last n=number of observations for a subject. For example, retrieving the last 5 temperatures for a patient to view trends or fetching the most recent laboratory results or vitals signs. To ask a server to return the last n=number of observations, the lastn queryuses the normal search parameters defined for the Observation resource. However, rather than their normal use, they are interpreted as inputs - i.e.. instead of requiring that the resources literally contain the search parameters, they are passed to a server algorithm of some kind that uses them to determine the most appropriate matches.

The response from an lastn query is a set of observations:

  • filtered by additional parameters
  • 'GROUP BY' Observation.code
  • sorted from most recent to the oldest
  • limited to the number of requested responses per group specified by the optional max query parameter
  • If no maximum number is given then only the most recent Observation in each group is returned.

The set of returned observations should represent distinct real world observations and not the same observation with changes in status or versions. If there are no matches, the lastn query SHALL return an empty search set with no error, but may include an operation outcome with further advice.

  • type OperationDefinition
  • FHIR STU3
  • status Maturity Level 0
  • version
    none
  Unregistered conflicting canonical

The canonical from this resource does not match any claim in this context and conflicts with a claim from another scope.

http://hl7.org/fhir

Canonical claims are used to verify ownership of your canonical URLs.

 Canonical
  • Overview
  • Table
  • XML
  • JSON
  • Related
  • History
  • Narrative

Documentation:
https://simplifier.net/core-opdefs-stu3/observation-lastn
Last updated on 2017-07-18 09:47

About

About Simplifier
About Firely
Learn more
Contact

Information

Documentation
Terms
Privacy
Vulnerability disclosure policy
Features
Pricing
Status

Follow us

Github
Twitter
Youtube

Links

FHIR DevDays
FHIR specification R5
FHIR specification R4B
FHIR specification R4
FHIR specification STU3
FHIR specification DSTU 2
FHIR Server

SIMPLIFIER.NET version 2025.2.1.1

Copyright © 2015-2025 Firely

HL7® and FHIR® are the registered trademarks of Health Level Seven International