Skip to main content

Load to DB

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

Metadata

Key Functions

dataValue, upsert

Expression

// Your job goes here.
upsert('patient', 'ON CONSTRAINT patient_pk', {
patient_id: dataValue('data.patient_name'),
patient_name: dataValue('data.patient_name'),
village_name: dataValue('data.village_name'),
last_menstrual_period: dataValue('data.last_menstrual_period'),
expected_delivery_date: dataValue('data.expected_delivery_date'),
children_alive: dataValue('data.children_alive'),
living_children: dataValue('data.living_children'),
feeling_sick: dataValue('data.feeling_sick'),
total_children: dataValue('data.Total_children'),
risk_level: dataValue('data.Risk_level')

});