OLIS - FHIR Search DiagnosticReport

The OLIS Consumer Lab Reports Query provides backend interface to the consumer applications and portals to allow a consumer to view their lab report data in OLIS. The query also allows authorized delegated user(s) to access the lab reports on behalf of the consumer.

This transaction involves a request by a Consumer facing OLIS application for patient’s laboratory reports by providing demographic information with the query. (E.g. query using Health Card Number with gender and birth date).

Message Type







GET [base]/DiagnosticReport/{?[parameters]{&_format=[mime-type]}}


The search interaction take a series of parameters that are a series of name=value pairs encoded in the URL.

If the search fails (cannot be executed, not that there is no matches), the return value is a status code 4xx or 5xx with an OperationOutcome. If the search succeeds, the return content is a Bundle resource with type = searchset containing the results of the search as a list of DiagnosticReport FHIR resources in a defined order.


The transactions will:

  • Allow a client application to search the OLIS repository DiagnosticReport records matching the search criteria


Consumer Query (Search DiagnosticReport)

lite services [base/type] = consumer/v1/DiagnosticReport


HTTP Header Requirements

In addition to the eHealth required FHIR Headers described in the Submitting FHIR Messages Overview section, the following will also have to be included:

  • jwt_token: encoded Jason Web Token (https://jwt.io/) with the following OLIS mandatory information:
    • User Id: This parameter should contain the user id/system id or login id unique to each user in the consuming system
    • User Full Name: This parameter should contain the consuming user's full name captured by the Consuming Application
    • Access Request Type: This parameter should contain the type of user submitting the query. 'P' identifies the Patient and 'D' identifies a delegated user authorized by the patient


In addition, expected FHIR format can be specified using the ‘accept’ header value as specified below














GET DiagnosticReport (query by Patient ID)

  • Patient ID parameter: patient.identifier
    • Only Ontario health card number is allowed as an ID parameter in the current release.
    • Example: patient.identifier= [id-system-global-base]/ca-on-patient-hcn|12345678.
  • Patient Gender parameter: patient.gender
    • Example: patient.gender=male
  • Patient Date of Birth parameter: birthdate
    • Example: patient.birthdate=1929-11-29
  • Dates parameter: issued
    • Example 1 : issued=ge2016-01-02
    • Example 2: issued=ge2015-02-25&issued=le2016-02-27
  • Dates parameter: specimen.collected
    • Example : specimen.collected =ge2016-01-02
  • Test Request code: based-on:ProcedureRequest.code
    • Example: result.based-on:ProcedureRequest.code= [code-system-local-base] /lab/test-request-codes|TR11663-2
  • Interpretation parameter:result. interpretation
    • Example: result.interpretation=AB
  • Observation status: result.status
    • Example: result.status=final
  • Observation code: result.code
    • Example: result.code= http://loinc.org|2028-9
  • Diagnostic report: identifier
    • Example: identifier= [id-system-local-base] /lab/report-id-lab-license-4004|543321
  • Size limit (for response paging): _count
    • Example: _count=10
    • If there is no _count in the search request, the server will return all matching records in one response.
  • Server will generate and return an additional parameter search-id as per Server Conformance section above.
    • Example: search-id= 017-11-16T20:37:03.0000000X128987
  • Format: JSON (default) or XML
    • format=[mime-type]:_format=application/ FHIR +json or _format=application/ FHIR + xml


Following table lists all the search parameters and their cardinality:

Consumer Query Search Parameters

M = Mandatory

O = Optional

MX = One of either issued or specimen.collected must be submitted. Each of the parameters support the submission of an open-ended time frame (start time only) or a closed timeframe (start and end).

Y1 = Up to 100 codes may be submitted.     Y2 = Up to 200 codes may be submitted.

*OLIS interprets multiple values submitted in a single parameter to be logically OR’d.

*Complex parameters are identified in the second row of the table. Refer to the previous pages for detailed definition of complex parameters.



Returns a FHIR SearchSet Bundle with a list of DiagnosticReport resources, also “containing” the following resources:

Consumer Query SearchSet Bundle Response

Sample Message