medicmobile@0.5.7
This adaptor exports the following from common:
- alterState()
- dataPath()
- dataValue()
- each()
- field()
- fields()
- fn()
- fnIf()
- lastReferenceValue()
- merge()
- sourceValue()
Functions
changesApi
changesApi(params, callback) ⇒ Operation
Access the CouchDB Changes API
Param | Type | Description |
---|---|---|
params | object | Query parameters |
callback | function | (Optional) Callback function |
Example
changesApi(params, callback)
fetchSubmissions
fetchSubmissions(formId, params, postUrl) ⇒ Operation
Access form submissions and post them as JSON.
Param | Type | Description |
---|---|---|
formId | string | Query parameters |
params | object | Starting sequence id |
postUrl | string | Inbox to post form data |
Example
fetchSubmissions(
"pregnancy", // formId
{ "last-event-id": 334 }, // params
"http://localhost:4000/inbox/abc-123-xyz" // postUrl
);
pickFormData
pickFormData(formId) ⇒ Operation
Select submissions for a specific form
Param | Type | Description |
---|---|---|
formId | string | The form ID. |
Example
pickFormData(formId)