HiMS API Documentation

HIMS FHIR documentation version 1.0


Overview

Root URL

Production root URL: https://fhir-api.hmsfirst.com/r4

FHIR API requests will be made against URLs of the following format. :rootURL/:resource[?:parameters]

                    
- Resource: The FHIR standard resource to access. (Example: Patient)
- Parameters: Many API methods take optional parameters.
- Resource Identity: Please note that no IDs or Identifiers in the HiMS FHIR server are intended to be used outside of the context of their complete URL. 
- A complete URL consists of the service root url, the resource, and the parameters (if any).
                        
                      

Schema

All API access is over HTTPS. All data is sent and received as JSON or XML. Blank fields are omitted. All timestamps are returned in FHIR® standard date/dateTime formats.

We are using The US Core Implementation Guide version 6.1.0 to defines the minimum set of constraints on the FHIR resources to create the US Core Profiles

Media Types

HiMS FHIR supports the R4 FHIR standard defined media type for JSON content: application/fhir+json.

Errors

Error codes

The FHIR server will return standard HTTP Error codes, here are some you might encounter:

  • A 404 Not Found response can be received when making a request with an invalid or unsupported resource type or if a specific FHIR resource is not found for a certain ID. For example if you request the “SampleResource” that does not exist:

                                
    GET https://fhir-api.hmsfirst.com/r4/SampleResource
    
    -> HTTP/1.1 404 Not Found
                                
                              
  • A 403 Forbidden response is received when making a request the client does not have permissions to make. For example if your token only allows access to one Patient’s resources but you request all Patient resources:

                                
    GET https://fhir-api.hmsfirst.com/r4/SampleResource
    
    -> HTTP/1.1 403 Forbidden
                                  
                              

OperationOutcome

For most errors we will include a response body in the form of an OperationOutcome FHIR resource. You will find more information about the error within the resource in the issue.details.


{
  "resourceType": "OperationOutcome"
  "issue": [
    {
      "code": "invalid",
      "details": {
            "text": "Not found"
        },
        "severity": "error"
    }
  ],
}                        
                      

Validation

When making create or update requests to the FHIR server the payloads will be validated according to the FHIR Release 4 specifications. Any get or search requests will return payloads that conform to the FHIR specifications.