<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="argo-patientlist2" />
  <url value="http://www.fhir.org/guides/sushi-sandbox/StructureDefinition/argo-patientlist2" />
  <version value="0.1.0" />
  <name value="ArgonautPatientListProfile" />
  <title value="Argonaut Patient List (Group) Profile" />
  <status value="active" />
  <description value="Profile on the R4 Group resource to for [Argonaut Patient List Project](https://confluence.hl7.org/display/AP/Argonaut+Project+Home).  Note that the [Group](http://hl7.org/fhir/group.html) resource is used for this patient **list** use case even though there is also a FHIR List resource" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Group" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Group" />
  <derivation value="constraint" />
  <differential>
    <element id="Group.identifier">
      <path value="Group.identifier" />
      <comment value="do we need to include or be silent? I think should be silent" />
    </element>
    <element id="Group.active">
      <path value="Group.active" />
      <comment value="do we need to include or be silent? I think should be silent" />
    </element>
    <element id="Group.type">
      <path value="Group.type" />
      <patternCode value="person" />
      <mustSupport value="true" />
    </element>
    <element id="Group.actual">
      <path value="Group.actual" />
      <requirements value="Argo Patient Lists always list members" />
      <patternBoolean value="true" />
      <mustSupport value="true" />
    </element>
    <element id="Group.code">
      <path value="Group.code" />
      <comment value="although generally omitted for persons I think should be silent" />
    </element>
    <element id="Group.quantity">
      <path value="Group.quantity" />
      <comment value="do we need to include or be silent? I think should be silent at least until we find a need for its inclusion" />
    </element>
    <element id="Group.managingEntity">
      <path value="Group.managingEntity" />
      <requirements value="Used for searching for user or system-maintained lists" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" />
        <targetProfile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Group.characteristic">
      <path value="Group.characteristic" />
      <requirements value="Used for searching for by group parameter such as location" />
      <mustSupport value="true" />
    </element>
    <element id="Group.characteristic.code">
      <path value="Group.characteristic.code" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://www.fhir.org/guides/sushi-sandbox/ValueSet/argo-group-characteristic" />
      </binding>
    </element>
    <element id="Group.characteristic.value[x]">
      <path value="Group.characteristic.value[x]" />
      <comment value="do we need to constrain this list - can everybody support all the types if they support the characteristic element or for example do we need to you only need to must support just code and boolean" />
      <mustSupport value="true" />
    </element>
    <element id="Group.characteristic.exclude">
      <path value="Group.characteristic.exclude" />
      <comment value="this is required in the base" />
      <mustSupport value="true" />
    </element>
    <element id="Group.characteristic.period">
      <path value="Group.characteristic.period" />
      <comment value="this is how would support parameter for  'today' or 'tomorrow'" />
      <mustSupport value="true" />
    </element>
    <element id="Group.member">
      <path value="Group.member" />
      <comment value="enumerated list of members" />
      <mustSupport value="true" />
    </element>
    <element id="Group.member.entity">
      <path value="Group.member.entity" />
      <comment value="enumerated list of members" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Group.member.period">
      <path value="Group.member.period" />
      <comment value="do we need to include or be silent? I think should be silent" />
    </element>
    <element id="Group.member.inactive">
      <path value="Group.member.inactive" />
      <comment value="do we need to include or be silent? I think should be silent" />
    </element>
  </differential>
</StructureDefinition>