Versions Compared

Key

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

...

  1. contracts.type==reimbursement

  2. contracts.status==VERIFIED

  3. Contract dates: start_date <= current_date & end_date >= current_date

  4. contracts.contractor_legal_entity_id=token.client_id

  5. $division_id in contract_divisions

  6. contracts.medical_program_id==$.medical_program_id

  7. сontracts.is_suspended ==false

...

  1. Verify Care plan:

    1. It should be in active status

      1. in case of error - return 409 (message: "Invalid care plan status")

  2. Verify care plan Activity:

    1. It has scheduled, in_progress status

      1. in case of error - return 409 (message: "Invalid activity status")

Validate division

If division_id submitted:

  1. Validate division is active

    1. in case of error - return 409 ("Division is not active")

  2. Validate division belongs to user's legal entity

    1. in case of error - return 409 ("Division does not belong to user's legal entity")

  3. If chart parameter DISPENSE_DIVISION_DLS_VERIFY is on, then validate division is DLS verified (dls_verified=true)

    1. in case of error - return 409 "Division is not verified in DLS"

  4. If chart parameter MEDICAL_PROGRAM_PROVISION_VERIFY, then check division provide each submitted program. For each medical program provision validate:

    1. it is exist and active:

      1. in case of error - return status=INVALID for a program, rejection_reason= "Division does not provide the medical program"

    2. it relates to the actual reimbursement contract: contract.start_date <= current_date <= contract.end_date, is_active = true, status = VERIFIED.

      1. in case of error - return status=INVALID for a program, rejection_reason="Medical program provision is not related to any actual contract for the current date"

Validate code

  1. Check that code in request is equal to code in medication_request (or both is empty)

    1. In case code exists in request - it should match with code in medication_request

      1. Return 401 in case code doesn't match (message = "Incorrect code")

    2. In case code is missing in request - check that code in medication_request is NULL

      1. Return 401 in case code in medication_request is not NULL (message = "Missing or Invalid code")

...

Validation 1: Min package quantity is equal to package quantity

  1. Check that requested discount price is equal to allowed reimbursement amount for the requested medication quantity (the way how to calculate allowed reimbursement amount is below)

  • Code Block
    discount_amount <= reimbursement_amount * (medication_qty/package_qty)

...