<CapabilityStatement xmlns="http://hl7.org/fhir">
  <id value="OLIS-ConsumerQuery-server" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>Ontario Health OLIS Consumer Query FHIR R4 Capability Statement</p>
    </div>
  </text>
  <url value="https://ehealthontario.ca/fhir/ca-on-lab-CapabilityStatement" />
  <version value="2.0.0" />
  <name value="Ontario Laboratories Information System FHIR R4 Consumer Query Capability Statement" />
  <title value="Ontario Laboratories Information System FHIR R4 Consumer Query Capability Statement" />
  <status value="active" />
  <experimental value="false" />
  <date value="2021-12-05" />
  <publisher value="Ontario Health" />
  <contact>
    <name value="Ontario Health" />
    <telecom>
      <system value="email" />
      <value value="digitalhealthstandards@ehealthontario.on.ca" />
    </telecom>
  </contact>
  <description value="This is the FHIR R4 capability statement for Ontario Laboratories Information System (OLIS) server-Consumer" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA-ON" />
      <display value="Canada Ontario" />
    </coding>
  </jurisdiction>
  <purpose value="Main EHR capability statement, published for contracting and operational support" />
  <copyright value="Copyright © Ontario Health" />
  <kind value="capability" />
  <software>
    <name value="OLIS FHIR R4 Consumer Query API" />
  </software>
  <fhirVersion value="4.0.1" />
  <format value="json" />
  <format value="xml" />
  <rest>
    <mode value="server" />
    <documentation value="Support retrieval of patient's laboratory records, or retrieve all lab results for certain category" />
    <security>
      <cors value="true" />
      <description value="JWT. Please refer to Ontario JWT Guide." />
    </security>
    <resource>
      <type value="DiagnosticReport" />
      <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-profile-DiagnosticReport" />
      <documentation value="Retrieve history of patient's lab results or all covid results for public health units" />
      <interaction>
        <code value="search-type" />
        <documentation value="Search DiagnosticReport resources using specified parameters. Supports both GET and POST operation" />
      </interaction>
      <searchParam>
        <name value="patient.identifier" />
        <definition value="http://ehealthontario.ca/fhir/SearchParameter/ca-on-lab-patient-identifier" />
        <type value="token" />
        <documentation value="Only supports search by Ontario Health Card Number- mandatory for OLIS patient query, not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="patient.birthDate" />
        <definition value="http://ehealthontario.ca/fhir/SearchParameter/ca-on-lab-patient-birthDate" />
        <type value="date" />
        <documentation value="Patient date of birth - mandatory for OLIS patient query, not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="issued" />
        <definition value="http://ehealthontario.ca/fhir/SearchParameter/ca-on-lab-issued-date" />
        <type value="date" />
        <documentation value="Start date of the search criteria, the date can either be the date  that OLIS recieves the report (issued), or the date that the test was performed (specimen.collected). Mandatory for bulk query" />
      </searchParam>
      <searchParam>
        <name value="specimen.collected" />
        <definition value="http://hl7.org/fhir/SearchParameter/Specimen-collected" />
        <type value="date" />
        <documentation value="Start date of the search criteria, the date can either be the date  that OLIS recieves the report (issued), or the date that the test was performed (specimen.collected). Not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="result.based-on:ServiceRequest.code" />
        <definition value="http://hl7.org/fhir/SearchParameter/ServiceRequest-code" />
        <type value="token" />
        <documentation value="Test request status code- optional. Not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="result.interpretation" />
        <definition value="http://ehealthontario.ca/fhir/SearchParameter/Observation-interpretation" />
        <type value="token" />
        <documentation value="Abnormal results- optional. Not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="identifier" />
        <type value="token" />
        <documentation value="Diagnostic report identifier- optional. Not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="result.code" />
        <definition value="http://ehealthontario.ca/fhir/SearchParameter/result-code" />
        <type value="token" />
        <documentation value="Test result code- optional. Not supported for bulk query" />
      </searchParam>
      <searchParam>
        <name value="patient.gender" />
        <definition value="http://hl7.org/fhir/SearchParameter/Patient-gender" />
        <type value="token" />
        <documentation value="Patient gender- optional for OLIS patient query, not supported for bulk query" />
      </searchParam>
    </resource>
  </rest>
</CapabilityStatement>