<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <lastUpdated value="2017-06-22T13:50:13.213+01:00" />
  </meta>
  <url value="https://www.youngcancer.scot.nhs.uk/fhir/MsnNote" />
  <version value="1" />
  <name value="MsnNote" />
  <status value="draft" />
  <date value="2017-06-21T14:31:30.9347025+01:00" />
  <description value="Used for Notes in the My Story Now app. Notes appear in a timeline within the app and represent a communication between the patient and keyworker. Notes can be initiated (created) either by the patient or keyworker. Notes can also be private i.e. a 'not to self' if created by the patient with no recipient specified" />
  <fhirVersion value="1.0.2" />
  <kind value="resource" />
  <constrainedType value="Communication" />
  <abstract value="false" />
  <base value="http://hl7.org/fhir/StructureDefinition/Communication" />
  <differential>
    <element>
      <path value="Communication" />
    </element>
    <element>
      <path value="Communication.identifier" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.category" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.sender" />
      <definition value="Sender is mandatory and must be either a Patient reference or and Organisation reference. Organisation will refer to a resource created for MSNCYPC." />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element>
      <path value="Communication.sender.reference" />
      <min value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element>
      <path value="Communication.recipient" />
      <definition value="The Patient or Organisation which was the target of the communication. If Organisation the reference will be to the MSNCYPC resource. " />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element>
      <path value="Communication.payload" />
      <definition value="Text only" />
      <max value="1" />
    </element>
    <element>
      <path value="Communication.payload.contentString" />
      <name value="NoteString" />
      <short value="Text-only message" />
      <definition value="This is the body of the note in string format whcih is a communication from patient to keyworker or vice versa or a 'note-to-self' created by the patient." />
      <type>
        <code value="string" />
      </type>
    </element>
    <element>
      <path value="Communication.medium" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.status" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.encounter" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.received" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.reason" />
      <max value="0" />
    </element>
    <element>
      <path value="Communication.subject" />
      <min value="1" />
    </element>
    <element>
      <path value="Communication.requestDetail" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>