ЕСОЗ - публічна документація

Two registries tests

#DescriptionPreconditionsStep by step Expected resultActual result
1

Get drugs

(New attributes in response)

At least one medical program correctly configured.

New attributes for program medications is not set (start_date, end_date, registry_number)

  1. Log In as DOCTOR
  2. Invoke Get Drugs

Response 200

  • object program_medications exists in response
  • new attributes exists in response 
  • program_medication_id exists in response

2

Get drugs

(Only active program medication is returned)

At least one medical program correctly configured.

There are 4 program medications:

  1. Validity period - start_date in the past, end_date in the future
  2. Validity period - start_date in the past, end_date in the past
  3. Validity period - start_date in the future, end_date in the future
  4. Validity period - start_date is NULL, end_date is NULL
  1. Log In as DOCTOR
  2. Invoke Get Drugs

Response 200

  • object program_medications exists in response
  • only two program_medications in array (#1, #4)

3

Qualify medication request

(New attributes in response)

Medical program correctly configured. 

Medication request exists and is active. Dosage has one active program_medication

  1. Log In as PHARMACIST
  2. Invoke Qualify medication request

Response 200

  • one participant is returned
  • new attributes exists in response (id, start_date, end_date, registry_number)

4

Qualify medication request

(Only active program medication is returned)

Medical program correctly configured. 

Medication request exists and is active. Dosage has one active and one inactive program_medications

  1. Log In as PHARMACIST
  2. Invoke Qualify medication request

Response 200

  • only one active participant is returned

5

Qualify medication request

(Error when there are no active program_medications)

Medical program correctly configured. 

Medication request exists and is active. Dosage has one inactive program_medication (end_date in the past)

  1. Log In as PHARMACIST
  2. Invoke Qualify medication request

Response 200

  • medication request qualified with error

6

Create medication dispense

(Create dispense without program_medication_id)

Medical program correctly configured. 

Medication request exists and is active. There is only one program medication related to specified medication

  1. Log In as PHARMACIST
  2. Create medication dispense without program_medication_id

Response 200

  • medication dispense created

7

Create medication dispense

(Create dispense with program_medication_id)

Medical program correctly configured. 

Medication request exists and is active. There is only one program medication related to specified medication

  1. Log In as PHARMACIST
  2. Create medication dispense with program_medication_id

Response 200

  • medication dispense created

8

Create medication dispense

(Create dispense without program_medication_id with more than one program medications available)

Medical program correctly configured. 

Medication request exists and is active. There are two program medications related to specified medication

  1. Log In as PHARMACIST
  2. Create medication dispense without program_medication_id

Response 200

  • medication dispense created with the newest program medication

9

Create medication dispense

(Create dispense with inactive program medication)

Medical program correctly configured. 

Medication request exists and is active. Program medication's end_date in the past

  1. Log In as PHARMACIST
  2. Create medication dispense with program_medication_id
Response 409
10

Create medication dispense

(Create dispense with incorrect program medication)

Medical program correctly configured. 

Medication request exists and is active.

  1. Log In as PHARMACIST
  2. Create medication dispense with incorrect program medication (related to another medication)
Response 409

ЕСОЗ - публічна документація