Class: DaVinciPDexTestKit::PDexPayerClient::MockServer::ExportEndpoint
- Inherits:
-
ProxyEndpoint
- Object
- Inferno::DSL::SuiteEndpoint
- ProxyEndpoint
- DaVinciPDexTestKit::PDexPayerClient::MockServer::ExportEndpoint
- Includes:
- URLs
- Defined in:
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_endpoint.rb
Constant Summary
Constants included from URLs
URLs::AUTHORIZATION_PATH, URLs::BASE_FHIR_PATH, URLs::BINARY_PATH, URLs::EVERYTHING_PATH, URLs::EXPORT_PATH, URLs::EXPORT_STATUS_PATH, URLs::INSTANCE_PATH, URLs::MEMBER_MATCH_PATH, URLs::METADATA_PATH, URLs::PATIENT_INSTANCE_PATH, URLs::PATIENT_PATH, URLs::RESOURCE_PATH, URLs::RESUME_CLINICAL_DATA_PATH, URLs::RESUME_FAIL_PATH, URLs::RESUME_PASS_PATH, URLs::TOKEN_PATH
Instance Method Summary collapse
Methods included from URLs
#base_url, #client_fhir_base_url, #fhir_base_url, #suite_id
Methods inherited from ProxyEndpoint
#server_proxy, #test_run_identifier, #update_result
Instance Method Details
#make_response ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_endpoint.rb', line 12 def make_response http_headers_as_hash = request.env.select { |k,v| k.start_with? 'HTTP_'}.transform_keys { |k| k.sub(/^HTTP_/, '').split('_').map(&:capitalize).join('-') } server_response = server_proxy.get do |req| req.url 'Group/pdex-Group/$export' # TODO: change from static response req.headers = http_headers_as_hash.merge(server_proxy.headers) end response.headers["content-location"] = server_response.headers["content-location"]&.gsub(/(.*)\?/, "#{fhir_base_url}/$export-poll-status?") response.body = server_response.body response.status = server_response.status end |
#tags ⇒ Object
23 24 25 |
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_endpoint.rb', line 23 def [EXPORT_TAG] end |