HEALTHCAREDEVICE
This class receives healthcare device instances and defines an administrator call setting that can manage instances.
This class gets the healthcaredevice's instance calling sucessCallback function for using healthcare device and calls the manager to receive a healthcare device's constant like connection/disconnection and also provides methods to connect/disconnect with a healthcare device, searching available devices, etc.
Add the following line for healthcaredevice class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js"></script> |
You can declare healthcaredevice class like this : ex) var healthcaredevice = deviceapis.healthcaredevice; |
Contents
Constants
Name | Value | Description |
MGR_EVENT_DEV_CONNECT | 11 | device connection event |
MGR_EVENT_DEV_CONNECT_FAILED | 162 | device connection failed event |
MGR_EVENT_DEV_DISCONNECT | 12 | device disconnection event |
MGR_EVENT_DEV_SEARCHED | 160 | device being searched status event |
MGR_EVENT_DEV_SEARCH_FINISHED | 161 | device search completion status event |
DEV_INFO_MEASURE_DATA | 1 | measure data (ex. systolic, disatolic, MAP, weight, height and so on) |
DEV_INFO_SYSTEM_INFO | 2 | System Info (ex. company name, model name, etc.) |
DEV_INFO_UNKNOWN | 0 | Unknown Infomation |
DEV_PULSE_OXIMETER | 4100 | pulse oximeter, not implemented yet |
DEV_BLOOD_PRESSURE_MONITOR | 4103 | Blood pressure monitor |
DEV_TEMPERATURE | 4104 | thermometer, not implemented yet |
DEV_WEIGHING_SCALE | 4111 | weighing scale |
DEV_GLUCOSE_METER | 4113 | glucose meter, not implemented yet |
DEV_PEDOMETER | 14413 | pedometer, not implemented yet |
DEV_UNIT_DIMENSIONLESS | 512 | dimensionless |
DEV_UNIT_PERCENT | 544 | % |
DEV_UNIT_BPM | 2720 | bpm(beat per minute) |
DEV_UNIT_KPA | 3843 | kPa(Kilo Pascal) |
DEV_UNIT_MMHG | 3872 | mmHg |
DEV_UNIT_KG | 1731 | kg |
DEV_UNIT_CM | 1297 | cm |
DEV_UNIT_IN | 1376 | in(inch) |
DEV_UNIT_LB | 1760 | lb |
DEV_UNIT_KGPM_SQ | 1952 | kg m-2 |
DEV_UNIT_STEP | 6656 | steps |
DEV_UNIT_CAL | 6784 | cal(calories) |
DEV_UNIT_M | 1280 | m(meter) |
DEV_UNIT_G | 1728 | g(gram) |
DEV_UNIT_UNKNOWN | 0 | unknown data unit which is out of scope of referring specification |
DEV_MANUFACTURER | 80 | manufacturer |
DEV_MODEL_NUMBER | 81 | model number |
MEASURE_DATA_ABS_TIMESTAMP | 2448 | AbsoluteTime |
MEASURE_DATA_BODY_WEIGHT | 57664 | body weight |
MEASURE_DATA_BODY_HEIGHT | 57668 | body height |
MEASURE_DATA_BODY_MASS | 57680 | body mass |
MEASURE_DATA_BODY_FAT | 57676 | body fat |
MEASURE_DATA_PULSE_RATE | 18474 | pulse rate |
MEASURE_DATA_NIBP | 18948 | (NIBP)Non-Invasive Blood Pressure |
MEASURE_DATA_SYSTOLIC | 18949 | systolic |
MEASURE_DATA_DIASTOLIC | 18950 | diastolic |
MEASURE_DATA_MAP | 18951 | (MAP) Mean Arterial Pressure |
MEASURE_DATA_DISTANCE | 103 | distance |
MEASURE_DATA_ENERGY | 119 | energy |
MEASURE_DATA_UNKNOWN | 0 | unknown data type which is out of scope of referring specification |
Methods
connectDevice | ||
Description | ||
request to connect healthcare device. When device is connected, MGR_EVENT_DEV_CONNECT event will be generated. Connection procedure failed status is indicated by MGR_EVENT_DEV_CONNECT_FAILED event | ||
Parameters | ■strUID - DOMString - address/uniqueID of wanted device | |
Return | ■Boolean - true : connect command executed normally - false : otherwise | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
boolean fReturn = deviceapis.healthcaredevice.connectDevices(strUID); |
disconnectDevice | ||
Description | ||
request to disconnect connected healthcare device. When device is disconnected, MGR_EVENT_DEV_DISCONNECT event will be generated. | ||
Parameters | ■strUID - DOMString - address/uniqueID of wanted device | |
Return | ■Boolean - true : disconnect command executed normally - false : otherwise | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
boolean fReturn = deviceapis.healthcaredevice.disconnectDevices(strUID); |
getHealthcareDevices | ||
Description | ||
request to get healthcare devices instances. | ||
Parameters | ■successCallback - Function ■errorCallback - Function | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
deviceapis.healthcaredevice.getHealthcareDevices(successCallback, errorCallback); |
registerManagerCallback | ||
Description | ||
request to set callback function to receive healthcare device manager event such as MGR_EVENT_DEV_CONNECT / MGR_EVENT_DEV_DISCONNECT. | ||
Parameters | ■callbackFn - Function - callback function that has prototype given as “void callbackFn( ManagerEvent )” | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
deviceapis.healthcaredevice.registerManagerCallback(cbFunc); |
searchDevices | ||
Description | ||
search request for healthcare devices. MGR_EVENT_DEV_SEARCHED event indicates the search in progress status. MGR_EVENT_DEV_SEARCH_FINISHED event indicates search completion status. | ||
Parameters | none | |
Return | ■Boolean - true : search command executed normally - false : otherwise | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
boolean fReturn = deviceapis.healthcaredevice.searchDevices(); |