Skip to main content

Create Patient in OpenMRS

This job was provided by an OpenFn.org user via the job library API.

Metadata

Key Functions

dataValue, field, fields

Expression

//Job to create patient in OpenMRS 
patient(
fields(
field("gender", dataValue("form.gender")), //map values from CommCare forms
field("names", function(state) {
return [{
"patient_id": dataValue("form.case.@case_id")(state),
"creator": dataValue("form.user")(state)
}]
})
)
)