Session

class devices.nh_clinical_device_session(pool, cr)[source]

Represents a period of time where an instance of device or device type (the specific physical instance of the device is not required) is being used during a spell

complete(*args, **kwargs)[source]

Sets the specified device as available and calls complete.

Returns:True
Return type:bool
get_activity_id(*args, **kwargs)[source]

Looks for a started device session for the provided patient and device type. It will throw a warning if finds more than one, as the method will only return the last started one.

Parameters:
  • patient_id (int) – patient id
  • device_type_id (int) – device type id
Returns:

device session id

Return type:

int

start(*args, **kwargs)[source]

Sets the specified device as not available and calls start.

Returns:True
Return type:bool