<?xml version="1.0" encoding="UTF-8"?>

<Parameters xmlns="http://hl7.org/fhir">
  <id value="parameters-fileconsent"/>
  <meta>
    <profile value="http://hl7.org/fhir/us/consent-management/StructureDefinition/FileConsentParameters"/>
  </meta>
  <parameter>
    <name value="consent"/>
    <resource>
      <Consent>
        <id value="ConsentExample"/>
        <meta>
          <profile value="http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsent"/>
          <tag>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason"/>
            <code value="HTEST"/>
            <display value="test health data"/>
          </tag>
        </meta>
        <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee">
          <valueReference>
            <reference value="RelatedPerson/relatedperson-robert-miren"/>
            <identifier>
              <system value="http://example.org/identifiers"/>
              <value value="relatedperson-robert-miren"/>
            </identifier>
          </valueReference>
        </extension>
        <extension url="http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.manager">
          <valueReference>
            <reference value="Organization/organization-fast-consent-ri"/>
            <identifier>
              <system value="http://example.org/identifiers"/>
              <value value="organization-fast-consent-ri"/>
            </identifier>
          </valueReference>
        </extension>
        <identifier>
          <system value="http://example.org/identifiers"/>
          <value value="ec63290f-1f93-4ed3-b531-0d86e2791165"/>
        </identifier>
        <status value="active"/>
        <scope>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/consentscope"/>
            <code value="patient-privacy"/>
          </coding>
        </scope>
        <category>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
            <code value="INFA"/>
          </coding>
        </category>
        <patient>
          <reference value="Patient/patient-lara-miren"/>
          <identifier>
            <system value="http://example.org/identifiers"/>
            <value value="patient-lara-miren"/>
          </identifier>
        </patient>
        <dateTime value="2025-08-08T16:47:10-04:00"/>
        <performer>
          <reference value="Patient/patient-lara-miren"/>
          <identifier>
            <system value="http://example.org/identifiers"/>
            <value value="patient-lara-miren"/>
          </identifier>
        </performer>
        <sourceReference>
          <reference value="DocumentReference/docref-fileconsent"/>
          <identifier>
            <system value="http://example.org/identifiers"/>
            <value value="docref-fileconsent"/>
          </identifier>
        </sourceReference>
        <policyRule>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/consentpolicycodes"/>
            <code value="hipaa-auth"/>
          </coding>
        </policyRule>
        <provision>
          <type value="permit"/>
          <period>
            <start value="2025-08-01T00:00:00-04:00"/>
          </period>
          <actor>
            <role>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType"/>
                <code value="IRCP"/>
              </coding>
            </role>
            <reference>
              <reference value="RelatedPerson/relatedperson-robert-miren"/>
              <identifier>
                <system value="http://example.org/identifiers"/>
                <value value="relatedperson-robert-miren"/>
              </identifier>
            </reference>
          </actor>
        </provision>
      </Consent>
    </resource>
  </parameter>
  <parameter>
    <name value="document"/>
    <resource>
      <DocumentReference>
        <id value="docref-fileconsent"/>
        <meta>
          <profile value="http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTDocumentReference"/>
          <tag>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason"/>
            <code value="HTEST"/>
            <display value="test health data"/>
          </tag>
        </meta>
        <identifier>
          <system value="http://example.org/identifiers"/>
          <value value="docref-fileconsent"/>
        </identifier>
        <status value="current"/>
        <type>
          <coding>
            <system value="http://loinc.org"/>
            <code value="64292-6"/>
          </coding>
        </type>
        <category>
          <coding>
            <system value="http://loinc.org"/>
            <code value="57016-8"/>
          </coding>
        </category>
        <subject>
          <reference value="Patient/patient-lara-miren"/>
          <identifier>
            <system value="http://example.org/identifiers"/>
            <value value="patient-lara-miren"/>
          </identifier>
        </subject>
        <date value="2025-08-01T00:00:00.000-04:00"/>
        <author>
          <reference value="Patient/patient-lara-miren"/>
          <identifier>
            <system value="http://example.org/identifiers"/>
            <value value="patient-lara-miren"/>
          </identifier>
        </author>
        <content>
          <attachment>
            <contentType value="text/plain; charset=utf-8"/>
            <data value="SSwgTGFyYSBNaXJlbiwgcGVybWl0IFJvYmVydCBNaXJlbiBhY2Nlc3MgdG8gbXkgbWVkaWNhbCByZWNvcmRzLg=="/>
          </attachment>
        </content>
      </DocumentReference>
    </resource>
  </parameter>
</Parameters>