{
  "resourceType" : "EpisodeOfCare",
  "id" : "EN667788899",
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: EpisodeOfCare EN667788899</b></p><a name=\"EN667788899\"> </a><a name=\"hcEN667788899\"> </a><a name=\"EN667788899-en-US\"> </a><p><b>Enrolment_expiry_date</b>: 2026-06-05</p><p><b>Reenrolment_expiry_date</b>: 2022-06-05</p><p><b>Enrolment_owner_org</b>: <a href=\"Organization/GZZ998-G\">Live Org with Dormant</a></p><p><b>Nes_enrolment_termination_reason</b>: <span title=\"Codes:{https://standards.digital.health.nz/nes-enrolment-termination-reason Transfer}\">The patient has enrolled with another organisation</span></p><p><b>Enrolment_encounter</b>: <code>QualifiedEncounter1</code></p><p><b>identifier</b>: <code>https://standards.digital.health.nz/ns/nes-enrolment-id</code>/EN667788899</p><p><b>status</b>: Active</p><p><b>type</b>: <span title=\"Codes:{https://standards.digital.health.nz/nes-enrolment-type FLS-NF}\">First Level Services</span></p><p><b>patient</b>: <a href=\"#hcEN667788899/ZJM9397\">Jamie Joseph Ryan  (no stated gender), DoB: 1972-06-05</a></p><p><b>careManager</b>: <a href=\"#hcEN667788899/EnrolmentServiceProvider1\">PractitionerRole</a></p><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: PractitionerRole #EnrolmentServiceProvider1</b></p><a name=\"EN667788899/EnrolmentServiceProvider1\"> </a><a name=\"hcEN667788899/EnrolmentServiceProvider1\"> </a><a name=\"EN667788899/EnrolmentServiceProvider1-en-US\"> </a><p><b>practitioner</b>: <a href=\"Practitioner/99ZZZS\">Mrs TestOne Prefix-Test</a></p><p><b>organization</b>: <a href=\"Organization/GZZ998-G\">Live Org with Dormant</a></p><p><b>location</b>: <a href=\"Location/FZZ968-B\">Facility Has All Contact Types TEST</a></p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Patient #ZJM9397</b></p><a name=\"EN667788899/ZJM9397\"> </a><a name=\"hcEN667788899/ZJM9397\"> </a><a name=\"EN667788899/ZJM9397-en-US\"> </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-NesPatient.html\">NES Patient</a></p></div><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\">Jamie Joseph Ryan  (no stated gender), DoB: 1972-06-05</p><hr/></blockquote></div>"
  },
  "contained" : [{
    "resourceType" : "PractitionerRole",
    "id" : "EnrolmentServiceProvider1",
    "practitioner" : {
      "reference" : "Practitioner/99ZZZS",
      "display" : "Mrs TestOne Prefix-Test"
    },
    "organization" : {
      "reference" : "Organization/GZZ998-G",
      "display" : "Live Org with Dormant"
    },
    "location" : [{
      "reference" : "Location/FZZ968-B",
      "display" : "Facility Has All Contact Types TEST"
    }]
  },
  {
    "resourceType" : "Patient",
    "id" : "ZJM9397",
    "meta" : {
      "profile" : ["http://hl7.org.nz/fhir/StructureDefinition/NesPatient"]
    },
    "name" : [{
      "family" : "Ryan",
      "given" : ["Jamie",
      "Joseph"]
    }],
    "birthDate" : "1972-06-05"
  }],
  "extension" : [{
    "url" : "http://hl7.org.nz/fhir/StructureDefinition/enrolment-expiry-date",
    "valueDate" : "2026-06-05"
  },
  {
    "url" : "http://hl7.org.nz/fhir/StructureDefinition/reenrolment-date",
    "valueDate" : "2022-06-05"
  },
  {
    "url" : "http://hl7.org.nz/fhir/StructureDefinition/enrolment-owner-org",
    "valueReference" : {
      "reference" : "Organization/GZZ998-G",
      "display" : "Live Org with Dormant"
    }
  },
  {
    "url" : "http://hl7.org.nz/fhir/StructureDefinition/nes-enrolment-termination-reason",
    "valueCodeableConcept" : {
      "coding" : [{
        "system" : "https://standards.digital.health.nz/nes-enrolment-termination-reason",
        "code" : "Transfer"
      }]
    }
  },
  {
    "url" : "http://hl7.org.nz/fhir/StructureDefinition/enrolment-encounter",
    "valueReference" : {
      "reference" : "QualifiedEncounter1"
    }
  }],
  "identifier" : [{
    "system" : "https://standards.digital.health.nz/ns/nes-enrolment-id",
    "value" : "EN667788899"
  }],
  "status" : "active",
  "type" : [{
    "coding" : [{
      "system" : "https://standards.digital.health.nz/nes-enrolment-type",
      "code" : "FLS-NF"
    }]
  }],
  "patient" : {
    "reference" : "#ZJM9397"
  },
  "careManager" : {
    "reference" : "#EnrolmentServiceProvider1"
  }
}