Skip to main content

ModMed Adapter

A Source Custom node that polls a ModMed FHIR endpoint on an interval and pushes every matching resource downstream as JSON.

Part of the Linkiir Adapters package — see requesting the package.

What it does

On each interval the node exchanges the API account credentials for an access token, runs your FHIR search, and pushes one message per resource returned. The ModMed API key travels on every request, including the token exchange. The token is cached and reused until it nears expiry.

ModMed FHIR endpoint → ModMed Adapter → your next node

This adapter uses a username and password rather than a keypair, which makes it the quickest of the FHIR adapters to bring up.

Before you start

Collect from ModMed:

  • A username and password for the API account.
  • The API key ModMed issued.
  • The base URL of your ModMed endpoint.

Both the password and the API key are entered as masked fields, so they are encrypted in the project and never appear in a log or an export in readable form.

Set it up

  1. Open the ModMed FHIR Adapter node in the Workflow Builder and click Edit.

  2. Fill in the connection fields:

    FieldValue
    Base URLYour ModMed endpoint root. The token and FHIR paths are appended to it
    UsernameThe API account username
    PasswordThe API account password
    API KeyThe key ModMed issued
  3. Say what to fetch with Resource Type and Search Query.

  4. Set Live Mode off, then Save.

  5. Connect a downstream node and start the workflow. Authentication still runs, so this pass proves the account and the API key.

  6. Turn Live Mode on. The log reports how many resources were pushed.

Configuration reference

FieldTypeDefaultPurpose
Intervalnumber60000Milliseconds between polls
Base URLstring(empty)Root of the ModMed endpoint. The token path and FHIR path are appended to it
Usernamestring(empty)API account username
Passwordpassword(empty)API account password
API Keypassword(empty)The API key sent on every request, including the token exchange
Resource TypestringPatientFHIR resource type to search each poll
Search Querystring_count=20Search parameters as a URL query string
Live ModebooltrueOff simulates the FHIR calls. Authentication is always live
Verify TLSbooltrueVerify the server's TLS certificate. Turn off only for a local test proxy

Verify it worked

  • With Live Mode off, the node starts clean and logs that no request was sent.
  • With Live Mode on, the log reports a count of pushed resources.
  • Each message is a single FHIR resource as JSON.

If it didn't work

Symptom in the logCauseFix
CONFIG_ERROR naming a fieldBase URL, Username, Password, or API Key is emptyFill the field named
AUTH_FAILEDWrong username or password, or the account is not enabled for API accessRe-enter the credentials; confirm API access with ModMed
HTTP_401 on the search but the token succeededThe API Key is wrong or has been rotatedRe-enter the API key
HTTP_404Wrong Base URL, or a misspelled Resource TypeCorrect the URL or resource type
failed to decrypt fieldThe project was imported to a different installationRe-enter Password and API Key on this installation
Live Mode is off and nothing is pushedWorking as configuredTurn Live Mode on
No error, but nothing pushedThe search matched nothingWiden the Search Query

Next