Manual Reference Source Test
public class | source

Entry

Mixin Extends:

EntryModel, Helper

Helper class representing an eDiary Entry.

Static Member Summary

Static Public Members
public static get

Constructor Summary

Public Constructor
public

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

async save(): Promise<Entry>

Saves a entry (insert if id doesn't exist, update if it does)

Inherited Summary

From class EntryModel
public
public
public
public
public

Static Public Members

public static get type: String source

Public Constructors

public constructor(json: Object) source

Constructor for helper class representing an eDiary Entry

Override:

EntryModel#constructor

Params:

NameTypeAttributeDescription
json Object

json api response from server

Test:

Public Members

public get entryGroup: EntryGroup source

public set entryGroup: EntryGroup source

public get flow: Flow source

public get flowDataGroup: FlowDataGroup source

public set flowDataGroup: FlowDataGroup source

public get owner: User source

public set owner: User source

public set status: Status source

public get status: Status 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)

Return:

Promise<Entry>

Returns a promise via ajax call.

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());

Test: