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

<Communication xmlns="http://hl7.org/fhir">
  <meta>
    <profile value="https://fhir-ig.digital.health.nz/shared-care/StructureDefinition/CMSCommunication"/>
  </meta>
  <text>
    <status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: Communication SMSCommunicationExample</b></p><a name="SMSCommunicationExample"> </a><a name="hcSMSCommunicationExample"> </a><div style="display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%"><p style="margin-bottom: 0px"/><p style="margin-bottom: 0px">Profile: <a href="StructureDefinition-CMSCommunication.html">CMS Communication</a></p></div><blockquote><p><b>Send to and from communication to contact points</b></p><ul><li>toContactPoint: 0221234567</li><li>fromContactPoint: 1234</li></ul></blockquote><p><b>Status DateTime</b>: 2024-08-20 14:35:00+0000</p><p><b>identifier</b>: <code>https://api.messaging.digital.health.nz/SourceId</code>/#ebdb8d66-1390-42c7-89a6-a9a75d65d0e6 (use: usual, ), <code>https://api.messaging.digital.health.nz/CorrelationId</code>/#bdb8d66-1390-42c7-89a6-a9a75d65d0e6-001 (use: secondary, ), <code>https://api.messaging.digital.health.nz/MessageId</code>/#cb8d66-1390-42c7-89a6-a9a75d65d344 (use: secondary, ), <code>https://api.messaging.digital.health.nz/ProviderMessageId</code>/#cb8d66-1390-42c7-89a6-a9a75d65d333 (use: secondary, ), <code>https://api.messaging.digital.health.nz/ConsumerId</code>/#lb8d66-1390-42c7-89a6-a9a75d65d333 (use: secondary, )</p><p><b>basedOn</b>: <a href="CommunicationRequest-SMSCommunicationRequestWithTemplateExample.html">CommunicationRequest: extension = ,,,https://example.com/callback; identifier = https://api.messaging.digital.health.nz/SourceId##ebdb8d66-1390-42c7-89a6-a9a75d65d0e6 (use: usual, ),https://api.messaging.digital.health.nz/CorrelationId##bdb8d66-1390-42c7-89a6-a9a75d65d0e6-001 (use: secondary, ),https://api.messaging.digital.health.nz/MessageId##cb8d66-1390-42c7-89a6-a9a75d65d344 (use: secondary, ),https://api.messaging.digital.health.nz/ProviderMessageId##cb8d66-1390-42c7-89a6-a9a75d65d333 (use: secondary, ),https://api.messaging.digital.health.nz/ConsumerId##lb8d66-1390-42c7-89a6-a9a75d65d333 (use: secondary, ); status = unknown; medium = SMS message; authoredOn = 2024-08-20 14:30:00+0000</a></p><p><b>status</b>: Completed</p><p><b>statusReason</b>: <span title="Codes:{https://fhir-ig.digital.health.nz/shared-care/CodeSystem/hnz-communication-delivery-status-codes sent}">Sent</span></p><p><b>medium</b>: <span title="Codes:{https://fhir-ig.digital.health.nz/shared-care/CodeSystem/hnz-participation-mode-codes SMSWRIT}">SMS message</span></p><p><b>sent</b>: 2024-08-20 14:30:00+0000</p><p><b>received</b>: 2024-08-20 14:35:00+0000</p><p><b>sender</b>: BSA (Identifier: <code>https://hub.services.digital.health.nz/ns/hip-application-id</code>/56789 (use: official, ))</p><h3>Payloads</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Content[x]</b></td></tr><tr><td style="display: none">*</td><td>text/plain: IyBQYXRpZW50IEVuY291bnRlciBOb3RlcwoKIyMgMjAyMy0wOC0wMgoKLSBEaXNjdXNzZWQgY29uZGl0aW9uCi0gT3RhaW5lZCBjb25zZW50IAotIGV0Yy4=</td></tr></table></div>
  </text>
  <extension url="https://fhir-ig.digital.health.nz/shared-care/StructureDefinition/hnz-contact-point-extension">
    <extension url="toContactPoint">
      <valueContactPoint>
        <system value="sms"/>
        <value value="0221234567"/>
      </valueContactPoint>
    </extension>
    <extension url="fromContactPoint">
      <valueContactPoint>
        <system value="sms"/>
        <value value="1234"/>
      </valueContactPoint>
    </extension>
  </extension>
  <extension url="https://fhir-ig.digital.health.nz/shared-care/StructureDefinition/hnz-status-date-time-extension">
    <valueDateTime value="2024-08-20T14:35:00Z"/>
  </extension>
  <identifier>
    <use value="usual"/>
    <system value="https://api.messaging.digital.health.nz/SourceId"/>
    <value value="#ebdb8d66-1390-42c7-89a6-a9a75d65d0e6"/>
  </identifier>
  <identifier>
    <use value="secondary"/>
    <system value="https://api.messaging.digital.health.nz/CorrelationId"/>
    <value value="#bdb8d66-1390-42c7-89a6-a9a75d65d0e6-001"/>
  </identifier>
  <identifier>
    <use value="secondary"/>
    <system value="https://api.messaging.digital.health.nz/MessageId"/>
    <value value="#cb8d66-1390-42c7-89a6-a9a75d65d344"/>
  </identifier>
  <identifier>
    <use value="secondary"/>
    <system value="https://api.messaging.digital.health.nz/ProviderMessageId"/>
    <value value="#cb8d66-1390-42c7-89a6-a9a75d65d333"/>
  </identifier>
  <identifier>
    <use value="secondary"/>
    <system value="https://api.messaging.digital.health.nz/ConsumerId"/>
    <value value="#lb8d66-1390-42c7-89a6-a9a75d65d333"/>
  </identifier>
  <basedOn>
    <reference value="CommunicationRequest/SMSCommunicationRequestWithTemplateExample"/>
  </basedOn>
  <status value="completed"/>
  <statusReason>
    <coding>
      <system value="https://fhir-ig.digital.health.nz/shared-care/CodeSystem/hnz-communication-delivery-status-codes"/>
      <code value="sent"/>
    </coding>
  </statusReason>
  <medium>
    <coding>
      <system value="https://fhir-ig.digital.health.nz/shared-care/CodeSystem/hnz-participation-mode-codes"/>
      <code value="SMSWRIT"/>
    </coding>
  </medium>
  <sent value="2024-08-20T14:30:00Z"/>
  <received value="2024-08-20T14:35:00Z"/>
  <sender>
    <type value="Device"/>
    <identifier>
      <use value="official"/>
      <system value="https://hub.services.digital.health.nz/ns/hip-application-id"/>
      <value value="56789"/>
    </identifier>
    <display value="BSA"/>
  </sender>
  <payload>
    <contentAttachment id="message-body">
      <contentType value="text/plain"/>
      <language value="en-nz"/>
      <data value="IyBQYXRpZW50IEVuY291bnRlciBOb3RlcwoKIyMgMjAyMy0wOC0wMgoKLSBEaXNjdXNzZWQgY29uZGl0aW9uCi0gT3RhaW5lZCBjb25zZW50IAotIGV0Yy4="/>
      <title value="Payload"/>
      <creation value="2023-08-01T09:35:00+11:00"/>
    </contentAttachment>
  </payload>
</Communication>