eCW Adapter

eCW Adapter

Need help? Contact us:

The ECW adapter is designed to provide a template for getting started with FHIR eCW integrations. It leverages the ECW Library to:

  1. Authenticate with the eCW server via OAuth2.0 (JWT)

  2. Perform various interactions against the eCW server including create, read and search.

This component can be customized and adapter according to your workflow needs.

How to use it:

Refer to Set up your ECW Sandbox for the sign up process, creating an app and gathering the authentication details needed for the eCW Adapter.

See Create a Component if this is your first time!

Ender the ClientId, PrivateKey certificate path, and Kid from your JWKS key.

Using the information provided, the component will run through the authentication workflow and store the returned access token and expiry time in an encrypted file for use on subsequent API requests.

image-20250619-125733.png

 

Use the provided SamplePatient.json to load a FHIR patient resource. Alternatively, you can explore the FHIR Profiling Tool to generate a template resource you can use to populate with data of your own.

-- Load a sample patient local F = io.open(iguana.projectRoot()..'SamplePatient.json','rb') local RawPatient = F:read("*a") F:close() local NewPatient = json.parse{data=RawPatient}

Set live=true to invoke the creation interaction.

-- Create the new patient. Set live = true to run from within the Translator E:create{resource = 'Patient',parameters=NewPatient,live=true} -- Retrieve available parameters local SearchTable = E:parameters(E.capabilities.Patient.name) -- Set parameter values SearchTable.family = 'Lufhir' SearchTable.given = 'Sakiko' SearchTable.birthdate = '1994-07-22' -- Search for a patient local Status, R = E:search{resource="Patient",parameters=SearchTable,live=true}

Note: the eCW provided sandbox may not have create patient permissions. The following read and search below can be used for eCW provided patient data:

-- Read data from a specific patient local Status, R = E:readResource{ resource = "Patient", id = "Lt2IFR5Ah76n4d8TFP5gBFKDGSQZQMMCduhAZRmKPQY", live = true } -- Retrieve available parameters local SearchTable = E:parameters(E.capabilities.Patient.name) -- Set parameter values SearchTable.family = 'Reese' SearchTable.given = 'John' SearchTable.birthdate = '1980-01-01' SearchTable.gender = 'male' -- Search for a patient local Status, R = E:search{resource="Patient",parameters=SearchTable,live=true}