Setting up Microsoft FHIR Server on your laptop & FHIR-ing up…

Hello my FHIR-ly friends, and welcome to my first post on Microsoft FHIR server!

Over the last few months, i worked with Microsoft Open Source FHIR Server (OSS) and wanted to share my experience on setting it up and running locally. Yes, you may run it locally without internet 🙂

This might be helpful, if you just starting to learn HL7 FHIR (https://www.hl7.org/fhir/) and don’t / can’t spin one on your cloud environment of choice. You might also use any publicly available FHIR endpoints, discover-able from the link above.

Following steps will assist you in spinning it with a Cosmos DB (emulator flavor) or a more traditional SQL Server instance. Well, let’s start right away!

  • In VS open Microsoft.Health.Fhir.sln & restore the packages
  • Run the build process & set Microsoft.Health.Fhir.Stu3.Web  as a start-up project
  • Note: You could also use Microsoft.Health.Fhir.R4.Web  – based on fhir resource versions that you are planning to load.
  • Made following changes in appsettings.json
"Security": {
      "Enabled": true,
      "EnableAadSmartOnFhirProxy": false,
        "Authentication": {
            "Audience": "fhir-api",
            "Authority": "https://localhost:44348"
        },
      "PrincipalClaims": [
        "iss",
        "oid"
      ],
      "Authorization": {
        "Enabled": true
      }
    },

Option 1: Selecting Cosmos DB data layer

Option 2: Select SQL data layer & start project (aka Press F5)

Lunch the FHIR server locally by pressing F5 – should look like following screen:

  • Run postman Query for Server CapabilityStatement: https://localhost:44348/metadata?_format=json 
  • Check the Postman SSL certification verification is off, or accept the dotnet development certificate.
  • Retrieve token to access the FHIR Server resources:
POST https://localhost:44348/connect/token
BODY: client_id=serviceclient&client_secret=serviceclient&grant_type=client_credentials&scope=fhir-api

Hope you got so far & starting your celebration… Yes, my friend, you did it! Congratulations!!!

You are ready to play with FHIR 🔥 … Just remember, to follow the FHIR safety rules that we will cover on next post 🙂 Stay tuned and let me know what are you thoughts in the comments. Thanks!

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *