Constructor Summary
Public Constructor | ||
public |
constructor(json: Object) Constructor for helper class representing an eDiary Entry |
Member Summary
Public Members | ||
public get |
|
|
public set |
|
|
public get |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
Method Summary
Public Methods | ||
public |
Saves a entry (insert if id doesn't exist, update if it does) |
Inherited Summary
From class EntryModel | ||
public |
[stringToCamel(key)]: Any |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Public Constructors
public constructor(json: Object) source
Constructor for helper class representing an eDiary Entry
Override:
EntryModel#constructorParams:
Name | Type | Attribute | Description |
json | Object | json api response from server |
Public Members
public get entryGroup: EntryGroup source
public set entryGroup: EntryGroup source
public get flowDataGroup: FlowDataGroup source
public set flowDataGroup: FlowDataGroup source
public set template: EntryTemplate source
public get template: EntryTemplate source
Public Methods
public async save(): Promise<Entry> source
Saves a entry (insert if id doesn't exist, update if it does)
Example:
import { Entry, clinical6 } from 'clinical6';
// Insert is different from other inserts.
const entry = new Entry({...});
await entry.save();
// After you have the authtoken and then you've logged in
// Updates existing entry (has existing id)
clinical6.get(Entry).then(entries => entries[0].save());