<Parameters xmlns="http://hl7.org/fhir">
  <id value="parameters-merge-output-example" />
  <meta>
    <profile value="http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-output" />
  </meta>
  <parameter>
    <name value="input" />
    <resource>
      <Parameters>
        <id value="parameters-merge-input-example" />
        <meta>
          <profile value="http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-input" />
        </meta>
        <parameter>
          <name value="merge-reason" />
          <valueCodeableConcept>
            <coding>
              <system value="https://ehealthontario.ca/fhir/CodeSystem/pcr-merge-reason" />
              <code value="duplicate-record" />
              <display value="Duplicate patient record" />
            </coding>
            <text value="Duplicate record identified through governed reconciliation process." />
          </valueCodeableConcept>
        </parameter>
        <parameter>
          <name value="merge-requester" />
          <valueIdentifier>
            <system value="https://hospital.example.ca/user-id" />
            <value value="USER12345" />
          </valueIdentifier>
        </parameter>
        <parameter>
          <name value="source-patient" />
          <valueReference>
            <reference value="Patient/patient-contribution-source-example" />
          </valueReference>
        </parameter>
        <parameter>
          <name value="source-patient-identifier" />
          <valueIdentifier>
            <type>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
                <code value="MR" />
              </coding>
            </type>
            <system value="https://hospital.example.ca/mrn" />
            <value value="MRN123456" />
          </valueIdentifier>
        </parameter>
        <parameter>
          <name value="target-patient" />
          <valueReference>
            <reference value="Patient/patient-contribution-target-example" />
          </valueReference>
        </parameter>
        <parameter>
          <name value="target-patient-identifier" />
          <valueIdentifier>
            <type>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
                <code value="MR" />
              </coding>
            </type>
            <system value="https://hospital.example.ca/mrn" />
            <value value="MRN999999" />
          </valueIdentifier>
        </parameter>
        <parameter>
          <name value="result-patient" />
          <resource>
            <Patient>
              <id value="patient-contribution-merged-example" />
              <meta>
                <profile value="http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution" />
              </meta>
              <identifier>
                <type>
                  <coding>
                    <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
                    <code value="MR" />
                  </coding>
                </type>
                <system value="https://hospital.example.ca/mrn" />
                <value value="MRN999999" />
              </identifier>
              <identifier>
                <type>
                  <coding>
                    <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
                    <code value="MR" />
                  </coding>
                </type>
                <system value="https://hospital.example.ca/mrn" />
                <value value="MRN123456" />
              </identifier>
              <active value="true" />
              <name>
                <use value="official" />
                <family value="Smith" />
                <given value="Michael">
                  <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier">
                    <valueCode value="MID" />
                  </extension>
                </given>
                <given value="John" />
              </name>
              <gender value="male" />
              <birthDate value="1985-06-15" />
              <address>
                <use value="home" />
                <type value="postal" />
                <line value="100 Main Street" />
                <city value="Toronto" />
                <state value="ON" />
                <postalCode value="M5V2T6" />
                <country value="CAN" />
              </address>
            </Patient>
          </resource>
        </parameter>
      </Parameters>
    </resource>
  </parameter>
  <parameter>
    <name value="result" />
    <resource>
      <Patient>
        <id value="patient-contribution-merged-example" />
        <meta>
          <profile value="http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution" />
        </meta>
        <identifier>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="MR" />
            </coding>
          </type>
          <system value="https://hospital.example.ca/mrn" />
          <value value="MRN999999" />
        </identifier>
        <identifier>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="MR" />
            </coding>
          </type>
          <system value="https://hospital.example.ca/mrn" />
          <value value="MRN123456" />
        </identifier>
        <active value="true" />
        <name>
          <use value="official" />
          <family value="Smith" />
          <given value="Michael">
            <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier">
              <valueCode value="MID" />
            </extension>
          </given>
          <given value="John" />
        </name>
        <gender value="male" />
        <birthDate value="1985-06-15" />
        <address>
          <use value="home" />
          <type value="postal" />
          <line value="100 Main Street" />
          <city value="Toronto" />
          <state value="ON" />
          <postalCode value="M5V2T6" />
          <country value="CAN" />
        </address>
      </Patient>
    </resource>
  </parameter>
  <parameter>
    <name value="outcome" />
    <resource>
      <OperationOutcome>
        <id value="operationoutcome-example-success" />
        <meta>
          <profile value="http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution" />
        </meta>
        <issue>
          <severity value="information" />
          <code value="informational" />
          <details>
            <text value="Patient/patient-contribution-source-example was merged into Patient/patient-contribution-target-example. Patient/patient-contribution-merged-example is the retained patient identity." />
          </details>
        </issue>
      </OperationOutcome>
    </resource>
  </parameter>
</Parameters>