<CapabilityStatement xmlns="http://hl7.org/fhir">
  <id value="mi-server-query-dc" />
  <url value="http://ontariohealth.ca/fhir/CapabilityStatement/mi-server-query-dc" />
  <name value="MICapabilityQueryDC" />
  <title value="MI Consumer Query FHIR Capability Statement" />
  <status value="draft" />
  <date value="2026-03-16" />
  <publisher value="Ontario Health" />
  <contact>
    <name value="Ontario Health" />
    <telecom>
      <system value="email" />
      <value value="DigitalHealthStandards@ontariohealth.ca" />
    </telecom>
  </contact>
  <description value="This is the FHIR Capability Statement for data consumers retrieving data from the miCDR repository" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA" />
      <display value="Canada" />
    </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="Ontario MI CDR FHIR R4 API" />
  </software>
  <fhirVersion value="4.0.1" />
  <format value="json" />
  <format value="xml" />
  <rest>
    <mode value="server" />
    <documentation value="Support retrieval of patient's MI records" />
    <resource>
      <type value="DiagnosticReport" />
      <supportedProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-diagnosticreport" />
      <documentation value="Retrieve history of patient's MI reports" />
      <interaction>
        <code value="search-type" />
        <documentation value="Search DiagnosticReport resources using specified parameters. Supports both GET and POST operation" />
      </interaction>
      <referencePolicy value="resolves" />
      <searchInclude value="DiagnosticReport:based-on" />
      <searchInclude value="DiagnosticReport:encounter" />
      <searchInclude value="DiagnosticReport:patient" />
      <searchInclude value="DiagnosticReport:performer" />
      <searchInclude value="DiagnosticReport:result" />
      <searchInclude value="DiagnosticReport:results-interpreter" />
      <searchParam>
        <name value="patient.identifier" />
        <definition value="http://ontariohealth.ca/fhir/SearchParameter/ca-on-medications-patient-identifier" />
        <type value="token" />
        <documentation value="Supports search by Ontario Health Number or Medical Record Number. Patient identifier is a mandatory search parameter." />
      </searchParam>
      <searchParam>
        <name value="issued" />
        <type value="date" />
        <documentation value="When the report was issued" />
      </searchParam>
      <searchParam>
        <name value="code" />
        <type value="token" />
        <documentation value="MI procedure code (local, provincial or SNOMED CT)" />
      </searchParam>
      <searchParam>
        <name value="category" />
        <type value="token" />
        <documentation value="Category code, e.g. modality, specialty, bodypart, etc." />
      </searchParam>
      <searchParam>
        <name value="_mdm" />
        <type value="token" />
        <documentation value="Indicates if a call to PCR has occurred prior to the search operation. Default value is 'true' if not provided. _mdm=true means all patients' record linked to the patient in the search parameters will be returned." />
      </searchParam>
    </resource>
    <resource>
      <type value="ServiceRequest" />
      <supportedProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-servicerequest" />
      <documentation value="Retrieve history of patient's MI orders" />
      <interaction>
        <code value="search-type" />
        <documentation value="Search ServiceRequest resources using specified parameters. Supports both GET and POST operation" />
      </interaction>
      <referencePolicy value="resolves" />
      <searchInclude value="ServiceRequest:based-on" />
      <searchInclude value="ServiceRequest:encounter" />
      <searchInclude value="ServiceRequest:patient" />
      <searchInclude value="ServiceRequest:performer" />
      <searchInclude value="ServiceRequest:replaces" />
      <searchInclude value="ServiceRequest:requester" />
      <searchParam>
        <name value="patient.identifier" />
        <definition value="http://ontariohealth.ca/fhir/SearchParameter/ca-on-medications-patient-identifier" />
        <type value="token" />
        <documentation value="Supports search by Ontario Health Number or Medical Record Number. Patient identifier is a mandatory search parameter." />
      </searchParam>
      <searchParam>
        <name value="authored" />
        <type value="date" />
        <documentation value="Date MI order was signed" />
      </searchParam>
      <searchParam>
        <name value="code" />
        <type value="token" />
        <documentation value="MI procedure code (local, provincial or SNOMED CT)" />
      </searchParam>
      <searchParam>
        <name value="category" />
        <type value="token" />
        <documentation value="Category code, e.g. modality, specialty, bodypart, etc." />
      </searchParam>
      <searchParam>
        <name value="_mdm" />
        <type value="token" />
        <documentation value="Indicates if a call to PCR has occurred prior to the search operation. Default value is 'true' if not provided. _mdm=true means all patients' record linked to the patient in the search parameters will be returned." />
      </searchParam>
    </resource>
    <resource>
      <type value="ImagingStudy" />
      <supportedProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-imagingstudy" />
      <documentation value="Retrieve history of patient's image manifests" />
      <interaction>
        <code value="search-type" />
        <documentation value="Search ImagingStudy resources using specified parameters. Supports both GET and POST operation" />
      </interaction>
      <referencePolicy value="resolves" />
      <searchInclude value="ImagingStudy:basedon" />
      <searchInclude value="ImagingStudy:encounter" />
      <searchInclude value="ImagingStudy:interpreter" />
      <searchInclude value="ImagingStudy:patient" />
      <searchInclude value="ImagingStudy:performer" />
      <searchInclude value="ImagingStudy:referrer" />
      <searchParam>
        <name value="patient.identifier" />
        <definition value="http://ontariohealth.ca/fhir/SearchParameter/ca-on-medications-patient-identifier" />
        <type value="token" />
        <documentation value="Supports search by Ontario Health Number or Medical Record Number. Patient identifier is a mandatory search parameter." />
      </searchParam>
      <searchParam>
        <name value="started" />
        <type value="date" />
        <documentation value="When the study was started" />
      </searchParam>
      <searchParam>
        <name value="category" />
        <type value="token" />
        <documentation value="Category code, e.g. procedure code (local, provincial or SNOMED CT), modality, specialty, bodypart, etc." />
      </searchParam>
      <searchParam>
        <name value="_mdm" />
        <type value="token" />
        <documentation value="Indicates if a call to PCR has occurred prior to the search operation. Default value is 'true' if not provided. _mdm=true means all patients' record linked to the patient in the search parameters will be returned." />
      </searchParam>
    </resource>
    <resource>
      <type value="DocumentReference" />
      <supportedProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mi-profile-documentreference" />
      <documentation value="Retrieve history of patient's document references" />
      <interaction>
        <code value="search-type" />
        <documentation value="Search DocumentReference resources using specified parameters. Supports both GET and POST operation" />
      </interaction>
      <referencePolicy value="resolves" />
      <searchInclude value="DocumentReference:author" />
      <searchInclude value="DocumentReference:encounter" />
      <searchInclude value="DocumentReference:patient" />
      <searchParam>
        <name value="patient.identifier" />
        <definition value="http://ontariohealth.ca/fhir/SearchParameter/ca-on-medications-patient-identifier" />
        <type value="token" />
        <documentation value="Supports search by Ontario Health Number or Medical Record Number. Patient identifier is a mandatory search parameter." />
      </searchParam>
      <searchParam>
        <name value="date" />
        <type value="date" />
        <documentation value="When this document reference was created" />
      </searchParam>
      <searchParam>
        <name value="type" />
        <type value="token" />
        <documentation value="Kind of document (local or LOINC)" />
      </searchParam>
      <searchParam>
        <name value="category" />
        <type value="token" />
        <documentation value="Category code, e.g. procedure code (local, provincial or SNOMED CT), modality, specialty, bodypart, etc." />
      </searchParam>
      <searchParam>
        <name value="_mdm" />
        <type value="token" />
        <documentation value="Indicates if a call to PCR has occurred prior to the search operation. Default value is 'true' if not provided. _mdm=true means all patients' record linked to the patient in the search parameters will be returned." />
      </searchParam>
    </resource>
  </rest>
</CapabilityStatement>