<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PatientConsent" />
  <url value="http://hl7.org/fhir/us/bser/StructureDefinition/PatientConsent" />
  <name value="BSeR Patient Consent" />
  <status value="draft" />
  <publisher value="Hi3 Solutions" />
  <contact>
    <name value="AbdulMalik Shakir" />
    <telecom>
      <system value="phone" />
      <value value="6266444491" />
      <use value="work" />
    </telecom>
    <telecom>
      <system value="email" />
      <value value="abdulmalik.shakir@hi3solutions.com" />
      <use value="work" />
    </telecom>
  </contact>
  <kind value="resource" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="Consent" />
  <type value="Consent" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" />
  <derivation value="constraint" />
  <differential>
    <element id="Consent">
      <path value="Consent" />
    </element>
    <element id="Consent.id">
      <path value="Consent.id" />
      <short value="id" />
      <definition value="MAY contain zero or one [0..1] id (CONF:4383-774)." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.meta">
      <path value="Consent.meta" />
      <short value="meta" />
      <definition value="MAY contain zero or one [0..1] meta (CONF:4383-773)." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Consent.meta.profile">
      <path value="Consent.meta.profile" />
      <short value="profile" />
      <definition value="The meta, if present, SHALL contain exactly one [1..1] profile=&quot;http://hl7.org/fhir/us/bser/StructureDefinition/PatientConsent&quot; (CONF:4383-775)." />
      <min value="1" />
      <max value="1" />
      <patternString value="http://hl7.org/fhir/us/bser/StructureDefinition/PatientConsent" />
    </element>
    <element id="Consent.status">
      <path value="Consent.status" />
      <short value="status" />
      <definition value="SHALL contain exactly one [1..1] status, which SHALL be selected from ValueSet Event-status http://hl7.org/fhir/ValueSet/event-status DYNAMIC (CONF:4383-119)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/event-status" />
          <display value="Event-status" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Consent.category">
      <path value="Consent.category" />
      <short value="category" />
      <definition value="SHALL contain exactly one [1..1] category, which SHALL be selected from ValueSet Consent-category http://hl7.org/fhir/ValueSet/consent-category DYNAMIC (CONF:4383-124)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/consent-category" />
          <display value="Consent-category" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Consent.patient">
      <path value="Consent.patient" />
      <short value="patient" />
      <definition value="SHALL contain exactly one [1..1] =&quot;BSeR Patient&quot;BSeR Patient (identifier: http://hl7.org/fhir/us/bser/StructureDefinition/PatientRole) (CONF:4383-120)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/bser/StructureDefinition/PatientRole" />
      </type>
      <patternString value="BSeR Patient" />
    </element>
    <element id="Consent.dateTime">
      <path value="Consent.dateTime" />
      <short value="dateTime" />
      <definition value="SHALL contain exactly one [1..1] dateTime (CONF:4383-125)." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Consent.consentingParty">
      <path value="Consent.consentingParty" />
      <short value="consentingParty" />
      <definition value="SHALL contain at least one [1..*] =&quot;BSeR Related Person&quot;BSeR Related Person (identifier: http://hl7.org/fhir/us/bser/StructureDefinition/PatientRelatedPerson) (CONF:4383-121)." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/bser/StructureDefinition/PatientRelatedPerson" />
      </type>
      <patternString value="BSeR Related Person" />
    </element>
    <element id="Consent.actor">
      <path value="Consent.actor" />
      <short value="actor" />
      <definition value="SHALL contain at least one [1..*] actor (CONF:4383-122)." />
      <min value="1" />
      <max value="*" />
    </element>
    <element id="Consent.actor.role">
      <path value="Consent.actor.role" />
      <short value="role" />
      <definition value="Such actors SHALL contain exactly one [1..1] role, which SHALL be selected from ValueSet Security-role-type http://hl7.org/fhir/ValueSet/security-role-type DYNAMIC (CONF:4383-126)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/security-role-type" />
          <display value="Security-role-type" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Consent.actor.reference">
      <path value="Consent.actor.reference" />
      <short value="reference" />
      <definition value="Such actors SHALL contain exactly one [1..1] =&quot;BSeR Practitioner&quot;BSeR Practitioner (identifier: http://hl7.org/fhir/us/bser/StructureDefinition/PractitionerPerson) (CONF:4383-123)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/bser/StructureDefinition/PractitionerPerson" />
      </type>
      <patternString value="BSeR Practitioner" />
    </element>
  </differential>
</StructureDefinition>