Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
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.
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}