Indivo Framework (iOS)
An iOS framework for Apps connecting to Indivo server
 All Classes Functions Variables Properties Pages
Instance Methods | Properties | List of all members
IndivoMedication Class Reference

A class representing "indivo:Medication" objects, generated from /indivo/data_models/core/medication/model.sdml. More...

#import <IndivoMedication.h>

Inherits IndivoDocument.

Instance Methods

(NSString *) - displayName
 Tries to find the best name to display. More...
 
(void) - loadPillImageBypassingCache:callback:
 This method tries to load an image of the medication, caching it automatically (once implemented) More...
 
(UIImage *) - pillImage
 
- Instance Methods inherited from IndivoDocument
(void) - archive:forReason:callback:
 Archive (or unarchive) a document for the given reason. More...
 
(NSString *) - basePostPath
 The base path, e.g. More...
 
(id) - cachedObjectOfType:
 Retrieves the object for a given type from cache. More...
 
(BOOL) - cacheObject:asType:error:
 Caches the object for a given type. More...
 
(NSString *) - documentPath
 The path to this document, i.e. More...
 
(void) - fetchMetaDocumentWithCallback:
 Fetches the meta document for this document. More...
 
(void) - fetchStatusHistoryWithCallback:
 Fetch the document's version history. More...
 
(void) - fetchVersionsWithCallback:
 Fetch the document's version history. More...
 
(BOOL) - hasStatus:
 
(id) - initFromNode:forRecord:withMeta:
 The designated initializer. More...
 
(BOOL) - isLatest
 
(void) - pull:
 
(void) - push:
 This method puts a new document on the server. More...
 
(void) - replace:
 This method updates the receiver's version on the server with new data from the receiver's properties. More...
 
(void) - setLabel:callback:
 Label a document. More...
 
(void) - updateWithMeta:
 This method updates our udid, type and status from the given meta document. More...
 
(void) - void:forReason:callback:
 Void (or unvoid) a document for a given reason. More...
 
- Instance Methods inherited from IndivoAbstractDocument
(NSString *) - documentXML
 Returns an XML representation of the receiver, like "xml" does, but adds namespace information. More...
 
(NSString *) - flatDocumentXML
 Returns the Indivo 2.0 flat XML format for a document. More...
 
(NSString *) - flatXML
 Returns the Indivo 2.0 flat XML format. More...
 
(id) - initFromNode:forRecord:
 The designated initializer, initializes an instance from an XML node. More...
 
- Instance Methods inherited from INServerObject
(void) - forceNotOnServer
 This is provided for subclasses, the fact that onServer is readonly but settable by this and markOnServer underlines the fact that you should only change this property when you know what you're doing. More...
 
(void) - get:callback:
 Shortcut for GETting data. More...
 
(void) - get:parameters:callback:
 Shortcut for GETting data with parameters. More...
 
(id) - initFromNode:withServer:
 The designated initializer. More...
 
(BOOL) - is:
 Shortcut method to test if the document has the given ID. More...
 
(void) - markOnServer
 Sets onServer to YES for the receiver. More...
 
(void) - performMethod:withBody:orParameters:httpMethod:callback:
 The basic method to perform REST methods on the server with App credentials. More...
 
(void) - post:body:callback:
 Shortcut for POSTing body data. More...
 
(void) - post:parameters:callback:
 Shortcut for POSTing parameters. More...
 
(void) - put:body:callback:
 Shortcut for PUTting data. More...
 

Properties

INCodedValuedrugName
 
INDateTimeendDate
 
INUnitValuefrequency
 
NSArray * fulfillments
 
INStringinstructions
 
INCodedValueprovenance
 
INUnitValuequantity
 
INDateTimestartDate
 
- Properties inherited from IndivoDocument
IndivoPrincipalcreator
 The creator of the document. More...
 
INDocumentStatus documentStatus
 This document's status. More...
 
BOOL fetched
 YES if the document has been fetched from the server. More...
 
NSString * label
 This document's label. More...
 
NSString * uuidLatest
 The udid of the latest document of the receiver. More...
 
NSString * uuidOriginal
 The udid of the original document, if the receiver replaced a document. More...
 
NSString * uuidReplaces
 The udid of the replaced document, if the receiver replaced a document. More...
 
- Properties inherited from IndivoAbstractDocument
IndivoCreated * created
 
NSString * nameSpace
 The namespace. More...
 
IndivoRecordrecord
 The owning record. If you change this on documents fetched from the server, you will get errors. More...
 
IndivoSuppressed * suppressed
 
- Properties inherited from INServerObject
BOOL onServer
 Indicates whether this document lives on the server. More...
 
IndivoServerserver
 Our beloved server. More...
 
NSString * uuid
 This object's udid. More...
 

Additional Inherited Members

- Class Methods inherited from IndivoDocument
(id) + cachedObjectOfType:forId:
 Retrieves the cached object of a given type for a given document udid. More...
 
(BOOL) + cacheObject:asType:forId:error:
 Stores an object of a given type for the document of the given udid. More...
 
(Class) + documentClassForType:
 Returns the class for a previously registered type, or "IndivoDocument" if the type has not been registered. More...
 
(NSString *) + fetchReportPathForRecord:
 The base path to get reports for documents of this class. More...
 
(void) + registerDocumentClass:
 Our IndivoDocument subclasses call this in their +load method. More...
 
(NSString *) + reportType
 This name is used to construct the report path for this kind of document. More...
 
- Protected Attributes inherited from INObject
NSString * _nodeName
 

Detailed Description

A class representing "indivo:Medication" objects, generated from /indivo/data_models/core/medication/model.sdml.

Method Documentation

- (NSString *) displayName

Tries to find the best name to display.

Provided by category IndivoMedication(Report).

- (void) loadPillImageBypassingCache: (BOOL)  bypass
callback: (INCancelErrorBlock)  callback 

This method tries to load an image of the medication, caching it automatically (once implemented)

Provided by category IndivoMedication(Report).

- (UIImage *) pillImage

Provided by category IndivoMedication(Report).

Property Documentation

- (INCodedValue*) drugName
readwritenonatomicstrong
- (INDateTime*) endDate
readwritenonatomicstrong
- (INUnitValue*) frequency
readwritenonatomicstrong
- (NSArray*) fulfillments
readwritenonatomicstrong
- (INString*) instructions
readwritenonatomicstrong
- (INCodedValue*) provenance
readwritenonatomicstrong
- (INUnitValue*) quantity
readwritenonatomicstrong
- (INDateTime*) startDate
readwritenonatomicstrong

The documentation for this class was generated from the following file: