<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <lastUpdated value="2016-12-08T10:30:40.436+00:00" />
  </meta>
  <url value="https://www.livingitup.scot/FhirProfile/LiUAlias" />
  <version value="0.1" />
  <name value="LiUAlias" />
  <status value="draft" />
  <publisher value="NHS24" />
  <date value="2016-12-08T09:55:20+00:00" />
  <description value="Used for storing an LiU Alias which allows users to post messages to the LiU website anonymously." />
  <requirements value="Need to provide a way that apps (e.g. Step It up) can create an anonymous alias which is linked to the user's Patient resource. These apps typically will not have permission to modify the Patient resource, but will have permission to create an LiUAlias." />
  <kind value="resource" />
  <constrainedType value="Person" />
  <abstract value="false" />
  <base value="http://hl7.org/fhir/StructureDefinition/Person" />
  <differential>
    <element>
      <path value="Person" />
      <short value="An LiU Alias record" />
      <definition value="Used for storing an LiU Alias which allows users to post messages to the LiU website anonymously." />
      <comments value="Need to provide a way that apps (e.g. Step It up) can create an anonymous alias which is linked to the user's Patient resource. These apps typically will not have permission to modify the Patient resource, but will have permission to create an LiUAlias." />
    </element>
    <element>
      <path value="Person.identifier" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.name" />
      <max value="1" />
    </element>
    <element>
      <path value="Person.name.use" />
      <fixedCode value="anonymous" />
    </element>
    <element>
      <path value="Person.name.family" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.name.given" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.name.prefix" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.name.suffix" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.name.period" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.telecom" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.gender" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.birthDate" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.address" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.photo" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.managingOrganization" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.active" />
      <max value="0" />
    </element>
    <element>
      <path value="Person.link" />
      <short value="Link to the Patient resource which this alias refers to" />
      <definition value="Link to the Patient resource which this alias refers to" />
      <max value="1" />
    </element>
    <element>
      <path value="Person.link.target" />
      <short value="Link to the Patient resource which this alias refers to" />
      <definition value="Link to the Patient resource which this alias refers to" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element>
      <path value="Person.link.assurance" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>