Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

For this quick start guide, we will be using an excellent example project from the SMART on FHIR team.  We have created a fork of the SMART on FHIR project that is configured to use the HSPC Sandbox.

  1. Gain access to the source code
  2. Using Xcode, open the project file SoF-MedList.xcodeproj
  3. (Workaround) Currently the HSPC FHIR server doesn't support the SMART extensions for summary view of the metadata.  The Swift library request a summary view.  To workaround this issue, modify the following file in the project:
    1. Image Removed
      Swift-SMART/Swift-FHIR/Sources/Client/FHIROpenServer.swift

      Code Block
      titleFHIROpenServer.swift
      	/** Return the relative path to the Conformance statement. This should be "metadata", we're also adding "_summary=true" to only request
      	the summary, not the entire statement.
      	*/
      	public func conformancePath() -> String {
      		return "metadata";//?_summary=true"
      	}
      
      
  4. Run the project
    1. Select Settings
      Image Removed
    2. Choose the HSPC in the Sandbox Connector
      Image Removed
    3. Choose Connect
      Image Removed
    4. Notice the app is connecting to the hspconsortium authentication server.  Enter your HSPC Sandbox account credentials and select Sign In
      Image Removed
    5. Scroll down the grant screen and select your option for remembering the token.  Select Authorize.
      Image Removed
    6. The app will now query your HSPC Sandbox for a list of patients.  Click on a patient to see their medications.
      Image Removed

 The project has an HSPC FHIR Server configured as a connect option.

See https://github.com/smart-on-fhir/SoF-Demo.


Get the Source Code

GitHub

Clone using HTTPS
git clone --recursive https://github.com/hspcsmart-on-fhir/SoF-MedListDemo.git
Go to the Repo
https://github.com/hspc/SoF-MedList

SMART on FHIR Original