ЕСОЗ - публічна документація
Test Cases for Create Episode
# | Description | Expected result | Actual result | |
---|---|---|---|---|
1 | Valid input data | record created in DB | record created in DB | |
2 | Wrong scopes | token of user, who doesn't have the scope | 403 | 403 |
3 | Declaration validation(link to test cases) handled | id of the patient, who does not have a declaration with the doctor | 403 | + |
4 | Patient status | id of the patient that is not active | 409 | + |
5 | PK is nunique | $.id not unique | 422 | + |
6 | Managing organization is not a legal_entity | $.managing_organization.identifier.type.coding.[0].code != "legal_entity" | 422 | + |
7 | Attempt to create episode for another legal_entity | $.managing_organization.identifier.value != token.client_id | 422 | + |
8 | Start date is not in future | $.period.start !<= current_date | 422 | + |
9 | End date is present in not request | end_date | + | |
10 | Care_manager is not an employee | $.care_manager.identifier.type.coding.[0].code != "employee" | 422 | + |
11 | Care_manager is not a DOCTOR | PRM.employee.type != "DOCTOR" | 409 | + |
12 | Care_manager is not active | PRM.employee.status!= "active" | 409 | + |
13 | Care_manager is not from the same legal_entity | PRM.employee.legal_entity! = token.client_id | 409 | + |
ЕСОЗ - публічна документація