This is a polysomnographic computer program. Its utility is in the detection and diagnosis of multiple sleep disorders. I refer to this as a "poor man's" sleep study. A formal nocturnal polysomnogram (Sleep Study) performed in a sleep lab/center usually costs over $1000.00 to perform and perhaps $250.00 or more to be interpreted by a certified sleep specialist. The cost of the equipment in a sleep lab is over $15,000.00 and usually includes EEG, ENG, Oximetry, EKG, Respitrace, PLM monitor and other varied devices depending on the indications and if it is a sleep lab or center. My alternative requires only a personal computer (Windows XP, >= 1024x768 & 24 bit color -recommended-), an optical mouse, a Webcam or Firewire Digital Video Camera (allows infrared recording) and a microphone.
The concept is quite simple. An actigraph is a device which measures "movement". When someone is sleeping, they generally move very little. Thus sleep onset, sleep time and arousals can be detected using actigraphy. Likewise, arousals associated with "Restless Leg Syndrome" or "Periodic Limb Movement Disorder", often resulting in insomnia, can be quantitated with actigraphy. Although medical studies suggest that actigraphy is inadequate to diagnose sleep disorders alone, when used in conjunction with other modalities, it is complimentary.
My "poor man's" actigraph is fashioned by putting an optical (wireless or wired) mouse inside of white socks worn on a limb or affixed to the body. (See the diagram/picture) By allowing movement of the mouse within the white socks, changes in the X/Y axis values reflect movement. By adjusting the mouse sensitivity and acceptance parameters, actigraphy is performed.
When a sleeper arouses, the cause of the event is important. By triggering video with movement, the event will be recorded and an experienced examiner can determine the cause. Motion detection is based on the actigraph and not the actual video motion thus low light levels do not hinder the study. Using an infrared camera (commonly found on Sony consumer camcorders) is of additional value.
The program also uses the Microsoft Speech Recognition control to trigger an audio-video recording (voice/sound activation and not speech recognition). The event of interest is snoring, especially snoring of an obnoxious quality associated with arousal. Obstructive Sleep Apnea (OSA) is a common cause of sleep disruption and results in a sundry of medical maladies. The sine qua none of OSA is "excessive daytime sleepiness" with non-restorative sleep. The snoring is loud and often heard in other rooms, driving bed-partners away. The quality of the snoring is also quite characteristic, as it starts loud and then there are periods of quiet (associated with airway obstruction) followed by arousal and gasps.
The limitations of this study include the fact that a person's sleep is not "staged" (1-4 and Stage REM). Heart rate and ekg aren't monitored nor is pulse oximetry. (The addition of pulse oximetry to this study would be quite simple and invaluable, albeit, somewhat expensive.) Furthermore, nocturnal penile tumescence cannot be directly quantitated although one could position the camera for this display ;).
The audio and video is recorded in AVI, uncompressed files. I suggest using the smallest video format possible, such as 160x120 and perhaps audio at 8 bit, 8000 and monaural to limit the size of the files which can be consumptive over 8-9 hours. This program is limited to 32000 seconds which is about 8.9 hours. This allows graphic representation of the data in the Microsoft Chart Control which is limited to 32K of data points. The actigraph is also plotted in real-time and in 5 minute increments which can be saved and reviewed.
One may adjust the video parameters from within the program or by using the Control Panel applets. The audio and video require a combined input (eg. camera with microphone) for recording. The program cannot record audio without video at present although webcams are fairly ubiquitous.
The final caveat is that this data requires some expertise to interpret. No algorithms have been applied to the data as of yet. Therefore clinical correlation is essential. By using this software, you agree to hold the author harmless for any errors in the code and in any clinical context that this information is applied. This program has NOT been tested or evaluated in a clinical setting as of yet. Its only value at present may be for screening purposes. Until controlled studies of this utility are performed in a sleep lab, other diagnostic modalities are needed.
The required dependencies include:
References to borrowed code and support documentation is included in the SupportDocs.zip file included in the archive as are the source code and activeX OCXs.
Menu options were added to adjust the mouse and disable the screen saver.
The remainder of the program aspects are featured in the animation above. This is a work in progress and hopefully this document will keep up with improvements.
Future additions will be dictated by convenience and perhaps request: