<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * #%L
 * org.hl7.fhir.r5
 * %%
 * Copyright (C) 2014 - 2019 Health Level 7
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

/*
  Copyright (c) 2011+, HL7, Inc.
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without modification, 
  are permitted provided that the following conditions are met:
  
   * Redistributions of source code must retain the above copyright notice, this 
     list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, 
     this list of conditions and the following disclaimer in the documentation 
     and/or other materials provided with the distribution.
   * Neither the name of HL7 nor the names of its contributors may be used to 
     endorse or promote products derived from this software without specific 
     prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
  POSSIBILITY OF SUCH DAMAGE.
  

  Generated on Tue, Jun 16, 2026 19:54+0000 for FHIR v6.0.0-ballot4 

  Note: the schemas &amp; schematrons do not contain all of the rules about what makes resources
  valid. Implementers will still need to be familiar with the content of the specification and with
  any profiles that apply to the resources in order to make a conformant implementation.

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
  <xs:include schemaLocation="fhir-base.xsd"/>
  <xs:element name="AdverseEvent" type="AdverseEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="AdverseEvent">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="AdverseEventStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the adverse event or potential adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actuality" minOccurs="1" maxOccurs="1" type="AdverseEventActuality">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the event actually happened or was a near miss. Note that this is independent of whether anyone was affected or harmed or how severely.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The overall type of event, intended for search and filtering purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific event that occurred or that was averted, such as patient fall, wrong organ removed, or wrong blood transfused.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This subject or group impacted by the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter associated with the start of the AdverseEvent.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the effect of the AdverseEvent occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="effectDateTime" type="dateTime"/>
            <xs:element name="effectPeriod" type="Period"/>
          </xs:choice>
          <xs:element name="detected" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated or actual date the AdverseEvent began, in the opinion of the reporter.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recordedDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the existence of the AdverseEvent was first recorded.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="resultingEffect" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the condition that occurred as a result of the adverse event, such as hives due to the exposure to a substance (for example, a drug or a chemical) or a broken leg as a result of the fall.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The information about where the adverse event occurred.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="seriousness" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Assessment whether this event, or averted event, was of clinical importance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the type of outcome from the adverse event, such as resolved, recovering, ongoing, resolved-with-sequelae, or fatal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="recorder" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information on who recorded the adverse event.  May be the patient or a practitioner.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="participant" type="AdverseEvent.Participant" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what participated in the adverse event and how they were involved.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="study" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The research study that the subject is enrolled in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expectedInResearchStudy" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Considered likely or probable or anticipated in the research study.  Whether the reported event matches any of the outcomes for the patient that are considered by the study as known or likely.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="suspectEntity" type="AdverseEvent.SuspectEntity" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the entity that is suspected to have caused the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contributingFactor" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The contributing factors suspected to have increased the probability or severity of the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preventiveAction" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Preventive actions that contributed to avoiding the adverse event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mitigatingAction" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The ameliorating action taken after the adverse event occurred in order to reduce the extent of harm.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" minOccurs="0" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Relevant past history for the subject. In a clinical care context, an example being a patient had an adverse event following a penicillin administration and the patient had a previously documented penicillin allergy. In a clinical trials context, an example is a bunion or rash that was present prior to the study. Additionally, the supporting item can be a document that is relevant to this instance of the adverse event that is not part of the subject's medical history. For example, a clinical note, staff list, or material safety data sheet (MSDS).  Supporting information is not a contributing factor, preventive action, or mitigating action.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments made about the adverse event by the performer, subject or other participants.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.Participant">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="function" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distinguishes the type of involvement of the actor in the adverse event, such as contributor or informant.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="actor" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates who or what participated in the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.SuspectEntity">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="instance" minOccurs="1" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the actual instance of what caused the adverse event.  May be a substance, medication, medication administration, medication statement or a device.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="causality" type="AdverseEvent.Causality" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information on the possible cause of the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date (and perhaps time) when the suspect entity occurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="occurrenceDateTime" type="dateTime"/>
            <xs:element name="occurrencePeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="AdverseEvent.Causality">
    <xs:annotation>
      <xs:documentation xml:lang="en">An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="assessmentMethod" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method of evaluating the relatedness of the suspected entity to the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="entityRelatedness" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the assessment regarding the relatedness of the suspected entity to the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The author of the information on the possible cause of the event.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdverseEventActualityEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="actual">
        <xs:annotation>
          <xs:documentation xml:lang="en">Adverse Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="potential">
        <xs:annotation>
          <xs:documentation xml:lang="en">Potential Adverse Event</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdverseEventActuality">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AdverseEventActualityEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AdverseEventStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="in-progress">
        <xs:annotation>
          <xs:documentation xml:lang="en">In Progress</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="completed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation xml:lang="en">Unknown</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="AdverseEventStatus">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="AdverseEventStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
