Versions Compared

Key

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

Purpose

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

...

  • Check that $.collection.duration.system is eHealth/ucum/units dictionary, required

    • in case of error - return 422 ('value is not allowed in enum')

  • Check that $.collection.duration.code comply with $.collection.duration.system and one of SPECIMEN_DURATION_ALLOWED_CODES, required

    • in case of error - return 422 ('value is not allowed in enum')

  • Check $.collection.duration.value is not empty, is float, greater than zero

    • in case of error - return corresponding 422 ('must be greater than 0')

...

  1. Save signed content to media storage, in the bucket pointed in MEDIA_STORAGE_SPECIMEN_BUCKET chart parameter

  2. Generate accession_identifier number:

    1. Generate requisition number (see Human readable requisition number) based on the specimen id. Note: requisition number should be unique for each specimen and should not match with number of another entities. So, if generated number match to existing in DB - it should be regenerated

    2. Encode and set it into $.accession_identifier attribute

  3. Set display_value for:

    1. registered_by attribute

    2. managing_organization attribute

    3. collection.collector attribute, only if type is employee (not patient)

  4. Set context, received_time, status_reason, collection.procedure to null

  5. Set subject with hashed mpi identifier

  6. Save data to specimens collection in DB according to https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/17629118845 RC.__Specimen data model_EN

  7. Save link from media storage to the $.signed_content_links field in specimens collection

  8. Create job and return it’s id.

...