Versions Compared

Key

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

...

This WS allows to mark Specimen as entered-in-error.

Specification

Link

Apiary

Resource

 /api/patients/patient_id/specimens/id/actions/

Scope

 specimen:cancel

Components

 Specimen

Microservices

 

Protocol type

 REST

Request type

 PATCH

Sync/Async

 Async

Public/Private/Internal

 Public

Key points

  1. Only an employee who registered a Specimen, has an approval or a med_admin from the same legal entity, if they have an appropriate scope, are able to cancel the Specimen.

  2. Request should be signed with DS.

  3. The specimen is cancelled asynchronously

  4. Signed content of a Specimen must be equal to the Specimen stored in DB. See Get Specimen details

  5. status_reason must be added to signed content

  6. status must be changed to entered_in_error for the purpose of displaying in the signed content

Logic

https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/17629118915/RC.#%D0%9F%D0%BE%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%BD%D1%8F-%D0%97%D1%80%D0%B0%D0%B7%D0%BA%D0%B0-%D0%BF%D0%BE%D0%BC%D0%B8%D0%BB%D0%BA%D0%BE%D0%B2%D0%B8%D0%BC-%D0%B1%D0%B5%D0%B7-%D0%B2%D0%B7%D0%B0%D1%94%D0%BC%D0%BE%D0%B4%D1%96%D1%97-%D0%B7-%D0%BF%D0%B0%D1%86%D1%96%D1%94%D0%BD%D1%82%D0%BE%D0%BC

 

Input parameters

Input parameter

Values

Type

Description

Example

patient_id

 

String

Unique patient identifier

7075e0e2-6b57-47fd-aff7-324806efa7e5

id

 

String

Unique specimen identifier

aff00bf6-68bf-4b49-b66d-f031d48922b3

 

Dictionaries

specimen_cancel_reasons

Request structure

See on Apiary

...

See on Apiary

 

HTTP status codes

HTTP status code

Message

What caused the error

200

 

 

401

Invalid access token

 

403

  • Access denied. Party is deceased

  • Your scope does not allow to access this resource. Missing allowances: specimen:cancel

 

409

  • Does not match the signer drfo

  • client_id refers to legal entity that is not active

  • User is not allowed to perform actions with an enity that belongs to another legal entity

  • Employee is not the one who registered the specimen, doesn't have an approval or required employee type

  • Specimen in status <status> cannot be cancelled'

 

422

  • Invalid signed content

  • value is not allowed in enum

  • Signed content doesn't match with previously created specimen