Versions Compared

Key

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

...

Table of Contents

...

View file
nameService request statuses.drawio

Statuses of Service request

Status

Usage StateIn ProgressService Request is being processed i.e. provision of the ordered service has been started, but not completed yetNCompletedService Request has been processedYEntered In Error

Conditions

Description

Terminal State (Y|N)Activeused_by_legal_entity is emptySigned and active for usage service request, patient is not in the queueNActiveused_by_legal_entity is not emptyService Request is used by some legal entity i.e. patient is in the queue but provision of the ordered service has not been started yetN

Method to turn the status

ACTIVE

 Service request has been created.

Service request has been created and activated.

Create Service Request

COMPLETED

Active service request. At least one not entered_in_error medical event has been related to it.

Final status, it sets manually. Describes that the service request has been successfully finalized.

Complete Service Request

RECALLED

Active service request.

Final status, it sets automatically or manually. Service Request is recalled because of absence of necessity/autoexpiration and other reasons (for example fraud)

Recall Service Request

Service request autoexpiration

ENTERED_IN_ERROR

Active service request.

Final status, it sets manually. Service Request is cancelled because of human mistake in the process of creation

YCancelledService Request is cancelled because of absence of necessity and other reasons (for example fraud)Y

State Transitions

...

used_by_legal_entity is populated by calling legal entity

...

used_by_legal_entity is cleared

...

Make Service Request As In Progress

Submit Encounter Data Package

...

Mark Service Request As Completed (Kafka Consumer on Close Episode)

Dispense Service Request

...

Recall Service Request

Auto Cancel Service Request

...

Open Questions 

Program processing statuses of Service request

The program processing status is set only for service requests with a medical program, absent for requests w/o medical program.

Status

Conditions

Description

Method to turn the status

NEW

 Service request has been created with a program.

Service is IN_QUEUE (obsolete flow)

Available for usage service request with a program.

Also, can be set by returning from IN_QUEUE by Release Service request API (obsolete flow, this api will be deprecated)

Create Service Request

[TO BE DEPRECATED] Release Service Request

IN_QUEUE

Service request has NEW program processing status

Obsolete status of service requests. Will be eliminated with time, replaced by IN_PROGRESS.
Service Request is used by some legal entity i.e. patient is in the queue but provision of the ordered service has not been started yet

Use Service Request

IN_PROGRESS

Service request has NEW program processing status

Service request has IN_QUEUE program processing status (obsolete flow)

Service Request is processing or reserved for usage i.e. provision of the ordered service has been started, but not completed yet

Use Service Request

[TO BE DEPRECATED] Change service request status to In progress

COMPLETED

Service request has IN_PROGRESS program processing status

Service Request has been processed

Complete Service Request