ballerinax/health.clients.fhir.athenahealth Ballerina library

1.0.0
FHIR Client Connector

FHIR client connector that can be used to connect to a FHIR server and perform common interactions and operations.

Capability Statement

  • https://api.preview.platform.athenahealth.com/fhir/r4/metadata

Supported FHIR Resource Types

The table below lists supported resource types, interactions and operations. Interactions are shown as inline code and separated by line breaks for readability.

Resource TypeInteractionsOperations
AllergyIntoleranceread
search-type
-
Appointmentread
search-type
-
Binaryread-
CarePlanread
search-type
-
CareTeamread
search-type
-
Conditionread
search-type
-
Coverageread
search-type
-
Deviceread
search-type
-
DiagnosticReportread
search-type
-
DocumentReferenceread
search-type
-
Encounterread
search-type
-
Goalread
search-type
-
Immunizationread
search-type
-
Locationread
search-type
-
Medicationread
search-type
-
MedicationRequestread
search-type
-
Observationread
search-type
-
Organizationread
search-type
-
Patientread
search-type
health-cards-issue
Practitionerread
search-type
-
Procedureread
search-type
-
Provenanceread
search-type
-
ServiceRequestread
search-type
-
Groupexport
QuestionnaireResponsecreate
search-type
read
latest-response-by-questionnaire
MeasureReportsubmit-care-gaps
Mediaread-
MedicationDispensesearch-type
read
-
Specimensearch-type
read
-
RelatedPersonsearch-type
read
-

Notes:

  • indicates no special operations supported for that resource in this connector.
  • Use the server's CapabilityStatement to verify support for additional interactions or operations on a given server instance.

Functions

The connector represents the interactions and operations as functions. Each function corresponds to a specific FHIR interaction or operation.

Interaction/OperationFunction
Readget{ResourceType}ById
Version Readget{ResourceType}ByVersion
Updateupdate{ResourceType}
Patchpatch{ResourceType}
Deletedelete{ResourceType}
History Typeget{ResourceType}History
History Instanceget{ResourceType}InstanceHistory
Createcreate{ResourceType}
Search Typesearch{ResourceType}
$Operation{Operation}{ResourceType}Operation

Replace {ResourceType} with the actual resource type (e.g., Patient, Observation) and {Operation} with the specific operation name (e.g., everything, validate).

Sample Usage

import ballerinax/health.clients.fhir as fhirClient; import /athena.fhir.connector; import ballerina/io; public function main() returns error? { // Initialize the Athena connector client fhirClient:FHIRConnectorConfig athenaConfig = { baseURL: base, mimeType: fhirClient:FHIR_JSON, authConfig: { tokenUrl: tokenUrl, clientId: clientId, clientSecret: clientSecret, scopes: scopes } }; connector:FHIRClientConnector athenaFhirclientconnector = check new (athenaConfig); // Example 1: Read a patient by ID fhir:FHIRResponse fhirFhirresponse = check athenaFhirclientconnector->getPatientById("patient-id-123"); io:println("Patient Read Response: ", fhirFhirresponse.'resource); }

Import

import ballerinax/health.clients.fhir.athenahealth;Copy

Other versions

1.0.0

Metadata

Released date: 1 day ago

Version: 1.0.0


Compatibility

Platform: any

Ballerina version: 2201.12.3

GraalVM compatible: Yes


Pull count

Total: 0

Current verison: 0


Weekly downloads



Keywords

Area/Healthcare

Industry/Healthcare

Type/Connector

Vendor/AthenaHealth

AthenaHealth FHIR Connector