Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Paweł Nawrocki
Paweł Nawrocki(Deactivated)Reporter
Chongsun Ahn
Chongsun AhnStory Points
3
Original estimate
1w 2d
Time tracking
Components
Sprint
Add sprint
Fix versions
Priority
Time Assistant
Created November 8, 2016 at 9:09 PM
Updated January 20, 2017 at 12:16 PM
Resolved December 27, 2016 at 1:46 PM
All requisitions have an associated facility and program. All requisition endpoints in the Requisition Service, when validating a request, must check that the facility currently supports the program, in order to continue its logic. This is currently not being done in the requisition code and the check needs to be added to all endpoints.
This check can be fulfilled by calling the Reference Data Service's "get facility supported programs" endpoint (URL: /api/facilities/facilityId, the facility DTO has a supportedPrograms property). This work is being done in OLMIS-1332. Once that endpoint has been implemented, the requisition code needs to be refactored to call that new endpoint.
This is not the same as the hasRight check, since it doesn't deal with permissions, but would happen at the same time in the requisition code.
Acceptance Criteria
Create helper code that calls the reference data endpoint with the correct parameters
Have all of the requisition endpoints use this new helper code to do the extra check
Update tests if necessary