Skip to main content

medicmobile@0.3.0

Functions

execute(operations)Operation

Execute a sequence of operations. Wraps @openfn/language-common/execute, and prepends initial state for http.

fetchSubmissions(formId, params, postUrl)Operation

Access form submissions and post them as JSON.

changesApi(params, callback)Operation

Access the CouchDB Changes API

pickFormData(formId)Operation

Select submissions for a specific form

execute(operations) ⇒ Operation

Execute a sequence of operations. Wraps @openfn/language-common/execute, and prepends initial state for http.

Kind: global function

ParamTypeDescription
operationsOperationsOperations to be performed.

Example

execute(
create('foo'),
delete('bar')
)(state)

fetchSubmissions(formId, params, postUrl) ⇒ Operation

Access form submissions and post them as JSON.

Kind: global function
Access: public

ParamTypeDescription
formIdstringQuery parameters
paramsobjectStarting sequence id
postUrlstringInbox to post form data

Example

fetchSubmissions(
"pregnancy", // formId
{ "last-event-id": 334 }, // params
"http://localhost:4000/inbox/abc-123-xyz" // postUrl
);

changesApi(params, callback) ⇒ Operation

Access the CouchDB Changes API

Kind: global function
Access: public

ParamTypeDescription
paramsobjectQuery parameters
callbackfunction(Optional) Callback function

Example

changesApi(params, callback)

pickFormData(formId) ⇒ Operation

Select submissions for a specific form

Kind: global function
Access: public

ParamTypeDescription
formIdstringThe form ID.

Example

pickFormData(formId)