top

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;


Constants

NameValueDescription
MGR_EVENT_DEV_CONNECT11device connection event
MGR_EVENT_DEV_CONNECT_FAILED162device connection failed event
MGR_EVENT_DEV_DISCONNECT12device disconnection event
MGR_EVENT_DEV_SEARCHED160device being searched status event
MGR_EVENT_DEV_SEARCH_FINISHED161device search completion status event
DEV_INFO_MEASURE_DATA1measure data (ex. systolic, disatolic, MAP, weight, height and so on)
DEV_INFO_SYSTEM_INFO2System Info (ex. company name, model name, etc.)
DEV_INFO_UNKNOWN0Unknown Infomation
DEV_PULSE_OXIMETER4100pulse oximeter, not implemented yet
DEV_BLOOD_PRESSURE_MONITOR4103Blood pressure monitor
DEV_TEMPERATURE4104thermometer, not implemented yet
DEV_WEIGHING_SCALE4111weighing scale
DEV_GLUCOSE_METER4113glucose meter, not implemented yet
DEV_PEDOMETER14413pedometer, not implemented yet
DEV_UNIT_DIMENSIONLESS512dimensionless
DEV_UNIT_PERCENT544%
DEV_UNIT_BPM2720bpm(beat per minute)
DEV_UNIT_KPA3843kPa(Kilo Pascal)
DEV_UNIT_MMHG3872mmHg
DEV_UNIT_KG1731kg
DEV_UNIT_CM1297cm
DEV_UNIT_IN1376in(inch)
DEV_UNIT_LB1760lb
DEV_UNIT_KGPM_SQ1952kg m-2
DEV_UNIT_STEP6656steps
DEV_UNIT_CAL6784cal(calories)
DEV_UNIT_M1280m(meter)
DEV_UNIT_G1728g(gram)
DEV_UNIT_UNKNOWN0unknown data unit which is out of scope of referring specification
DEV_MANUFACTURER80manufacturer
DEV_MODEL_NUMBER81model number
MEASURE_DATA_ABS_TIMESTAMP2448AbsoluteTime
MEASURE_DATA_BODY_WEIGHT57664body weight
MEASURE_DATA_BODY_HEIGHT57668body height
MEASURE_DATA_BODY_MASS57680body mass
MEASURE_DATA_BODY_FAT57676body fat
MEASURE_DATA_PULSE_RATE18474pulse rate
MEASURE_DATA_NIBP18948(NIBP)Non-Invasive Blood Pressure
MEASURE_DATA_SYSTOLIC18949systolic
MEASURE_DATA_DIASTOLIC18950diastolic
MEASURE_DATA_MAP18951(MAP) Mean Arterial Pressure
MEASURE_DATA_DISTANCE103distance
MEASURE_DATA_ENERGY119energy
MEASURE_DATA_UNKNOWN0unknown 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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
Example
boolean fReturn = deviceapis.healthcaredevice.disconnectDevices(strUID);

getHealthcareDevices

Description
request to get healthcare devices instances.
Parameters
■successCallback 
  - Function 
■errorCallback 
  - Function
Return■Void
Emulator SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
Example
boolean fReturn = deviceapis.healthcaredevice.searchDevices();