ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Process diagram

StepDescription
Get pending declarations

External system call E-Health.IL to get all declarations in status Pending.

GET_DeclarationList

Apiary: service description

Query parameters:

status=Pending
legal_entity_id={ID}

URL example:

api/declarations?legal_entity_id={ID}status=Pending

Response format:

Response body
{
  "meta": {
    "url": "http://example.com/resource",
    "type": "object",
    "code": 200,
    "idempotency_key": "idemp-ssjssdjoa8308u0us0",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": [
    {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "start_date": "2017-03-02T10:45:16.000Z",
      "end_date": "2017-03-02T10:45:16.000Z",
      "person": {
        "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович"
      },
      "employee": {
        "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "position": "лікар",
        "party": {
          "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
          "first_name": "Петро",
          "last_name": "Іванов",
          "second_name": "Миколайович",
          "email": "email@example.com",
          "phones": [
            {
              "type": "MOBILE",
              "number": "+380503410870"
            }
          ]
        }
      },
      "legal_entity": {
        "id": "d290f1ee",
        "name": "Клініка Борис",
        "short_Name": "Борис",
        "legal_form": "ПІДПРИЄМЕЦЬ-ФІЗИЧНА ОСОБА",
        "edrpou": "5432345432"
      }
    }
  ],
  "paging": {
    "limit": 20,
    "cursors": {
      "starting_after": "56c31536a60ad644060041af",
      "ending_before": "56c31536a60ad644060041aa"
    },
    "size": 1000,
    "has_more": false
  }
}
Choose appropriated declarationExternal system starts to processing any element from declaration list received in previous step.
Get declaration by idSystem call E-Health.IL to get specific declaration from previous step.
GET_Declaration

Apiary: service description

Query parameters:

id={declaration_id}

URL example:

/api/declarations/{id}

Response format:

Response body
{
  "meta": {
    "url": "http://example.com/resource",
    "type": "object",
    "code": 201,
    "idempotency_key": "idemp-ssjssdjoa8308u0us0",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": {
    "id": "b075f148",
    "start_date": "2017-03-02T10:45:16.000Z",
    "end_date": "2017-03-02T10:45:16.000Z",
    "person": {
      "first_name": "Петро",
      "last_name": "Іванов",
      "second_name": "Миколайович",
      "birth_date": "1991-08-19T00:00:00.000Z",
      "birth_place": "Вінниця, Україна",
      "gender": "MALE",
      "email": "email@example.com",
      "tax_id": "3126509816",
      "secret": "secret",
      "documents": [
        {
          "type": "PASSPORT",
          "number": "120518"
        }
      ],
      "addresses": [
        {
          "type": "RESIDENCE",
          "country": "UA",
          "area": "Житомирська",
          "region": "Бердичівський",
          "city": "Київ",
          "city_type": "CITY",
          "street": "вул. Ніжинська",
          "building": "15",
          "apartment": "23",
          "zip": "02090"
        }
      ],
      "phones": [
        {
          "type": "MOBILE",
          "number": "+380503410870"
        }
      ],
      "authentication_methods": [
        {
          "type": "OTP",
          "phone_number": "+380508887700"
        }
      ],
      "emergency_contact": {
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович",
        "phones": [
          {
            "type": "MOBILE",
            "number": "+380503410870"
          }
        ]
      },
      "confidant_person": {
        "relation_type": "trustee",
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович",
        "birth_date": "1991-08-19T00:00:00.000Z",
        "birth_place": "Вінниця, Україна",
        "gender": "MALE",
        "tax_id": "3126509816",
        "documents": [
          {
            "type": "PASSPORT",
            "number": "120518"
          }
        ],
        "phones": [
          {
            "type": "MOBILE",
            "number": "+380503410870"
          }
        ]
      },
      "renewal_consent": true,
      "patient_signed": true,
      "disclosure_consent": true,
      "process_data_consent": true
    },
    "employee": {
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "position": "лікар",
      "party": {
        "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович",
        "email": "email@example.com",
        "phones": [
          {
            "type": "MOBILE",
            "number": "+380503410870"
          }
        ]
      }
    },
    "legal_entity": {
      "name": "Клініка Борис",
      "short_Name": "Борис",
      "legal_form": "ПІДПРИЄМЕЦЬ-ФІЗИЧНА ОСОБА",
      "public_name": "ЦПМСД №1",
      "edrpou": "5432345432",
      "licenses": [
        {
          "license_number": "fd123443",
          "issued_by": "Кваліфікацйна комісія",
          "issued_date": "2017",
          "expiry_date": "2017",
          "kved": "86.1",
          "what_licensed": "реалізація наркотичних засобів"
        }
      ],
      "accreditation": {
        "category": "друга",
        "issued_date": "2017",
        "expiry_date": "2017",
        "order_no": "fd123443",
        "order_date": "2017"
      },
      "addresses": [
        {
          "type": "RESIDENCE",
          "country": "UA",
          "area": "Житомирська",
          "region": "Бердичівський",
          "city": "Київ",
          "city_type": "CITY",
          "street": "вул. Ніжинська",
          "building": "15",
          "apartment": "23",
          "zip": "02090"
        }
      ],
      "phones": [
        {
          "type": "MOBILE",
          "number": "+380503410870"
        }
      ],
      "email": "email@example.com",
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
    },
    "scope": "family doctor",
    "active": true,
	"media_storage": [
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/SjhYsnx.jpg",
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/JnvHsqIW.jpg",
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/NbbShPzQ.jpg"
		]  
  }
}
Get content by IDCall IntegrationLayer to get MediaContent related to current declaration.
GET_MediaStorageContent
  • Parse Response from step GET_Declaration

JPATH:

$.data.media_storage

Example:

MediaStorageArray
{
  {
	...
	"scope": "family doctor",
    "active": true,
	"media_storage": [
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/SjhYsnx.jpg",
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/JnvHsqIW.jpg",
		"http://ehealth.nebo15.com/media_content_storage/msp/declaration_requests/7f93-4fc2-b2ec-2d81b19a9b7b/NbbShPzQ.jpg"
		]  
	}
}
  • For each record (or only some documents can be processed, depends on the type of implementation) in array call web-service:

Apiary: service description

Query parameters:

id={declaration_request_id}
filename={media_storage_filename}

URL example:

/media_content_storage/msp/declaration_requests/{id}/{filename}
VerificationUser conducts declaration verification according to internal rules, and make decision.
Update declaration status to Verification PassedCall web-service PATH_Declaration to send verification result "Verification Passed".
Update declaration status to Verification Rejected
PATCH_Declaration

Apiary: service description

Query parameters:

id={declaration_id}

URL example:

/api/declarations/{id}

Request format:

Response body
 

Response format:

Response body
 
  • No labels