Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Page Properties
idAPI_Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/preperson/create-preperson

Посилання на Apiary або Swagger

Resource

/api/prepersons

Посилання на ресурс, наприклад: /api/persons/create

Scope

preperson:write

Scope для доступу

Components

Patient registry

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

mpi/api

il/api (rpc)

fe/admin-web

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

REST

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

POST

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

Sync

Метод є синхронним чи асинхронним?

Public/Private/Internal

Public

Потрібно зазначити тип методу за ступенем доступності

Logic

  1. Only authenticated and authorized SPECIALIST, ASSISTANT, RECEPTIONIST employees can register prepersons.

  2. Prepersons can be registered in OUTPATIENT and EMERGENCY legal entities.

  3. Prepersons shoul be registered only with external_id as a required field. Other are optional

  4. Preperson registers as separate record in MPI.prepersons table. On create ID of preperson sholdn’t match with ID of existent person.

  5. Service should return preperson_id.

  6. Preperson has been created without using digital sign.

...

  1. Verify the validity of access token

    Return
    • return 401 in case validation fails

  2. Check user scopes in order to perform this action (scope = 'preperson:write')

    Return
    • return 403 in case invalid scope(s)

  3. If BLOCK_UNVERIFIED_PARTY_USERS is true, then check party's data match following condition: verification_status != NOT_VERIFIED or (verification_status = NOT_VERIFIED and updated_at <= current_date - UNVERIFIED_PARTY_PERIOD_DAYS_ALLOWED):

    • in case not match - return 403 ("Access denied. Party is not verified")

Headers

Content-Type:application/json

...

Insert preperson to MPI

prepersons table

Parameter

Source

Description

id

string

Autogenerated.

first_name

Request: first_name

second_name

Request: second_name

last_name

Request: last_name

gender

Request: gender

Gender, required. The values correspond to GENDER dictionary

birth_date

Request: birth_date

emergency_contact

Request: emergency_contact

death_date

date

By default is null on create

note

Request: note

status

string

Status, required. By default is “active”

external_id

Request: external_id

Identifier from external system. Required

is_active

bool

Technical flag. By default is true.

inserted_by

uuid

Extract user from token

inserted_at

timestamp

Get current date-time

updated_by

uuid

Extract user from token

updated_at

timestamp

Get current date-time

Response structure

See on Apiary

...