{
  "info": {
    "_postman_id": "0ec91f14-be28-4a82-89a1-390ab1983e6e",
    "name": "Протокол 1.2 Функциональная диагностика",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "37937048"
  },
  "item": [
    {
      "name": "предварительные условия",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "поиск пациента по идентификационному номеру",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551317A009PB4",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551317A009PB4"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 1. Выполнение ЭКГ при наличии направления",
      "item": [
        {
          "name": "импорт пакета медицинской информации (Создание направления)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ConditionTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"DiagnosisrFullBundle\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-04-07\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E01\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"E01 - Болезни щитовидной железы, связанные с йодной недостаточностью, и сходные состояния\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"onsetDateTime\": \"2025-04-07\",\r\n                \"recordedDate\": \"2025-04-07\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{generalPractitioner}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"emergency\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{generalPractitioner}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-10-01T11:12:21Z\",\r\n                    \"end\": \"2025-10-01T11:25:21Z\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ConditionTest\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ServiceRequestTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"77a5a02e-eb84-4d13-8d07-0e8753c1ace2\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstServiceRequestFunctDiagn\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/RequestFromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C060\",\r\n                                    \"display\": \"Функциональная диагностика\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HeadOfUnit\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"PractitionerRole/{{generalPractitioner}}\"\r\n                        }\r\n                    }\r\n                   \r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                                \"code\": \"A05-10-002-001-add\",\r\n                                \"display\": \"ЭКГ по стандартной методике в 12 отведениях в стационарных условиях вне кабинета ЭКГ\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterTest\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2026-02-06T12:00:00Z\",\r\n                    \"end\": \"2026-02-06T12:50:00Z\"\r\n                },\r\n                \"authoredOn\": \"2026-12-06\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{generalPractitioner}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{generalPractitioner}}\"\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ReasonForFunctDiagn\",\r\n                                \"valueString\": \"диспансеризация\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск направления на функциональную диагностику",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
                  "console.log(serviceRequestId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&code-concept=A05-10-002-001-add&category=03/1&status=active",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ServiceRequest"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "code-concept",
                  "value": "A05-10-002-001-add"
                },
                {
                  "key": "category",
                  "value": "03/1"
                },
                {
                  "key": "status",
                  "value": "active",
                  "type": "text"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск направления на функциональную диагностику(в контексте организации)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
                  "console.log(serviceRequestId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Organization/{{OrganizationId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn&patient={{patientId}}&status=active",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Organization",
                "{{OrganizationId}}",
                "ServiceRequest"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "status",
                  "value": "active"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "импорт пакета медицинской информации (Создание процедуры)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ProcedureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ProcedureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProcedureFunctDiagn\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2026-02-06T12:00:00Z\",\r\n                    \"end\": \"2026-02-06T12:50:00Z\"\r\n                },\r\n                \"recorded\": \"2026-02-06T13:47:00Z\",\r\n                \"recorder\": {\r\n                    \"reference\": \"PractitionerRole/{{nurseRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PerformerRoleObservation\",\r\n                                    \"code\": \"doctor\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{nurseRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ReasonForFunctDiagn\",\r\n                                \"valueString\": \"Мониторинг состояния пациента с хронической ишемической болезнью сердца, оценка эффективности лечения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"outcome\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ProcedureResult\",\r\n                            \"code\": \"successful\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Успешное выполнение\"\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск процедуры функциональной диагностики",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let procedureId = jsonData.entry.find(obj => obj.resource.resourceType === \"Procedure\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"procedureId\", procedureId);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/ProcedureFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Procedure"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ProcedureFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Изменения статуса направления на функциональную диагностику",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
                  "console.log(serviceRequestId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&code-concept=A05-10-002-001-add&category=03/1",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ServiceRequest"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "code-concept",
                  "value": "A05-10-002-001-add"
                },
                {
                  "key": "category",
                  "value": "03/1"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "импорт пакета медицинской информации (Создание исследования+заключение)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/Example24hBpMonit\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"Example24hBpMonit\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/GeneralFunctionalResearch\"\r\n                    ]\r\n                },\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestId}}\",\r\n                        \"display\": \"Направление на функциональное исследование\"\r\n                    }\r\n                ],\r\n                \"partOf\": [\r\n                    {\r\n                        \"reference\": \"Procedure/{{procedureId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2026-02-03T12:00:00Z\",\r\n                    \"end\": \"2026-02-03T12:00:00Z\"\r\n                },\r\n                \"issued\": \"2026-02-03T12:47:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"component\": [\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-24h\",\r\n                                    \"display\": \"Средняя величина АД САД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 120,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-day\",\r\n                                    \"display\": \"Средняя величина АД САД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 124,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-night\",\r\n                                    \"display\": \"Средняя величина АД САД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 109,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-24h\",\r\n                                    \"display\": \"Средняя величина АД ДАД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 66,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-day\",\r\n                                    \"display\": \"Средняя величина АД ДАД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 69,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-night\",\r\n                                    \"display\": \"Средняя величина АД ДАД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 62,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-day\",\r\n                                    \"display\": \"Вариабельность САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 9,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-night\",\r\n                                    \"display\": \"Вариабельность САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 13,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-day\",\r\n                                    \"display\": \"Вариабельность ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-night\",\r\n                                    \"display\": \"Вариабельность ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 6,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии САД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-systolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-diastolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 10.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-systolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 5,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-diastolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 4,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDRpedECG\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDRpedECG\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport\"\r\n                    ]\r\n                },\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"54876\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectiveDateTime\": \"2025-10-04\",\r\n                \"issued\": \"2026-02-07T12:10:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/Example24hBpMonit\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Синусовый ритм, ЧСС 135 уд/мин, вертикальное положение ЭОС\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия показателей функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let observationId = jsonData.entry.find(obj => obj.resource.resourceType === \"Observation\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"observationId\", observationId);\r",
                  "console.log(observationId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Observation?_profile=https://fhir.by/StructureDefinition/GeneralFunctionalResearch&patient={{patientId}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Observation"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/GeneralFunctionalResearch"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия заключения функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let diagnosticReportId = jsonData.entry.find(obj => obj.resource.resourceType === \"DiagnosticReport\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"diagnosticReportId\", diagnosticReportId);\r",
                  "console.log(diagnosticReportId)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport&patient={{patientId}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "DiagnosticReport"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 2 Выполнение ЭКГ без направления",
      "item": [
        {
          "name": "Поиск направления на функциональную диагностику",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
                  "console.log(serviceRequestId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&code-concept=A05-10-002-001-add&category=03/1&status=active",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ServiceRequest"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "code-concept",
                  "value": "A05-10-002-001-add"
                },
                {
                  "key": "category",
                  "value": "03/1"
                },
                {
                  "key": "status",
                  "value": "active",
                  "type": "text"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "импорт пакета медицинской информации (Создание процедуры)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ProcedureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ProcedureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProcedureFunctDiagn\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"paid\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2026-02-11T12:00:00Z\",\r\n                    \"end\": \"2026-02-11T12:50:00Z\"\r\n                },\r\n                \"recorded\": \"2026-02-11T13:47:00Z\",\r\n                \"recorder\": {\r\n                    \"reference\": \"PractitionerRole/{{nurseRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PerformerRoleObservation\",\r\n                                    \"code\": \"doctor\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{nurseRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"outcome\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ProcedureResult\",\r\n                            \"code\": \"successful\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Успешное выполнение\"\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск процедуры функциональной диагностики",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let procedureId = jsonData.entry.find(obj => obj.resource.resourceType === \"Procedure\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"procedureId\", procedureId);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/ProcedureFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&occurrence=2026-02-11",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Procedure"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ProcedureFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "occurrence",
                  "value": "2026-02-11",
                  "type": "text"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "импорт пакета медицинской информации (Создание исследования+заключение)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/Example24hBpMonit\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"Example24hBpMonit\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/GeneralFunctionalResearch\"\r\n                    ]\r\n                },\r\n                \"partOf\": [\r\n                    {\r\n                        \"reference\": \"Procedure/{{procedureId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2026-02-14T12:00:00Z\",\r\n                    \"end\": \"2026-02-14T12:00:00Z\"\r\n                },\r\n                \"issued\": \"2026-02-14T12:47:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"component\": [\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-24h\",\r\n                                    \"display\": \"Средняя величина АД САД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 120,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-day\",\r\n                                    \"display\": \"Средняя величина АД САД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 124,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-night\",\r\n                                    \"display\": \"Средняя величина АД САД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 109,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-24h\",\r\n                                    \"display\": \"Средняя величина АД ДАД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 66,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-day\",\r\n                                    \"display\": \"Средняя величина АД ДАД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 69,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-night\",\r\n                                    \"display\": \"Средняя величина АД ДАД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 62,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-day\",\r\n                                    \"display\": \"Вариабельность САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 9,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-night\",\r\n                                    \"display\": \"Вариабельность САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 13,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-day\",\r\n                                    \"display\": \"Вариабельность ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-night\",\r\n                                    \"display\": \"Вариабельность ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 6,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии САД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-systolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-diastolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 10.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-systolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 5,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-diastolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 4,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDRpedECG\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDRpedECG\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"5487677\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectiveDateTime\": \"2026-02-12\",\r\n                \"issued\": \"2026-02-14T12:10:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/Example24hBpMonit\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Синусовый ритм, ЧСС 135 уд/мин, вертикальное положение ЭОС\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия показателей функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let observationId = jsonData.entry.find(obj => obj.resource.resourceType === \"Observation\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"observationId\", observationId);\r",
                  "console.log(observationId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Observation?_profile=https://fhir.by/StructureDefinition/GeneralFunctionalResearch&patient={{patientId}}&date=2026-02-14",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Observation"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/GeneralFunctionalResearch"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "date",
                  "value": "2026-02-14",
                  "type": "text"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия заключения функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let diagnosticReportId = jsonData.entry.find(obj => obj.resource.resourceType === \"DiagnosticReport\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"diagnosticReportId\", diagnosticReportId);\r",
                  "console.log(diagnosticReportId)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport&patient={{patientId}}&identifier=5487677",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "DiagnosticReport"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "identifier",
                  "value": "5487677"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 3. Создание заключения по расклейке ЭКГ, выполненной в другом УЗ (филиале), которое не подключено к ЦИСЗ",
      "item": [
        {
          "name": "Поиск направления на функциональную диагностику",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let serviceRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"serviceRequestId\", serviceRequestId);\r",
                  "console.log(serviceRequestId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&code-concept=A05-10-002-001-add&category=03/1&status=active",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ServiceRequest"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ServiceRequestFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "code-concept",
                  "value": "A05-10-002-001-add"
                },
                {
                  "key": "category",
                  "value": "03/1"
                },
                {
                  "key": "status",
                  "value": "active",
                  "type": "text"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск процедуры функциональной диагностики",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let procedureId = jsonData.entry.find(obj => obj.resource.resourceType === \"Procedure\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"procedureId\", procedureId);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/ProcedureFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&occurrence=2026-02-16",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Procedure"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ProcedureFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "occurrence",
                  "value": "2026-02-16"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "импорт пакета медицинской информации (Создание процедуры)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "X-Fhir-By-Version",
                "value": "latest",
                "type": "text",
                "disabled": true
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ProcedureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ProcedureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProcedureFunctDiagn\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"paid\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2026-02-16T12:00:00Z\",\r\n                    \"end\": \"2026-02-16T12:50:00Z\"\r\n                },\r\n                \"recorded\": \"2026-02-16T13:47:00Z\",\r\n                \"recorder\": {\r\n                    \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PerformerRoleObservation\",\r\n                                    \"code\": \"doctor\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"outcome\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ProcedureResult\",\r\n                            \"code\": \"successful\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Успешное выполнение\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/Example24hBpMonit\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"Example24hBpMonit\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/GeneralFunctionalResearch\"\r\n                    ]\r\n                },\r\n                \"partOf\": [\r\n                    {\r\n                        \"reference\": \"Procedure/{{procedureId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2026-02-16T12:00:00Z\",\r\n                    \"end\": \"2026-02-16T12:00:00Z\"\r\n                },\r\n                \"issued\": \"2026-02-16T12:47:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"component\": [\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-24h\",\r\n                                    \"display\": \"Средняя величина АД САД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 120,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-day\",\r\n                                    \"display\": \"Средняя величина АД САД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 124,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-systolic-night\",\r\n                                    \"display\": \"Средняя величина АД САД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 109,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-24h\",\r\n                                    \"display\": \"Средняя величина АД ДАД  за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 66,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-day\",\r\n                                    \"display\": \"Средняя величина АД ДАД  день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 69,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"mean-diastolic-night\",\r\n                                    \"display\": \"Средняя величина АД ДАД  ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 62,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-day\",\r\n                                    \"display\": \"Вариабельность САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 9,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-systolic-night\",\r\n                                    \"display\": \"Вариабельность САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 13,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-day\",\r\n                                    \"display\": \"Вариабельность ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"variability-diastolic-night\",\r\n                                    \"display\": \"Вариабельность ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 6,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии САД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии САД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-systolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии САД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-24h\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД за сутки\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 2.6,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-day\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД день\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 3.9,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"hypertension-time-index-diastolic-night\",\r\n                                    \"display\": \"Индекс времени гипертонии ДАД ночь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 0,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-systolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 12.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"24h-Index-diastolic\",\r\n                                    \"display\": \"Суточный индекс степени ночного снижения АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 10.1,\r\n                            \"unit\": \"%\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"%\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-systolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД САД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 5,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/QuantityParametersFD\",\r\n                                    \"code\": \"morning-rise-diastolic-speed\",\r\n                                    \"display\": \"Скорость утреннего подъема АД ДАД\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 4,\r\n                            \"unit\": \"mm[Hg]/h\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]/h\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDRpedECG\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDRpedECG\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"548767799\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSDiagnosticMethodsFD\",\r\n                            \"code\": \"A05-10-002-001-add\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/Patient1\"\r\n                },\r\n                \"effectiveDateTime\": \"2026-02-16\",\r\n                \"issued\": \"2026-02-16T12:10:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{functDiagnRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/Example24hBpMonit\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Синусовый ритм, ЧСС 135 уд/мин, вертикальное положение ЭОС\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск процедуры функциональной диагностики",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let procedureId = jsonData.entry.find(obj => obj.resource.resourceType === \"Procedure\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"procedureId\", procedureId);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/ProcedureFunctDiagn&patient={{patientId}}&_sort=-_lastUpdated&occurrence=2026-02-16",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Procedure"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/ProcedureFunctDiagn"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                },
                {
                  "key": "occurrence",
                  "value": "2026-02-16"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия показателей функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let observationId = jsonData.entry.find(obj => obj.resource.resourceType === \"Observation\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"observationId\", observationId);\r",
                  "console.log(observationId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Observation?_profile=https://fhir.by/StructureDefinition/GeneralFunctionalResearch&patient={{patientId}}&date=2026-02-16",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Observation"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/GeneralFunctionalResearch"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "date",
                  "value": "2026-02-16"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия заключения функционального исследования",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let diagnosticReportId = jsonData.entry.find(obj => obj.resource.resourceType === \"DiagnosticReport\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"diagnosticReportId\", diagnosticReportId);\r",
                  "console.log(diagnosticReportId)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport&patient={{patientId}}&identifier=548767799",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "DiagnosticReport"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/FunctDiagDiagnosticReport"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "identifier",
                  "value": "548767799"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "useBrowser",
        "value": false,
        "type": "boolean"
      },
      {
        "key": "clientId",
        "value": "mis_agsr_web_application",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "https://pp.cisz.by/auth/api/realms/iehr/token",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "https://pp.cisz.by/auth/api/realms/iehr/auth",
        "type": "string"
      },
      {
        "key": "tokenName",
        "value": "iehr",
        "type": "string"
      },
      {
        "key": "refreshRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "tokenRequestParams",
        "value": [
          {
            "key": "Origin",
            "value": "https://oauth.pstmn.io/v1/callback",
            "enabled": true,
            "send_as": "request_header"
          }
        ],
        "type": "any"
      },
      {
        "key": "authRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "challengeAlgorithm",
        "value": "S256",
        "type": "string"
      },
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "authorization_code_with_pkce",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "patientId",
      "value": ""
    },
    {
      "key": "episodOfCareId",
      "value": ""
    },
    {
      "key": "bundleId",
      "value": ""
    },
    {
      "key": "StatusUrl",
      "value": ""
    },
    {
      "key": "preliminaryCondition",
      "value": ""
    },
    {
      "key": "serviceRequestResearchId",
      "value": ""
    },
    {
      "key": "specimenId",
      "value": ""
    },
    {
      "key": "EpisodeOfCareId",
      "value": ""
    },
    {
      "key": "ProcedureId",
      "value": ""
    },
    {
      "key": "ConditionId",
      "value": ""
    },
    {
      "key": "serviceRequestId",
      "value": ""
    },
    {
      "key": "procedureId",
      "value": ""
    },
    {
      "key": "diagnosticReportId",
      "value": ""
    },
    {
      "key": "observationId",
      "value": ""
    }
  ]
}