Versions Compared

Key

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

...

  1. legal entity(client_id)

    1. Check legal_entity.type in me_allowed_transactions_le_types config parameter and legal_entity.status = ACTIVE 

      1. in case of error return 409 "Action is not allowed for the legal entity"

  2. service request

    1. validate SR.program_processing_status in (new,In Queue,In Progress)

      1. in case error return 409, “service request has wrong status“

    2. validate SR.status = Active

      1. in case error return 409, “service request has wrong status“

  3. program

    1. For each program validate it is an existing service program with type=service

      1. in case not found or is_active==false write result in Data collection according to apiary

      2. in case type!= service write result in Data collection according to apiary - "Invalid program type"

    2. For each program validate that service(or service_group) is an active member of the program

      1. Select is_active from PRM.program_services where service_id(or group_id) == $.signed_content.code.identifier.value and program_id=$.program.identifier.value

        1. if not found or is_active==false write result in Data collection according to apiary - "Service is not included in the program"

    3. For each program validate that doctor is allowed to create service request with the program for the current patient

      1. according to ABAC rules

        1. in case error return "User is not allowed to create service request with the program for the patient"

...