Home > Profiles and Operations > DiagnosticReport Search - Patient Query
DiagnosticReport Search - Patient Query
DiagnosticReport search is simple RESTful interactions. It supports retrieving a lab results from OLIS for a health care practitioner by patient ID.
Scope
This transaction involves a request by the following parameters:
The mandatory parameters for the query:
- Patient Identifier(s)
- Date of Birth
- Report issued Start Date
- DiagnosticReport Type
The optional parameters for the query:
- Patient Gender
- Diagnostic Report Identifier
- Test Request Code
- Observation Code
- Observation Status
- Interpretation (filter by abnormal results)
- Report Issued End Date (this should default to either Observation Date or Last Updated Time in OLIS that the provider has chosen for the Start Date)
The usage of these parameters are as follows:
Parameter | FHIR Query Parameter | Optionality | Type | Description | Usage Note | Example |
---|---|---|---|---|---|---|
Patient Identifer(s) | patient.identifier | mandatory | token | This parameter specifies an identifier associated with the patient who is the subject of this lab report. | This can be an HCN or MRN and SHALL include both system and value. | [base]/DiangosticReport?patient.identifier=[system]|[value] |
Date of Birth | patient.birthdate | mandatory | date | This parameter specifies the birth date of patient who is the subject of this lab report. | SHALL specify a FHIR date value | [base]/DiangosticReport?patient.birthdate=1950-01-01 |
Report issued start Date | issued | mandatory | date | This parameter specifies the report issued date. | SHALL specify a date value, and MAY contain a date specific prefix such as ge | [base]/DiangosticReport?issued=[ge]2023-01-01 |
DiagnosticReport Type | code | mandatory | token | This parameter specifies the LOINC code indicating a query to only lab reports. | SHALL contain a fixed LOINC code "11502-2" for "Laboratory Report" | [base]/DiangosticReport?code=http://loinc.org|11502-2 |
Patient Gender | patient.gender | optional | token | This parameter specifies the gender of the patient associated with the lab report. | [base]/DiangosticReport?patient.gender=male |
|
Diagostic Report Identifier | identifier | optional | token | This parameter specifies an identifier for the report. | System and value SHALL be provided. | [base]/DiangosticReport?identifier=[system]|[value] |
Test Request Code | based-on:ServiceRequest.code | optional | token | This parameter specifies the test request code associated with the lab report. | system and value SHALL be provided. | |
Observation Code | result.code | optional | token | This parameter specifies the lab result code associated with the lab report. | system and value SHALL be provided. When used with other observation search parameters, SHALL use one of the composite search parameters defined below | [base]/DiangosticReport?result.code=[system]|[value] |
Observation Status | result.status | optional | token | This parameter specifies the lab result code associated with the lab report. | system and value SHALL be provided. When used with other observation search parameters, SHALL use one of the composite search parameters defined below | [base]/DiangosticReport?result.status=[system]|[value] |
Interpretation | result.interpretation | optional | token | This parameter supports filtering of lab reports by abnormal results. | The allowed values are "AB" and "CR". See Supported Search Parameter section for how to use these values. When used with other observation search parameters, SHALL use one of the composite search parameters defined below | [base]/DiangosticReport?result.interpretation=AB |
Note: As per FHIR chained search parameter methodloogy, a composite search parameter SHALL be used when multiple observation search parameters are used together. These parameters will be supported in future OLIS releases.
Name | Type | Description | Usage Note | Example |
---|---|---|---|---|
code-status | composite | code and status composite pair | SHALL be used when search includes observation code and status. The value of the parameter MUST be concatenated with "$" | [base]/DiangosticReport?result.code-status=http://loinc.org|12345$final |
code-interpretation | composite | code and interpretation composite pair | SHALL be used when search includes observation code and interpretation ("AB" or "CR"). The value of the parameter MUST be concatenated with "$" | [base]/DiangosticReport?result.code-interpretation=http://loinc.org|12345$AB |
status-interpretation | composite | status and interpretation composite pair | SHALL be used when search includes observation status and interpretation ("AB" or "CR"). The value of the parameter MUST be concatenated with "$" | [base]/DiangosticReport?result.status-interpretation=final$AB |
code-status-interpretation | composite | code, status and interpretation used together | SHALL be used when search includes observation code, status and interpretation ("AB" or "CR"). The value of the parameter MUST be concatenated with "$" | [base]/DiangosticReport?result.code-status-interpretation=http://loinc.org|12345$final$AB |
Specification
The OLIS FHIR Patient Query For Providers is based on the FHIR R4 Search interaction.
Diagnostic Report Search Request
The Diagnostic Report Search Request is an HTTP GET operation with multiple query parameters specified in Supported Search Parameters section below. The syntax of the request is
GET [base]/DiagnosticReport?patient.identifier=[system]|[value]&&patient.birthdate=[date]&issued=[le|ge][date]&code=http://loinc.org|11502-2
Note: For the more details please reference to Supported Search Parameters and Diagnostic Report Search Examples sections
Diagnostic Report Search Response
The relationship between the resources used in DiagnosticReport Search response is below:
Extensions
Supported Search Parameters
GET DiagnosticReport (query by Patient ID)
Patient identifier parameter: patient.identifier
The patient identifier can be an Ontario health card number, or a medical record number (MRN).
Example of Ontario HCN:
patient.identifier=[id-system-global-base]/ca-on-patient-hcn|12345678
Example of MRN:
patient.identifier= http://ehealthontario.ca/fhir/NamingSystem/lab/patient-id-lab-license-4004|1234
Note that MRN system URI is a local identifier that contains the ID of the assigning authority (e.g. lab, hospital, specimen collection centre). For the list of possible MRN system values, please refer to Identifiers page. The patient identifiers are listed in the "Local Identifiers" table marked by "OLIS Patient Identifier generated by xxx".
Patient Gender parameter: patient.gender
- Example:
patient.gender=male
Patient Date of Birth parameter: patient.birthdate
- Example:
patient.birthdate=1929-11-29
Dates parameter: issued
Example 1 (report issue start date) :
issued=ge2016-01-02
Example 2 (report issue start date and end date):
issued=ge2015-02-25&issued=le2016-02-27
Dates parameter: specimen.collected
- Example :
specimen.collected =ge2016-01-02
Test Request code: result.based-on:ServiceRequest.code
- Example:
result.based-on:ServiceRequest.code= [code-system-local-base] /lab/test-request-codes|TR11663-2
Interpretation parameter:result.interpretation
- Example 1:
result.intepretation=AB
- Example 2:
result.intepretation=CR
Note: This parameter allows the requestor to further restrict the search criteria to retrieve all abnormal results (AB) or critically abnormal only (CR). The meaning of these values are as follows:
- If the abnormal result flag parameter contained “AB”, the query result set is further restricted to orders containing test requests having a test result with an abnormal flag containing (L, H, A, LL, HH, AA) field.
- If the abnormal result flag parameter contained “CR”, the query result set is further restricted to orders containing test requests having a test result with an abnormal flag containing (LL, HH, AA) field.
Observation status: result.status
- Example:
result.status=final
Note: This parameter maps to OLIS result status as below. Since OLIS does not support "registered" and "unknown", query with these values will return 110 error.
- "final" maps to OLIS status value "F" and "Z"
- "preliminary" maps to "P"
- "cancelled" maps to "X" and "N"
- "entered-in-error" maps to "W"
Observation code: result.code
- Example:
result.code= http://loinc.org|2028-9
Diagnostic report identifier: 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
- Example:
format=[mime-type]:_format=application/fhir+json or _format=application/fhir+xml
Example
Diagnostic Report Search Example
GET [base]/DiagnosticReport?patient.identifier=[id-system-global-base]/ca-on-patient-hcn|1008624486&patient.gender=male&patient.birthdate=1929-11-29&issued=ge2016-01-02&code=http://loinc.org|11502-2&_count=10
In the returned header:
[base]/DiagnosticReport?patient.identifier=[id-system-global-base]/ca-on-patient-hcn|1008624486&patient.gender=male&patient.birthdate=1929-11-29&issued=ge2016-01-02&code=http://loinc.org|11502-2&_count=10&search-id=017-11-16T20:37:03.0000000X128987
Examples of a search response can be found below
Resource | Example |
---|---|
Search result containing a simple chemistry report | XML / JSON |
Search result containing a panel test report | XML / JSON |
Search result containing a microbiology report with 2 organisms and 2 sensitivity panels | XML / JSON |
DiagnosticReport with Contained Resources | XML / JSON |
ServiceRequest | XML / JSON |
Observation | XML / JSON |
Specimen | XML / JSON |
Patient | XML / JSON |
Practitioner | XML / JSON |
Organization | XML / JSON |
OperationOutcome | XML / JSON |
OperationOutcome when request has invalid fhirVersion | XML / JSON |