Module: SMARTAppLaunch::ClientWaitDialogDescriptions
- Included in:
- SMARTClientAccessAppLaunchConfidentialAsymmetricInteraction, SMARTClientAccessAppLaunchConfidentialSymmetricInteraction, SMARTClientAccessAppLaunchPublicInteraction, SMARTClientAccessBackendServicesConfidentialAsymmetricInteraction
- Defined in:
- lib/smart_app_launch/client_suite/client_descriptions.rb
Instance Method Summary collapse
- #access_wait_dialog_access_response_and_continue_suffix(client_id, resume_pass_url) ⇒ Object
- #access_wait_dialog_app_launch_access_prefix(client_id, authentication_approach, fhir_base_url) ⇒ Object
- #access_wait_dialog_backend_services_access_prefix(client_id, fhir_base_url) ⇒ Object
- #access_wait_dialog_ehr_launch_instructions(smart_launch_urls, fhir_base_url) ⇒ Object
Instance Method Details
#access_wait_dialog_access_response_and_continue_suffix(client_id, resume_pass_url) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/smart_app_launch/client_suite/client_descriptions.rb', line 102 def access_wait_dialog_access_response_and_continue_suffix(client_id, resume_pass_url) <<~SUFFIX Inferno will respond to requests with either: - A resource from the Bundle in the **Available Resources** input if the request is a read matching a resource type and id found in the Bundle. - Otherwise, the contents of the **Default FHIR Response** if provided. - Otherwise, an OperationOutcome indicating nothing to echo. [Click here](#{resume_pass_url}?token=#{client_id}) once the client has made a data access request. SUFFIX end |
#access_wait_dialog_app_launch_access_prefix(client_id, authentication_approach, fhir_base_url) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/smart_app_launch/client_suite/client_descriptions.rb', line 73 def access_wait_dialog_app_launch_access_prefix(client_id, authentication_approach, fhir_base_url) <<~PREFIX **Launch and Access** The app has been registered with Inferno's simulated SMART server as a #{authentication_approach} client with client id `#{client_id}`. Perform a standalone launch to connect to Inferno's simulated FHIR server at: `#{fhir_base_url}` PREFIX end |
#access_wait_dialog_backend_services_access_prefix(client_id, fhir_base_url) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/smart_app_launch/client_suite/client_descriptions.rb', line 60 def access_wait_dialog_backend_services_access_prefix(client_id, fhir_base_url) <<~PREFIX **Access** Use the registered client id (#{client_id}) to obtain an access token using SMART Backend Services and use that token to access a FHIR endpoint under the simulated server's base URL: `#{fhir_base_url}` PREFIX end |
#access_wait_dialog_ehr_launch_instructions(smart_launch_urls, fhir_base_url) ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/smart_app_launch/client_suite/client_descriptions.rb', line 87 def access_wait_dialog_ehr_launch_instructions(smart_launch_urls, fhir_base_url) if smart_launch_urls.present? launch_key = SecureRandom.hex(32) output(launch_key:) launch_query_string = Rack::Utils.build_query({ iss: fhir_base_url, launch: launch_key }) ehr_launch_locations = smart_launch_urls.split(',').map { |launch_url| "#{launch_url}?#{launch_query_string}" } ehr_launch_links_string = ehr_launch_locations.map { |url| "- [launch](#{url})" }.join("\n") "\n\nOr open one of the following links in a new tab to perform an EHR launch:\n#{ehr_launch_links_string}\n\n" else '' end end |