{
  "resourceType" : "Bundle",
  "id" : "pmir-feed-merge-a40",
  "meta" : {
    "profile" : ["https://profiles.ihe.net/ITI/PMIR/StructureDefinition/IHE.PMIR.Bundle"]
  },
  "language" : "en",
  "identifier" : {
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:uuid:7d0e3c5a-4b8a-4f3e-9c21-6a5f0b2e9a40"
  },
  "type" : "message",
  "timestamp" : "2010-01-25T12:15:00+00:00",
  "entry" : [{
    "fullUrl" : "https://fhir.ihe-uk.org/ITI/PAM/MessageHeader/pmir-a40-header",
    "resource" : {
      "resourceType" : "MessageHeader",
      "id" : "pmir-a40-header",
      "language" : "en",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"MessageHeader_pmir-a40-header\"> </a><p class=\"res-header-id\"><b>Generated Narrative: MessageHeader pmir-a40-header</b></p><a name=\"pmir-a40-header\"> </a><a name=\"hcpmir-a40-header\"> </a><p><b>event</b>: <a href=\"https://simplifier.net/resolve?scope=fhir.r4.ukcore.stu3.currentbuild@0.29.0-pre-release&amp;canonical=urn:ihe:iti:pmir:2019:patient-feed\">urn:ihe:iti:pmir:2019:patient-feed</a></p><h3>Destinations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Name</b></td><td><b>Endpoint</b></td></tr><tr><td style=\"display: none\">*</td><td>Patient Identity Registry</td><td><a href=\"https://simplifier.net/resolve?scope=fhir.r4.ukcore.stu3.currentbuild@0.29.0-pre-release&amp;canonical=http://example.org/fhir/Registry\">http://example.org/fhir/Registry</a></td></tr></table><p><b>sender</b>: Identifier: <a href=\"NamingSystem-ods-organization-code.html\" title=\"NHS Organisation Data Service (ODS) organisation code. HL7 v2 MSH-4, MSH-6, CX-6, PD1-3.\">ODSOrganisationCode</a>/RCB</p><h3>Sources</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Name</b></td><td><b>Endpoint</b></td></tr><tr><td style=\"display: none\">*</td><td>PAS</td><td><a href=\"https://simplifier.net/resolve?scope=fhir.r4.ukcore.stu3.currentbuild@0.29.0-pre-release&amp;canonical=http://example.org/fhir/PAS\">http://example.org/fhir/PAS</a></td></tr></table><p><b>focus</b>: <a href=\"Bundle-pmir-feed-merge-a40.html#Bundle_pmir-a40-history\">Bundle: type = history</a></p><p><b>definition</b>: <a href=\"https://simplifier.net/resolve?scope=fhir.r4.ukcore.stu3.currentbuild@0.29.0-pre-release&amp;canonical=https://profiles.ihe.net/ITI/PMIR/MessageDefinition/IHE.PMIR.MessageDefinition\">https://profiles.ihe.net/ITI/PMIR/MessageDefinition/IHE.PMIR.MessageDefinition</a></p></div>"
      },
      "eventUri" : "urn:ihe:iti:pmir:2019:patient-feed",
      "destination" : [{
        "name" : "Patient Identity Registry",
        "endpoint" : "http://example.org/fhir/Registry"
      }],
      "sender" : {
        "identifier" : {
          "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
          "value" : "RCB"
        }
      },
      "source" : {
        "name" : "PAS",
        "endpoint" : "http://example.org/fhir/PAS"
      },
      "focus" : [{
        "reference" : "Bundle/pmir-a40-history"
      }],
      "definition" : "https://profiles.ihe.net/ITI/PMIR/MessageDefinition/IHE.PMIR.MessageDefinition"
    }
  },
  {
    "fullUrl" : "https://fhir.ihe-uk.org/ITI/PAM/Bundle/pmir-a40-history",
    "resource" : {
      "resourceType" : "Bundle",
      "id" : "pmir-a40-history",
      "language" : "en",
      "type" : "history",
      "entry" : [{
        "fullUrl" : "https://fhir.ihe-uk.org/ITI/PAM/Patient/hscic-a40-identity-prior-patient",
        "resource" : {
          "resourceType" : "Patient",
          "id" : "hscic-a40-identity-prior-patient",
          "language" : "en",
          "identifier" : [{
            "type" : {
              "coding" : [{
                "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code" : "MR"
              }]
            },
            "value" : "22789",
            "assigner" : {
              "identifier" : {
                "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
                "value" : "RCB"
              }
            }
          }],
          "active" : false,
          "name" : [{
            "use" : "official",
            "family" : "Unknown"
          }],
          "link" : [{
            "other" : {
              "reference" : "Patient/Patient-EDITESTPATIENT-TEN-9999999557",
              "type" : "Patient",
              "identifier" : {
                "system" : "https://fhir.nhs.uk/Id/nhs-number",
                "value" : "9999999557"
              }
            },
            "type" : "replaced-by"
          }]
        },
        "request" : {
          "method" : "PUT",
          "url" : "Patient/hscic-a40-identity-prior-patient"
        },
        "response" : {
          "status" : "200"
        }
      },
      {
        "fullUrl" : "https://fhir.ihe-uk.org/ITI/PAM/Patient/Patient-EDITESTPATIENT-TEN-9999999557",
        "resource" : {
          "resourceType" : "Patient",
          "id" : "Patient-EDITESTPATIENT-TEN-9999999557",
          "meta" : {
            "profile" : ["https://fhir.ihe-uk.org/ITI/PAM/StructureDefinition/PAMPatient"]
          },
          "language" : "en",
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName",
            "valueString" : "SCHMIDT"
          },
          {
            "url" : "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory",
            "valueCodeableConcept" : {
              "coding" : [{
                "system" : "https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategoryEngland",
                "code" : "A"
              }]
            }
          },
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
            "valueAddress" : {
              "city" : "Berlin"
            }
          },
          {
            "extension" : [{
              "url" : "code",
              "valueCodeableConcept" : {
                "coding" : [{
                  "system" : "urn:iso:std:iso:3166",
                  "code" : "GBR"
                }]
              }
            }],
            "url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship"
          },
          {
            "extension" : [{
              "url" : "code",
              "valueCodeableConcept" : {
                "coding" : [{
                  "system" : "urn:iso:std:iso:3166",
                  "code" : "DEU"
                }]
              }
            }],
            "url" : "http://hl7.org/fhir/StructureDefinition/patient-nationality"
          }],
          "identifier" : [{
            "type" : {
              "coding" : [{
                "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code" : "NH"
              }]
            },
            "system" : "https://fhir.nhs.uk/Id/nhs-number",
            "value" : "9999999557"
          }],
          "name" : [{
            "use" : "official",
            "family" : "EDITESTPATIENT",
            "given" : ["TEN"],
            "prefix" : ["MRS"]
          }],
          "telecom" : [{
            "system" : "phone",
            "value" : "+441234567890",
            "use" : "home"
          }],
          "gender" : "female",
          "birthDate" : "1980-01-01",
          "_birthDate" : {
            "extension" : [{
              "url" : "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
              "valueDateTime" : "1980-01-01T15:15:00+00:00"
            }]
          },
          "address" : [{
            "use" : "home",
            "line" : ["1 TEST STREET"],
            "city" : "BRACKNELL",
            "district" : "BERKSHIRE",
            "postalCode" : "RG12 9AX",
            "country" : "GBR"
          }],
          "maritalStatus" : {
            "coding" : [{
              "system" : "https://fhir.hl7.org.uk/CodeSystem/UKCore-PersonMaritalStatusEngland",
              "code" : "M"
            }]
          },
          "multipleBirthBoolean" : false,
          "communication" : [{
            "language" : {
              "coding" : [{
                "system" : "urn:ietf:bcp:47",
                "code" : "en"
              }]
            }
          }],
          "generalPractitioner" : [{
            "identifier" : {
              "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
              "value" : "Y06601"
            },
            "display" : "MALTON GP PRACTICE"
          },
          {
            "identifier" : {
              "system" : "https://fhir.hl7.org.uk/Id/gmp-number",
              "value" : "G5612908"
            },
            "display" : "Dr Gregory Townley"
          }]
        },
        "request" : {
          "method" : "PUT",
          "url" : "Patient/Patient-EDITESTPATIENT-TEN-9999999557"
        },
        "response" : {
          "status" : "200"
        }
      }]
    }
  }]
}