Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This WS allows to create Specimen entity by employees without submitting Encounter Data Package.

Specification

Link

 Apiary

Resource

 api/patients/patient_id/specimens

Scope

 specimen:write

Components

 Specimen

Microservices

 

Protocol type

 REST

Request type

 POST

Sync/Async

 Async

Public/Private/Internal

 Public

Key points

  1. Only authenticated and authorized employee with appropriate scope can create a Specimen.

  2. Request should be signed with DS.

  3. The specimen is created asynchronously

  4. The specimen can be created both for persons and for prepersons.

...

https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/17629119370/RC.+Specimen+dictionaries+and+configurable+parameters#Configurable-parameters

Input parameters

Input parameter

Values

Type

Description

Example

patient_id

 

String

Unique patient identifier

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

Dictionaries

https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/17629119370/RC.+Specimen+dictionaries+and+configurable+parameters#Dictionaries

...

Expand
titleResponse example
Code Block
{
  "data": {
    "status": "pending",
    "eta": "2018-08-02T10:45:16.000Z",
    "links": [
      {
        "entity": "job",
        "href": "/Jobs/NBXk9EyErUZv1RhXgyvgg"
      }
    ]
  },
  "meta": {
    "code": 202,
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  }
}

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

 

404

not found

409

  • Patient is not verified

  • 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

  • Does not match the signer drfo

  • Invalid signed content

  • Specimen with such id is not found

  • Invalid specimen status

  • value is not allowed in enum

  • Service request not found

  • Service request is not active or in progress

  • Service request is used by another legal entity

  • Service request expiration date must be greater than or equal to current date

  • User is not allowed to register a specimen for the employee

  • Invalid employee status

  • Employee doesn't belong to your legal entity

  • Specimen with id <id> already exists

  • Legal entity with such id is not found

  • Managing_organization does not correspond to user's legal_entity

  • Employee not found

  • Patient not found

  • Patient is not active

  • Only one of the parameters must be present

  • Date must be greater than <current date - SPECIMEN_MAX_DAYS_PASSED>

  • Must be in past

  • Start date must be in past

  • End date must be greater than or equal the start date

  • End date must be in past

  • 'Collected quantity must not be exceeded by the specimen quantity distributed among the containers

  • Does not match the code of the collected quantity