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/update-preperson

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

Resource

/api/prepersons/{{id}}

Посилання на ресурс, наприклад: /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

PATCH

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

Logic

  1. Only authenticated and authorized SPECIALIST, ASSISTANT, RECEPTIONIST employees can update external_id of preperson.

  2. Preperson can be updated only in OUTPATIENT or EMERGENCY legal entity type, if identifier of preperson is being known (returns after Create preperson).

  3. Only note and status fields can not be updated.

  4. Update allowed for prepersons with status = active.

Input parameters

Input parameter

Values

Type

Description

Example

id

String

MPI identifier of the preperson. Required

7c3da506-804d-4550-8993-bf17f9ee0402

Request structure

See on Apiary

...

  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)

Headers

Content-Type:application/json

...

Update object in DB

prepersons table

Parameter

Source

Description

external_id

Request: external_id

Identifier from external system. Get from request body

first_name

Request: first_name

 

second_name

Request: second_name

 

last_name

Request: last_name

 

gender

Request: gender

 

birth_date

Request: birth_date

 If submitted, set status = inactive

emergency_contact

Request: emergency_contact

 

death_date

Request: death_date

note

Request: note

updated_at

timestamp: now()

Get current date-time

updated_by

uuid

Extract user from token

Response structure

See on Apiary

...