{
  "resourceType" : "Bundle",
  "id" : "BundleForPatientED",
  "meta" : {
    "profile" : ["https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument"]
  },
  "identifier" : {
    "system" : "https://fhir.by/ValueSet/urn:ietf:rfc:3986",
    "value" : "urn:uuid:0c3151bd-1cbf-4d64-b04d-cd9187a4c6t9"
  },
  "type" : "document",
  "timestamp" : "2025-04-07T11:30:00Z",
  "entry" : [{
    "fullUrl" : "Composition/CompositionBundlePatientED",
    "resource" : {
      "resourceType" : "Composition",
      "id" : "CompositionBundlePatientED",
      "meta" : {
        "profile" : ["https://fhir.by/StructureDefinition/CompDocument"]
      },
      "status" : "registered",
      "type" : {
        "coding" : [{
          "system" : "https://fhir.by/ValueSet/CompositionType",
          "code" : "general",
          "display" : "Общая медицинская информация"
        }]
      },
      "subject" : [{
        "reference" : "Patient/ExamplePatientED"
      }],
      "encounter" : {
        "reference" : "Encounter/EncounterBundleForTest"
      },
      "date" : "2024-04-07T11:12:21Z",
      "author" : [{
        "reference" : "ExampleDoctor"
      }],
      "title" : "CompDocument для наполненного Bundle",
      "custodian" : {
        "reference" : "Organization/9ad86c36-0f29-428d-b476-c8603a7cdd1f"
      },
      "event" : [{
        "detail" : [{
          "reference" : {
            "reference" : "Condition/DiagnosisBundleForTest"
          }
        }]
      }]
    }
  },
  {
    "fullUrl" : "Patient/ExamplePatientED",
    "resource" : {
      "resourceType" : "Patient",
      "id" : "ExamplePatientED",
      "meta" : {
        "profile" : ["https://fhir.by/StructureDefinition/PatientED"]
      },
      "extension" : [{
        "url" : "https://fhir.by/StructureDefinition/DocumentKind",
        "valueCodeableConcept" : {
          "coding" : [{
            "system" : "https://fhir.by/ValueSet/DigitalDocumentKind",
            "code" : "00"
          }]
        }
      }],
      "identifier" : [{
        "type" : {
          "coding" : [{
            "system" : "https://fhir.by/ValueSet/PersonalDocumentType",
            "code" : "INP"
          }]
        },
        "value" : "7001112A009PB3"
      }],
      "active" : true,
      "name" : [{
        "family" : "Иванов",
        "given" : ["Василий",
        "Васильевич"]
      }],
      "gender" : "male",
      "birthDate" : "1989-01-31",
      "deceasedBoolean" : false,
      "address" : [{
        "extension" : [{
          "url" : "https://fhir.by/StructureDefinition/CoutryForAddresses",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "https://fhir.by/ValueSet/CitizenshipCode",
              "code" : "BY",
              "display" : "Беларусь"
            }]
          }
        },
        {
          "url" : "https://fhir.by/StructureDefinition/StreetGeoRegistry",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "https://fhir.by/ValueSet/StreetGeoRegistry",
              "code" : "72609920778",
              "display" : "Переулок Снежный"
            }]
          }
        },
        {
          "url" : "https://fhir.by/StructureDefinition/ApartmentRoom",
          "valueString" : "кв. 11"
        }],
        "use" : "home",
        "text" : "Могилевская область, г.Могилев, Переулок Гоголя, д.19",
        "postalCode" : "212011"
      }],
      "link" : [{
        "other" : {
          "reference" : "Patient/PatientBundleForTest"
        },
        "type" : "refer"
      }]
    }
  },
  {
    "fullUrl" : "Condition/DiagnosisBundleForTest",
    "resource" : {
      "resourceType" : "Condition",
      "id" : "DiagnosisBundleForTest",
      "meta" : {
        "profile" : ["https://fhir.by/StructureDefinition/FinalDiagnosis"]
      },
      "extension" : [{
        "url" : "https://fhir.by/StructureDefinition/KindOfDiagnosis",
        "valueCodeableConcept" : {
          "coding" : [{
            "system" : "https://fhir.by/ValueSet/KindOfDiagnosisCode",
            "code" : "Final"
          }]
        }
      },
      {
        "url" : "https://fhir.by/StructureDefinition/AssertedDate",
        "valueDateTime" : "2024-04-07"
      }],
      "clinicalStatus" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code" : "active"
        }]
      },
      "code" : {
        "coding" : [{
          "system" : "https://fhir.by/ValueSet/InternClassificDiseases10",
          "code" : "E11"
        }],
        "text" : "E11 - Сахарный диабет 2 типа"
      },
      "subject" : {
        "reference" : "Patient/PatientBundleForTest"
      },
      "onsetDateTime" : "2024-04-07",
      "recordedDate" : "2024-04-07",
      "participant" : [{
        "actor" : {
          "reference" : "PractitionerRole/3c057f8d-4369-4c5e-86be-f710dff3a91c"
        }
      }]
    }
  },
  {
    "fullUrl" : "Encounter/EncounterBundleForTest",
    "resource" : {
      "resourceType" : "Encounter",
      "id" : "EncounterBundleForTest",
      "meta" : {
        "profile" : ["https://fhir.by/StructureDefinition/EncounterGeneral"]
      },
      "status" : "completed",
      "class" : [{
        "coding" : [{
          "system" : "https://fhir.by/ValueSet/VSTermsOfService",
          "code" : "1"
        }]
      }],
      "priority" : {
        "coding" : [{
          "system" : "https://fhir.by/ValueSet/HealthCareForms",
          "code" : "emergency"
        }]
      },
      "type" : [{
        "coding" : [{
          "system" : "https://fhir.by/ValueSet/TypeOfHealthCare",
          "code" : "primary"
        }]
      }],
      "subject" : {
        "reference" : "Patient/PatientBundleForTest"
      },
      "serviceProvider" : {
        "reference" : "Organization/9ad86c36-0f29-428d-b476-c8603a7cdd1f"
      },
      "participant" : [{
        "actor" : {
          "reference" : "PractitionerRole/3c057f8d-4369-4c5e-86be-f710dff3a91c"
        }
      }],
      "actualPeriod" : {
        "start" : "2024-04-07T11:12:21Z",
        "end" : "2024-04-07T11:25:21Z"
      },
      "diagnosis" : [{
        "condition" : [{
          "reference" : {
            "reference" : "Condition/DiagnosisBundleForTest"
          }
        }],
        "use" : [{
          "coding" : [{
            "system" : "https://fhir.by/ValueSet/TypeOfDiagnosis",
            "code" : "mainDiagnosis"
          }]
        }]
      }]
    }
  }]
}