Configure application

The My Health Services application consumes services that are accessible to residents and visitors in your community. You can configure My Health Facilities application and share it with residents and visitors. Residents and visitors can then access the application on their smartphones, tablets, and desktop computers.

Configuring routing

The application can draw routes and provide directions using the ArcGIS Online World Route Service. The World Route Service is an ArcGIS Online for organizations subscription service that uses credits when routes are generated.

Learn more about credit usage when creating simple routes

To use routing for this application, an ArcGIS Online for organizations subscription is required and routing must be enabled in the configuration file. To use this application without drawing routes and providing directions, disable routing in the configuration file. When routing is disabled, the application maintains all other functionality.

To disable or enable routing in this application, complete the following steps:

  1. In Windows Explorer, browse to the Application\MyHealthServices\js folder and open the config.js file in Microsoft Notepad or another text editor.
  2. Change the value of the SearchforDirections tag in the Driving Directions Settings section of the file to false or true depending on how you would like to enable your application.
    false Application will not draw routes or provide directions.
    true Application will draw routes and provide directions.
                      
    // Set this to true to show directions on map
    SearchforDirections: true
    },
                      
                  

Configuring the application

Modify the application configuration file to use the services you previously published.

To configure the application, complete the following steps:

  1. In Windows Explorer, browse to the Application\MyHealthServices\js folder and open config.js in Microsoft Notepad or another text editor.
  2. Replace each URL with the path to your corresponding services then save the file and exit.
    http://yourserver/arcgis/rest/services/Utilities/Geometry/GeometryServer Geometry service
    http://yourserver/arcgis/rest/services/HealthFacility/MapServer/0 Adult Care
    http://yourserver/arcgis/rest/services/HealthFacility/MapServer/1 Birth Services
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/2 Body Art
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/3 Dialysis
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/4 Habilitation Facility
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/5 Hearing
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/6 Home Health
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/7 Hospice
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/8 Outpatient Surgery
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/9 Residential Care
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/10 Substance Abuse
    http://yourserver/ArcGIS/rest/services/HealthFacility/MapServer/11 Hospitals and Clinics

Add and register an application with your ArcGIS Online organizational account (Optional)

This application can draw routes and provide directions using the World Route Service. To access this functionality, the application must be registered with an ArcGIS Online for organizations account.

These steps are not necessary if routing and directions will not be made available in your application. If routing has been disabled for your application, skip to configuring the proxy.

To register your application, complete the following steps:

  1. Add the application to your ArcGIS Online for organizations account using the following parameters:
    • The item is: An Application and item type is Web Mapping
    • URL: Type the URL for you application
    • Purpose: Ready To Use
    • API: JavaScript
    • Title: Type the application title
    • Tags: Add the application tags
  2. Register your app using the following parameters:
    • App Type: Browser
    • Redirect URI: Type the fully qualified URI for your server and the web server port. This is usually port 80, not the port for ArcGIS for Server (port 6080), for example http://servername.domain:[80].
  3. Copy the App ID and App Secret values to a text file for use later in the configuration.

Configuring the proxy

The proxy file gives the application access to the location of the services.

To configure the proxy, complete the following steps:

  1. In Windows Explorer, browse to Application\MyHealthServices\proxy folder and open proxy.config in Microsoft Notepad or another text editor.
  2. Copy the App ID and App Secret values from the text file to the appropriate tags, if you've enabled routing and registered your application with your ArcGIS Online organizational account, otherwise skip to step 4 below.
    App ID clientId="App ID"
    App Secret clientSecret="App Secret"
  3. Set the rateLimit and rateLimitPeriod values.
    Rate Limit rateLimit="50"
    Rate Limit Period (in minutes) rateLimitPeriod="10"
  4. Enter the URL of each ArcGIS Services Directory referenced in the configuration of the application. Each URL must be enclosed in a set of serverURL tags. If default URLs are listed, ensure these URLs are not removed. All web traffic goes through the proxy and the default URLs are required by the application.
  5. Save the file and exit.
Top