Agastha Patient API Documentation
Introduction

This guide is written for third party developers, including patients, who are developing software applications for accessing Protected Health Information (PHI) based on this documentation of an open API. This document will describe registration, syntax, functionality and errors/exceptions they will see when using the FHIR API according to the FHIR Release 4 specifications https://www.hl7.org/fhir/ to integrate with provider(s) using the Agastha Software. Please refer to https://agastha.com/api-terms.html for the terms of use.

All API access is over https. All data is sent and received as JSON. The API supports R4 FHIR standard defined media type for JSON content : application/fhir+json

US Core Version : US Core 5.0.1 / USCDI v2

SMART App Launch Version : SMART App Launch 2.0.0

Bulk Data Version : Bulk Data 2.0.0

Root URL

Sandbox : https://demo1.agastha.com/AgAPI

Registration

SMART on FHIR applications need to be registered with Agastha before they can be used. To start the registration process, please submit a request by filling out this form

https://demo1.agastha.com/AgAPI/AppRegister
Agastha will validate your request based on the information submitted. After successful registration you will get an activation link by email to verify your account. You may click the activation link to verify your account. If you are approved you will receive an OAuth Client ID, Secret Key in email which can be used on subsequent requests following the protocols specified in the official SMART App Authorization Guide.

Authentication

Agastha APIs are authenticated using the OAuth 2.0 protocol. All API requests must include an Authorization header with an Access Token of the form :

Authorization : Bearer MY_ACCESS_TOKEN

Validation

When making create or update requests to the FHIR server the payloads will be validated according to the FHIR Release 4 specifications https://www.hl7.org/fhir/. Any get or search requests will return payloads that conform to the FHIR specifications

Capability Statement

The Capability Statement describes the FHIR server's functionality, including the resource types that the server supports.

Authorization OAuth 2.0
Response Codes :
Code Response Description
200 Success Request is successfully fulfilled
400 Bad Request Invalid request(Parameters/heades)
401 Access Denied Authentication failure
403 Forbidden Unauthorized(scope issue/access problem)
500 Internal server Error Problem on server side