NL8902746A - METHOD AND APPARATUS FOR NON-INVASIVE CONTINUOUS MONITORING OF THE BLOOD PRESSURE - Google Patents

METHOD AND APPARATUS FOR NON-INVASIVE CONTINUOUS MONITORING OF THE BLOOD PRESSURE Download PDF

Info

Publication number
NL8902746A
NL8902746A NL8902746A NL8902746A NL8902746A NL 8902746 A NL8902746 A NL 8902746A NL 8902746 A NL8902746 A NL 8902746A NL 8902746 A NL8902746 A NL 8902746A NL 8902746 A NL8902746 A NL 8902746A
Authority
NL
Netherlands
Prior art keywords
int
draw
void
max
hart
Prior art date
Application number
NL8902746A
Other languages
Dutch (nl)
Original Assignee
L E Trading Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by L E Trading Ltd filed Critical L E Trading Ltd
Publication of NL8902746A publication Critical patent/NL8902746A/en

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/021Measuring pressure in heart or blood vessels
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7242Details of waveform analysis using integration

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Cardiology (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Physiology (AREA)
  • Molecular Biology (AREA)
  • Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Vascular Medicine (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Description

Werkwijze en inrichting voor het noninvasief continu bewaken van de bloeddrukMethod and device for non-invasive continuous monitoring of blood pressure

De onderhavige uitvinding heeft in het algemeen betrekking op meting van de bloeddruk en meer in het bijzonder op het continu meten van de bloeddruk en het bewaken daarvan.The present invention generally relates to blood pressure measurement and more particularly to continuous blood pressure measurement and monitoring.

Momenteel zijn verschillende typen inrichtingen voor het bewaken van de bloeddruk bekend. Een noninvasieve continue bloeddrukbewakingsinrichting, aangeduid met Cortronic APM 770, is beschreven in een produktbeschijving van Cortronic Corporation, Ronkonkoma, New York 11770, U.S.A. Deze inrichting maakt gebruik van een conventionele manchet, die op de arm van een patiënt wordt bevestigd.Different types of blood pressure monitoring devices are currently known. A noninvasive continuous blood pressure monitor, designated Cortronic APM 770, is described in a product description from Cortronic Corporation, Ronkonkoma, New York 11770, U.S.A. This device uses a conventional cuff, which is attached to a patient's arm.

In een artikel "Continuous, Real-Time, Noninvasive monitor of Blood Pressure: Penaz Methodology Applied to the Finger" van Robert D. Boehmer, uit "Journal of Clinical Monitoring", Vol. 3, Nr. 4, Oktober 1987, biz. 282-287 is een bloeddrukbewakingsinrichting voor de vinger beschreven, die wordt vervaardigd door Ohmede Monitoring Systems, S. Englewood, Colorado 80112, U.S.A. Een vingermanchet met ingebouwde lichtbron en detector wordt gebruikt voor het meten van de afmeting van de vingerarterie, waarbij een opblaasbare blaas wordt gebruikt voor het uitoefenen van externe druk op de arterie. De monitor is gebaseerd op een microprocessor, waarbij algorithmen worden gebruikt voor het ongeveer elke minuut bepalen van de onbelaste arterie afmeting en automatisch wordt gecorrigeerd voor veranderingen, die mogelijk zijn veroorzaakt door een geringe spiercontractie of -ontspanning. Een met hoge snelheid 'werkend elektropneumatisch servo-besturingssysteem maakt een automatische calibratie en instelling mogelijk.In an article "Continuous, Real-Time, Noninvasive Monitor of Blood Pressure: Penaz Methodology Applied to the Finger" by Robert D. Boehmer, from "Journal of Clinical Monitoring", Vol. 3, No. October 4, 1987, biz. 282-287 discloses a finger blood pressure monitor manufactured by Ohmede Monitoring Systems, S. Englewood, Colorado 80112, U.S.A. A finger cuff with a built-in light source and detector is used to measure the size of the finger artery, using an inflatable bladder to apply external pressure to the artery. The monitor is based on a microprocessor, using algorithms to determine the unloaded artery size approximately every minute and automatically correcting for changes, which may be due to low muscle contraction or relaxation. A high-speed electro-pneumatic servo control system allows automatic calibration and adjustment.

In een artikel "Long-term Ambulatory Monitoring of Indirect Arterial Blood Pressure Using a Volume-oscillometric Method" door K. Yamakoshe et al., uit "Medical & Biological Engineering & Computing", September 1985, biz. 459-465, is een draagbaar, op een microprocessor gebaseerd instrument beschreven voor het op lange termijn ambulant bewaken van de indirekte arteriële druk in de menselijke vinger door het meten van manchetdrukken.In an article "Long-term Ambulatory Monitoring of Indirect Arterial Blood Pressure Using a Volume-oscillometric Method" by K. Yamakoshe et al., From "Medical & Biological Engineering & Computing", September 1985, biz. 459-465, a portable microprocessor-based instrument has been described for long-term ambulatory monitoring of the indirect arterial pressure in the human finger by measuring cuff pressures.

In het Amerikaanse octrooischrift 4.475.554 is een noninvasieve continue bloeddrukmeter beschreven, die is voorzien van een opblaasbare flexibele vingermanchet, waarin een infrarode zender en ontvanger zijn opgenomen, alsmede een elektronische schakeling, waarop de zender en ontvanger zijn aangesloten, voor het besturen van een dynamische compressor. Een signaal van een elektronische drukomzetter ) komt nauw overeen met de momentele arteriële bloeddruk.U.S. Pat. No. 4,475,554 discloses a non-invasive continuous blood pressure monitor which includes an inflatable flexible finger cuff incorporating an infrared transmitter and receiver and an electronic circuit to which the transmitter and receiver are connected to control a dynamic compressor. An electronic pressure transducer signal) closely matches current arterial blood pressure.

De in de bovengenoemde publicaties beschreven inrichtingen worden allen gekenmerkt door het feit, dat zij de fysieke afmetingen van de arterie meten. Zij maken alle gebruik van door een fluïdum bediende middelen voor het i aanbrengen van een fysieke druk. Zij omvatten alle een gesloten lussysteem, dat de druk meet, die nodig is om de fysieke afmetingen van de arterie op een voorafbepaald niveau te houden. Door hun aard hebben de inrichtingen een beperkte responsiesnelheid, aangezien zij de fysieke compensatie van het systeem voor fysiologisch veranderingen meten en derhalve de fysiologische veranderingen op indirekte wijze meten.The devices described in the above publications are all characterized by the fact that they measure the physical dimensions of the artery. They all use fluid-operated means to apply a physical pressure. They all include a closed loop system that measures the pressure required to maintain the artery's physical dimensions at a predetermined level. By their nature, the devices have a limited response rate since they measure the physical compensation of the system for physiological changes and therefore measure the physiological changes indirectly.

De onderhavige uitvinding beoogt een verbeterde noninvasieve continue bloeddrukbewakingsinrichting te verschaffen.The present invention aims to provide an improved non-invasive continuous blood pressure monitoring device.

Volgens een gunstige uitvoering van de uitvinding wordt een onvertraagd continu werkende noninvasieve bloeddrukbewakingsinrichting verschaft, die is voorzien van een optische omzetterinrichting voor het onvertraagd meten van de hoeveelheid bloed, die in een arterie stroomt, en een inrichting, welke in responsie op een uitgangssignaal van de optische omzetterinrichting een uitgangsindicatie voor de systolische en diastolische bloeddruk verschaft.In accordance with an advantageous embodiment of the invention, there is provided a non-real time continuous noninvasive blood pressure monitoring device comprising an optical transducer device for real time measurement of the amount of blood flowing into an artery and a device responsive to an output signal from the optical converter device provides an output indication for systolic and diastolic blood pressure.

Volgens een gunstige uitvoeringsvorm van de uitvinding verschaft de inrichting direkte uitgangsindicaties van zowel de systolische als de diastolische bloeddruk.According to a favorable embodiment of the invention, the device provides direct output indications of both systolic and diastolic blood pressure.

Volgens een andere gunstige uitvoeringsvorm berekent de inrichting de gemiddelde bloeddruk door het uitgangssignaal van de optische omzetterinrichting te integreren.According to another favorable embodiment, the device calculates the average blood pressure by integrating the output signal of the optical converter device.

Voorts is het volgens de uitvinding mogelijk een weergeeforgaan te verschaffen, waarop de golfvorm van het uitgangssignaal van de optische omzetterinrichting wordt weergegeven, waardoor de hartklepfuncties kunnen worden gemeten.Furthermore, according to the invention, it is possible to provide a display on which the waveform of the output signal of the optical converter device is displayed, through which the heart valve functions can be measured.

De uitvinding wordt hierna nader toegelicht aan de hand van de tekening, waarin een uitvoeringsvoorbeeld is weergegeven.The invention is explained in more detail below with reference to the drawing, in which an exemplary embodiment is shown.

Fig. 1 is een blokschema van een voorkeursuitvoering van een continue, noninvasieve bloeddrukbewakings-inrichting volgens de uitvinding.Fig. 1 is a block diagram of a preferred embodiment of a continuous, non-invasive blood pressure monitor according to the invention.

Fig. 2 is een schema van de logische schakeling van de inrichting volgens fig. 1.Fig. 2 is a schematic diagram of the logic circuit of the device of FIG. 1.

In de fig. 1 en 2 is een continue noninvasieve bloeddrukbewakingsinrichting weergegeven, die is voorzien van een optische omzetter 10, welke kan bestaan uit een optische zender 12, zoals een LED, bijvoorbeeld een MLED 77 van Motorola, en een optische ontvanger 14, zoals één of meer fototransistors of een PIN-diode, bijvoorbeeld een MRD 711 fototransistor van Motorola. De optische omzetter 10 kan ook zijn voorzien van een pulsschakeling 16, die is uitgevoerd met een transistor 18, zoals een 2N222A, waarvan de basis via een weerstand 20 is aangesloten op een aansluit-klem A van de logische schakeling uit fig. 2, alsmede een weerstand 22 en een variabele weerstand 24, die via een weerstand 26 met de transistor 18 zijn verbonden.Figures 1 and 2 illustrate a continuous non-invasive blood pressure monitoring device, which includes an optical transducer 10, which may consist of an optical transmitter 12, such as an LED, for example, an MLED 77 from Motorola, and an optical receiver 14, such as one or more phototransistors or a PIN diode, for example a Motorola MRD 711 phototransistor. The optical converter 10 may also comprise a pulse circuit 16, which is provided with a transistor 18, such as a 2N222A, the base of which is connected via a resistor 20 to a terminal A of the logic circuit of FIG. 2, as well as a resistor 22 and a variable resistor 24, which are connected to transistor 18 via a resistor 26.

De optische omzetter kan in één van een aantal modi werken. De zender 12 en de ontvanger 14 kunnen direkt op de huid van een lichaamsdeel, zoals een vinger, worden geplaatst of als alternatief daarmee communiceren via optische vezels of andere golfgeleiders. Het aantal zenders en ontvangers, dat wordt gebruikt, kan worden gekozen in overeenstemming met een gewenste resolutie en gezichtsveld.The optical converter can operate in one of a number of modes. The transmitter 12 and the receiver 14 can be placed directly on the skin of a body part, such as a finger, or alternatively communicate therewith via optical fibers or other waveguides. The number of transmitters and receivers used can be selected according to a desired resolution and field of view.

De uitgang van de optische omzetter 10 is verbonden met parallel geschakelde wisselspannings- en gelijk-spanningsversterkercircuits 30 resp. 32. Opgemerkt wordt, dat wanneer een in pulsbedrijf werkende zender wordt gebruikt, de gelijkspanningsversterker 32 kan worden geëlimineerd, aangezien alle relevante informatie van de wissel- spanningsversterker 30 wordt ontvangen, De beide versterker-circuits zijn bijvoorbeeld gebaseerd op TIL 72 of LF 356 chips 33.The output of the optical converter 10 is connected to AC and DC amplifier circuits 30, connected in parallel. 32. It should be noted that when a pulse operated transmitter is used, the DC amplifier 32 can be eliminated since all relevant information is received from the AC amplifier 30, for example, both amplifier circuits are based on TIL 72 or LF 356 chips 33.

De uitgangssignalen van de beide versterkercircuits 30 en 32 worden opgeteld in een optelcircuit 34, waarvan de uitgang is aangesloten op een A/D-convertor 36. De uitgang van de A/D-convertor 36 is verbonden met een microprocessor 38, zoals een personal computer voor algemene toepassingen, gebaseerd op een chip Intel 8088, welke een weergeeforgaan 40 stuurt.The output signals of the two amplifier circuits 30 and 32 are added to an adder circuit 34, the output of which is connected to an A / D converter 36. The output of the A / D converter 36 is connected to a microprocessor 38, such as a personal general purpose computer, based on an Intel 8088 chip, which drives a display 40.

De calibratie van de inrichting uit fig, 1 kan worden verkregen door middel van een conventionele elektronische bloeddrukmeetmanchet 72, zoals een CAS model 820, vervaardigd door CAS Medical Systems, Ine., te Branford, Connecticut 06405, U.S.A., welke een ingangssignaal ontvangt van een besturingsschakeling 44 en een calibratie-uitgangs-signaal aan de microcomputer 38 levert. Als alternatief kunnen andere geschikte bloeddrukmeetapparaten worden gebruikt en de meetresultaten daarvan kunnen met de hand in de inrichting worden ingevoerd via een toetsenbord 46.The calibration of the device of FIG. 1 can be obtained by a conventional electronic blood pressure measuring cuff 72, such as a CAS model 820, manufactured by CAS Medical Systems, Inc., of Branford, Connecticut 06405, USA, which receives an input signal from a control circuit 44 and supplies a calibration output signal to the microcomputer 38. Alternatively, other suitable blood pressure measuring devices can be used and the measurement results thereof can be manually entered into the device via a keyboard 46.

De besturingsschakeling 44 ontvangt ingangssignalen van de microcomputer 38 en kan behalve aan de A/D-convertor 36 ook uitgangssignalen aan de beide versterkers 30 en 32 leveren.The control circuit 44 receives input signals from the microcomputer 38 and, in addition to the A / D converter 36, can also supply output signals to both amplifiers 30 and 32.

De beschreven inrichting werkt gewoonlijk onder besturing van een programma, waarvan de source code in de bijgaande Annex A is opgenomen.The described device usually operates under the control of a program, the source code of which is included in the attached Annex A.

De uitvinding is niet beperkt tot het in het voorgaande beschreven uitvoeringsvoorbeeld, dat binnen het kader der uitvinding op verschillende manieren kan worden gevarieerd.The invention is not limited to the exemplary embodiment described above, which can be varied in a number of ways within the scope of the invention.

Claims (13)

1. Noninvasieve, continue bloeddrukbewakings-inrichting, gekenmerkt door een optische omzetter voor het detecteren van informatie, die samenhangt met de hoeveelheid bloed die in een bloedvat stroomt en door middelen, die in responsie op een uitgangssignaal van de optische omzetter een uitgangsindicatie voor de systolische en diastolische bloeddruk leveren.A non-invasive, continuous blood pressure monitor, characterized by an optical converter for detecting information associated with the amount of blood flowing into a blood vessel and by means which provide an output indication for the systolic in response to an output signal from the optical converter and deliver diastolic blood pressure. 2. Inrichting volgens conclusie 1, m e t het kenmerk, dat de genoemde middelen een direkte uit- > gangsindicatie voor zowel de systolische als de diastolische bloeddruk leveren.2. Device according to claim 1, characterized in that said means provide a direct output indication for both systolic and diastolic blood pressure. 3. Inrichting volgens conclusie 1 of 2, met het kenmerk, dat de genoemde middelen de gemiddelde bloeddruk meten door het integreren van het uitgangssignaal i van de optische omzetter.Device according to claim 1 or 2, characterized in that said means measure the mean blood pressure by integrating the output signal i of the optical converter. 4. Inrichting volgens één der voorgaande conclusies, gekenmerkt door een weergeeforgaan voor het weergeven van de golfvorm van het uitgangssignaal van de optische omzetter, waardoor de hartklepfuncties kunnen i worden gemeten.4. Device as claimed in any of the foregoing claims, characterized by a display for displaying the waveform of the output signal of the optical converter, whereby the heart valve functions can be measured. 5. Inrichting volgens één der voorgaande conclusies, met het kenmerk, dat de inrichting onvertraagd werkt.Device according to any one of the preceding claims, characterized in that the device operates without delay. 6. Inrichting volgens één der voorgaande conclu- ! sies, gekenmerkt door middelen voor het calibreren van de middelen voor het verschaffen van een uitgangsindicatie.6. Device according to one of the preceding claims! characterized by means for calibrating the means for providing an output indication. 7. Inrichting volgens conclusie 6, m e t het kenmerk, dat de middelen voor het calibreren een elektrische manchet omvatten.7. Device according to claim 6, characterized in that the means for calibration comprise an electric sleeve. 8. Inrichting volgens conclusie 6, gekenmerkt door een toetsenbord voor het met de hand invoeren van calibratie-informatie.Device according to claim 6, characterized by a keyboard for manually entering calibration information. 9. Werkwijze voor het noninvasief continu bewaken van de bloeddruk, met het kenmerk, dat optisch informatie wordt gedetecteerd, die samenhangt met de hoeveelheid bloed, welke in een bloedvat stroomt, waarbij in responsie op de optisch gedetecteerde informatie een uit-gangsindicatie wordt verschaft van de systolische en diasto-lische bloeddruk.A method of noninvasively continuously monitoring blood pressure, characterized in that optically detecting information related to the amount of blood flowing into a blood vessel, providing an output indication in response to the optically detected information the systolic and diastolic blood pressure. 10. Werkwijze volgens conclusie 9, m e t het kenmerk, dat een direkte uitgangsindicatie van zowel de systolische als de diastolische bloeddruk wordt verschaft.10. A method according to claim 9, characterized in that a direct starting indication of both systolic and diastolic blood pressure is provided. 11. Werkwijze volgens conclusie 9 of 10, m e t het kenmerk, dat de gemiddelde bloeddruk wordt berekend door het integreren van de optisch verkregen informatie.11. Method according to claim 9 or 10, characterized in that the mean blood pressure is calculated by integrating the optically obtained information. 12. Werkwijze volgens één der conclusies 9-11, met het kenmerk, dat de golfvorm van de optisch gedetecteerde informatie wordt weergegeven, waardoor de hartklep-functies kunnen worden gemeten.Method according to any one of claims 9-11, characterized in that the waveform of the optically detected information is displayed, whereby the heart valve functions can be measured. 13. Werkwijze volgens één der conclusies 9-12, m e t het kenmerk, dat de bloedstroom in een arterie optisch wordt gedetecteerd. ! L.E. OPTRDNICS (CC) I /XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX * Pile keycn 1. e * * Name main - main caller -far X X CM1BP eo-ftware system * X X X Usene· - X * * X Prototype in - cnibp.H X X * X Description main caller for system, X •X handling; user input, X X data acquisition, data * X processing, and data X X display. X X. * X. Return value none X X X X Calls graphic_init X X init X X 5ta.rt_cnibp X X work_mode X X gotoxy X c key_inp X X X X Called by none X X X xxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxx/ ¥inc1ude <dos.h > ♦linelude <cnibp_in.h> me i n() t i n t i n i t (i n t) , int num = l; /X variables declarations X/ char- key_ch; struct time tm; graphic_init() ; /X initialize graphic mode X/ tm.ti_hour=0! /X set clock to 0 */ t Tt>. t i _m i n=0; tm.t i_sec=0; tm.t i_hund=0? sett ime(fetm)ΐ while (1) C switch(num) /X case */ t /X X/ case 59 : init <tmode) 1 /X <Fl>restore graphic mode It X/ ex i t(0)5 /X exit. *t case 60 : /X <F2>system calibration (cnibp) It */ if(hartx>220) num=60i else ( start_cnibp()| no_cycle * -11 num *= 1i ) work_mode()i /X work*mode (sensor). X^ break I /X X/ case 61 !num * 1l /X <F3>trend on blood pressure. X/ break} /* ·*/ cue 62 : if(alarm^flag » 0) /* <F4>set systolic high limit *7 set_alarm()} /# that turn on alarm system. *7 else /* */ rewrite_main_menu()} /# */ num * 1} /* */ break} /* */ case 63 :if(alarm_flag == 1)£ /* <F5>increment of systolic */ high_sys +«10} /* high limit by ten units. */ gotoxy(23,23)} /* */ printf(”%3d",high_sys)} num = lj break}} case 64 : if (alarir._+ lag == 1)£ /# <F6>decrement of systolic *7 high_sys -=10} /* high limit by ten units. #7 gotoxy(23,23)} printf C%3d",high_sys)} num = 1; break)} case 65 : if ((alarm_flag) & (alarm_switch == 1))£ gotoxy(1,23)} printfC<F7>ALARM OFF")} alarm_switch = 0}} else if (alarm_flag) £alarm_switch = 1} gotoxy(1,23)I printf("<F7>ALARM ON "))> num = 1; break} case 68 :outportb(0x61,speaker_reset)) /# <F10>stop speaker. #/ num = i| break} case 1 :work_mode()} /* 1 :work-mode (sensor). */ break} /·* default :work_mode()} /* default:work-mode (sensor). */ if (num «« 1) num « key_inp()j M ί . L.E. OPTRONICS (CC) I /XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX * File key_inp.c X * Name call the keys from new X * keyboard X * X X Usage - X * X X Prototype in - DOS.H * * KEY.H * * X X Description Read data from appropri—X X ate address and trans la—X· X te it to ASCII codes. * * * X Return value num - ASCII code X X X X Calls inportb X X X X Cal led by none χ X X xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ «include <dos.h> «include <key.h> int key_inp() { static prev_key = OxFFFF; char key_ch} int num» key_ch =inportb( KEYPORT ) ; switch (key_ch) t case Fl: num =59» break» case FZ: num = 60; break» case F3: if (prev_key != F3) num = 61; else num = l; break; case F4: if (prev_key != F4) num = 621 else num=l; break; c**e F5: if (prev_key != F5) num = 63; else num = l; break; case F6: if Cprev_key != F6) num = 64J else num = l; break; case F7'. if (prev_key != F7) num = 65; else num = l; break) case F10; if <prev_key !* F10) num = 68( else num = l; break; default: num * 1) > prev_key * key_ch; return (num)) J ! L.E. OPTRONICS (CO * File beep.c * * N's’re beep * * * * * * Usage void beep (int,intJ; * * * * Prototype in cnibp.h * * * * Description turn on the speaker # * until <F10> is * * pressed. * * Return none. * * * * Calls none. # * * * Called by write results. # * * *********************#******#***·*#***#**/ ♦♦include <dos.h> extern int speaUer_resetj void beep(int divl,int div2) ( i nt cv!,j Ϊ speel.er_reset = inportb (0x61) J c·.' tpor tb (0x43,0xB6) J ci'tpor tb (0x42, d i v2) ; O'jtportb(0x42,divl); cvl = (speel.er_reset 3); outpor tb(0x61,cvl)j } '*........-.----------------------------------------------------------Ί ! L.E. OFTROKI CS (CC) --------------------------------------------------------------------4(/ /**************************************** * File calc_new.c * * Name calc_new_factor - * * computes cal ibratiori * * ί actor * * * * Usage void calc_new_(actor- () 5 * * * * Prototype in cas.h * * * * Description compute factor against * * calibration results, for* * data processing. * * * * Return value none * * * * Calls none * * * * Called by work_mode * * * ************ ****************************/ extern int max, min5 extern int maxi,mini; extern float factor_s; extern int after_calibj extern float systolic,diastolic; void calc_new_factor () < int temp; maxi = max; mini = min; if ( (temp = max-mini == 0 ) factor_s = 0.0; else C factor_s = (systolic-diastolic)/temp; /* systolic factor = */ after^calib = 0; /* Reset after-ealib flag. */ > ! L.E. OPTRONICS (CC) I /**********-***** ************************* * File clear_w.c * * Name clear_window * * * * Usage * * * * Frototype in * * * * Description * * * * Return value *· * # * Calls * * * * Called by * * * **************************************#-*/ /* x = column y = raw wid = width o+ window hght = height of window */ «include <dos.h> «include <videa.h> extern unsigned xaddr 16401, ysddr C20015 void clear_w i ndow(x,y,w id,hght) unsigned int x,y,wid,hght; r union REGS regsj regs.x.ax = 0x0600» regs.h.bh = Oi regs.x.cx = CyaddrCyJ << 8) ! xaddrCxlj regs.x.dx * (ty + hght) << 5) ! xaddrtx + widl; i nt86 (VIDEO, S<regs, Lregs) ; > ί L.E. OPTRONICS (CC) | /**************************************** * File count_hp.c * * Name count_h_pulse * * * * * * Usa^e void count_h_pu1se(5} * * * * Prototype in casS.h * * * * Description Calculate the heart * * pulse. * * * Return none * * * * Calls none * * * * Called by disp1ay_value * * * * * ******************** X·******************* / extern int heart_p; extern int no_cycle> extern -float o 1 d_t irne, new_t ime; void count_h_pu1se() float h_pulse> i-f ( (new_t ime == old_time) !! (no_cycle == -1)) heart_p = 05 else { h_pulse = (60.0 * no_cycle/2.0)/(new_time - old-time); heart_p = h_pulsej } > J · L.E. OPTRONICS (CC) I /************** ********** **************** * File disp_val.c * * Nare display_value - diep leys* * values graphically. * * * * Usege void display_value # * (int point)I* * * * Prototype in * * * * Description displays a value graph- * * icelly, in the -form of * * dot, and a line drawn * * from it to the last di— * * awn dot. * * * * Return value none * * * * Calls draw_line * * count_h_puises * * * * Called by work_mode * * * fHHHHMHMHHHHHHHHHHHUHHHHHHHHHHHHHHHHHHHHf/- ♦(include <time.h> ♦♦include <hart_w.h> ♦(include <dos.h> «define X_DIST 2 extern float old_time,new_timel extern int c1r,no_cycle,hartx1 extern float mean,systolic,factor_sJ extern int max_acc,min_accJ extern int *ax_eounter,maxi{ void display_value(int point) C int newy,i,j,oldx,ref(window_hight * HART_Y2 - HART_Ylj float epsilon“lE-5j struct time time_o!d,time_newl static int print_rate*3j static int oldy*-l, x*HART_Xl+l| static long mean_point « OJ static float sum_mean 0.0J static float y_]#vel*0.0! static int cycle_x HART_X1+1, eycle^point * 01 newy point/HART_SCALEl /* Translate the signal to the dimensions*/ newy » HART_Y2 - newyl /* of the display-window. */ if (oldy * -1) oldymnewyi c leer_wiridow(x + d,HART_Yl,0,window>_hight) 1 if (newy < HART_Y1) newy * HART~Ylj oldx - x - >:_riSTi if (oldx < HAPT_X1) oldx»HART_XlJ elr II draw_line(oldx,oldy,x,newyl| /* Draw the next connecting line. */ draw_line(oldx,HAPT_YI-I»xfHART_Y|-l)f draw_J ir,e(Old> , HAF T_Y2, x, HART_Y2) I if (cvstolic ) epsilon) /* after calibration */ ( *va_«»eai» + point) ntean_paiHL rt| > if ( ( (y_level >oldy) &&(y_level<=newy) ) ! ! ( (y_level <oldy) 8*&: < y_ieve 1 >=newy) ) ) { if <no_cycle == -1) { gettime(6<time_old); old_time = time_old.ti_hour * 3600.0 + time_old.ti_min * 60.0} old_time = ald_time + time_old.ti_sec + time_o1d.ti_hund/100.0} } if t(x-eycle_x) > cycle_point/4) C no_cyc1e++; gett ime (8ct ime_new) ; new_time = time_new.ti_haur # 3600.0 + time_new.ti_min * 60.0» new_time = new_time + time_new.ti_sec + time_new.ti_hund/100.0; cycle_x = xj } > x += x_dist; oldy = newyj if (x > HART_X2> /* If it reached the end of the *f i /* display-window l *,/ courit_h_pulse () I /# Calculate hear t pulse. y_level = (0.5*<max_acc - min_acc) + min_acc)/max_counter; y_level = HART_Y2 - y_level/HART_SCALE; if (systolic>epsiIonJ mean = systolic + factor_s * (sum_mean / mean_point) - factor__s * maxi; sum_mean = 0.0J mean_point » 0; write_results<)5 /* Write measuring results. */ trend<); /# Write systolic trend. */ if (no_cycle > 0) eyele_point = (HART_X2 - HART_X1) / no_cycle; else cycle_point = <HART_X2 - HART_X1) / 11; no_cycle = -1; ' x=HART_Xl+15 /* */ c1ear_w i ndow(x+3,HART_Y1,X_DIST,windaw_h ight); draw_box(HART_X1,HART_Y1-1,HART_X2 + 1,HART_Y2> 5 cycle_x = xl pr i nt_rate+ + 5 if ((print_rate%3)==0) pr i nt_results(>; print_rate = 0; } } /* > */ h a r t x = x» ! L.E. OPTRONICS (CO Λ*------------------------- heêder -files included -----------------------#/ extern unsigned yaddrt2001; extern unsigned xaddrt6401; extern char shi-ftC6403j extern char pointtó40]J extern int clr> extern char -far iscrn! /If****^*********·*##**#*****#*^********#** * File dot.c * *· Name dot - draws a dot. * * * * Usage void dot (int x,int y); * * * * Prototype in cas.h # * * * Description computes the o-f-fset in * * the screen bu-ffer o-f * * the bit to be set. * * * * Return value none * * * * Cal Is none * * # ¥ Called by dmw_l ine * * * ****************************************/ void dot ( int x, int y) { unsigned totalJ total = xaddrlxl + yaddrtyl» scrnEtotalJ = (dr << shiftlxl) i (scrnttotall k pointCxj); > ! L.E. OPTRONICS (CC) | / **************** ********** ************** * File draw_l.c * * Name draw_line - draws a line* * * * Usage void draw_line * * (int xl,yl,x2,y2)f * * * * Prototype in casS.h * * * * Description draws line -from (XI, Yl) * * to (X2,Y2). * * * * Return value none * * * * Calls dot * * * * Called by disp1ay_value * * draw_screen * * draw_bax * * * ****************************************/ void draw_line(int xl,int yl, int x2, int y2) { void dot(int x,int y) ; int x,y,xstep,ystep,dx,dy,direct; x = x 1; y = yl; xstep = l; ystep = lj i-f ( xl > x2 ) xstep = -1; i-f ( yl > y2 ) ystep = -15 dx = abs( x2 - xl )5 dy = abs( y2 - y1 ); it ( dx == 0 ) direct = -15 else direct = 0} while (!( <x==x2) &8c (y==y2) )) ( dot (x,y)5 i-f (direct < 0) ( y = y + ystep; direct = direct + dx; } else { x = x + xstep; direct = direct - dy; } : L.E. OPTRONICS (CCJ /******** #**** ******·*****·**************** * File draw_box.c * * Name draw_box - draws a box. * * * * Usage void draw_box # * (int xl,y1,x2,y2)5* * * * Prototype in cas3.h * * * * Description draws a box bounded by * * colomns XI,X2 and rows * * Y1,Y2. * * * * Return value none * * * * Calls draw_line * * * ·* Called by draw, screen * * * ******** ******************************/ void draw_boxiint xl,int yl, int x2,int y2) { void di'aw_line (int xl,int yl,int x2,int y2) ! d r a w_ 1 i ne (x 1, y 1, x2, y 1) 5 dr aw_line(x2,yl,x2,y2)5 di-aw_l ine (x2, y2, xl, y2) 5 drat"_l i ne (,v 1, y2, xl, yl > ï } ! L.E. OPTEONICS (CO ! /****+**************************+******++ + File draw_Ecr.c * + Name dran_5creen - draws the * * functional screen. * * * + Usage void draw_screen()i * * * * Prototype in trend_w.h, hart_w.h * * * + Description draws all the windows * * far graphic and numeric * + displays of parameters. + * + * Return value none * * * + Calls draw_box + * draw_line + * gotoxy * * rewrite_main_menu * * * * Called by graphic_init + * * **************************+*****++***+**/ ♦♦include <trend_w.h> ♦♦include <hart_w.h> void draw_screen() { i n t i; draw_box(HART_Xl,HART_Yl-l,HART_X2+l,HART_Y2) ; /* Graph window. */ draw_box(TREND_X1,TREND_Y1,TREND_X2+1,TREND_Y2); /* History-graph window.*/ draw_box(0,ISO,500,195)ί /* Menu window. */ gotoxy(1,21)J /* trend scale mark */ printfC 0"); gotoxy(1,16)> printf("120"); gotoxy(1,11)1 printf("240")5 for (i=0j i <3; i + +) draw_line (TREND_X1-10,110+20*i,TREND_X1,110+20*i)( draw_box(540>13,611,27)t /* Systolic window. */ draw_box(540,53,611,67)I /* Diastolic window. */ draw_box(540,93,611,107)! /* Mean window. */ draw_box<540,133,611,147); /* Heart pulse window. */ draw_box(540,153,634,170){ /* Clock window. */ gotoxy(64,22); printf("ICT LE ISRAEL"); i gotoxy(64,23); printf("CNIBP V:l.00*)J draw_box<505,172,635,195)1 /* ICT ISRAEL window */ for (i = l; K6S i++) ( gotoxy((3 + 10 * i),21)( printf <"%d",(5 * i));> gotoxy(68,0)t printf("SYSTOLIC"); gotoxy <6S,5)( printf("DIASTOLIC")! gotoxy(6Θ,10)! printf("MEAN EP")! gotoxy(68,15)I printf ("H. RATE"),· rewr 11&_rp j ri_meru 1 ! · ! L.E. OPTRONICS (CC) j /**************************************** * File getmode.c * * Name getmode - gets display * * adapter type and mode. * * * * Usage int getmode()5 * * * * Prototype in casS.h * * * * Description gets mode o-f display ad-* * apter. * * * * Return value mode o-f adapter card. * * * * Calls none * * * * Called by graphic_init * * * *************** *************************/ «include <dcs.h> int getmode() { union REGS inregs,outregs! inregs.h.ah = OxOfJ inregs.h.al = 0; i ntSé (0x10, S<i nregs, ficoutregs) ; return(outregs. h. al) \ } ! L.E. OPTRONICS (CC) /**#*#******#*#*######***###**####*####*# * File gatoxy.c * * Name gatoxy - position cursor# * * # Usage void gotoxy(int x,y)> # # * * Prototype in cas.h # * * # Description position cursor at Χ,Υ # # coordinates. # # * # Return value none * * * * Calls none * * * # Called by many # * # ##****#**#***# *##***##*****#****##*##***/ «include <dos.h> «include <video.h> void gotoxy(int x,int y) £ union REGS regsj regs.h.ah = 2; regs.h.dh = yj regs.h.d1 = x 5 r-egs. h . bh = 0; i r. tS6 (VIDEO, Scregs, kregs ) ; } ! L.E. OPTRONICS ICC) | /**************************************** * File graph_in.c * * Name graphical nit * * * * Usage void graphic_init(); * * * * Prototype in cas8.h * * * * Description initializing hi - res * * graphics on a CGA card, * * and drawing the systems * * -functional screen. * * * * Return value none * * * * Calls init * * draw_screen * * * * Called by main * * * ****************************************/ extern int tmodej void graphic_init() { int getmode()! void startsprinter()J int init(int); void draw_5creen()j /*----------------------------------------------------------------*/ / tmode = getmodeC)j /* Save the current mode. */ / init(6>> /* Initialize graphic mode.*/ / stert_printer ()} draw_sereen()f /* Display system's screen.*/ / } I L.E. OPTRONICS (CC) /******#***##**#**##*#*#*#*#****#**#*###* * File · init.e * * Name init - intialize display# * adapter to graphic mode.# * * # Usage int inittint num)} * # * * Prototype in # * * # Description initializes CGA card to # # hi-res graphic mode. # # * * Return value mode adapter card is in.# * * # Calls none # * # # Called by main # # grahpic_init * # * ♦(include <das.h> ♦♦include <video.h> extern unsigned yaddrE2003) extern unsigned xaddr£6401) extern char shiftC6403) extern char pointC6401) extern char -far #scrn) int inittint num) { int indx * 0, indx2 = 0} static int max_cl r, max_x, max_y, sh if ter; unsigned clr„wid,mask; union REGS inregs,outregsj if (num >6) { puts ("inval id mode.\x07")} exit(0)} y switch (num) { case 4 : max_clr 3( max_x 320) max_y * 200; shifter = 4) clr_wid 2) break) case 5 ) max_clr “ 1) max_x * 320) max_y - 200) shifter 4) clr_wid 2) break) case 6 : max_clr * 1) max_x * 640) max_y 200) shifter » 8) c1r_w i d « 11 oreax? } if (nuM > 3) { /#For graphics modes only*/· while (indx < max_y) C /^-calculate al 1 y offsets #/ yaddrCindxl 80 * indx2S ++indx? yaddrC indxl * <80 * indx2) + 0x20005 ++indxj ++indx2? > for (indx * 0} indx < max^x? ++indx) < mask * 0x80 >> (clr_wid * (indx X shifter))? if (nun ά) { /*· Medium resolution offsets */ mask 1= (mask >> 1)? shiftCindxl » 6 - (clr_wid * (indx * shifter)); } else High resolution offsets */ shiftCindxl = 7 - (indx X shifter)? pointCindxl * ~mask; xaddrCindxl * indx / shifter? > inregs.h.ah “ 0? inregs.h.al * numl int86(VIDE0,8iinregs,ldOutregs) ? return(num)| > /* end of init */ i L.E. OPTRONICS (CC) * Fi le pr int_rs.c * * Name print_results # * * * * * Usage void print_results(); * * * * Prototype ir. cas.h * * * # Description Print blood pressure * i results. * * * i Return none * * * * Cal 1 s none ff * * * Called by disp1ay_value * * * * * ****************************************/ «include <bios.h> «include <time.h> extern int systo,diast,heart_p; extern -float mean» pr i nt_results() { int i,at 813,mean_val; long timelj char #str_now» for <i=0ji<81ji+ + ) atil = ’ ’ ; et813 = ’/O’i time(ktimel); Etr_now = ct ime (let imel) 5 for (i = l5 i<9j i++) at i3 = *(str_now+10+i); at 17 3 = ’0’ + systo/100J a 118 3 = '0' + (systo%100)/105 at 193 » ’0’ + systo%105 mean_val = mean; aC283 = Ό’ + mean_val/100; at293 = ’0’ + (mean_val%100)/10; at303 = ’0’ + mean_val%105 at393 = 48 + diast/100; at403 = 48 + (diasty.100) /10; at 413 = 48 + diast'AlOJ at503 = 43 + heart_p/100; e 1513 = 48 + (heart_p%100>/10; at523 = 48 + heart_p%10; at0 3 «= 10! if ( biosprint(2,0,0) == 0x90 ) write(4,a,160); } ! L.E. OPTRONICS (CC) | /*************************************** File rewrite, c * * Name rewrite_main_menu # * * * # * Usage void rewr i te_main_mer.u () ;* * * * Prototype in * * * K Description * * * * * * Return none. * * * * Calls none # * * * Called by * * * ****************************************/ extern int c1r, alarm_f1agj rewr i te_mai n_menu() { void draw_line(int xl,int yl,int x2,int y2); void gotaxy (int x,int y) ; i nt i; alarn_flag = 0; c1r=0; draw_line(120,181,120,195); draw_li ne(220,181,220,195); dr aw_li ne(290,181,290,195); draw_l i ne (370, 181,370, 195) ,* gotoxy(1,23)1 pr i ntf("FI: EXIT F2.'CALIB F3:HIST0RY F4:SET ALARM "); for (i=i;i<=4;i++) { clr = ljdraw_line(100*i,180,100*i,195);> > ί L.E. OPTRONICS (CC) | /**************************************** * File Bet_al r. c * * Name set_alarm * * * * * * Usage void set_alarm(); * * * * Prototype in * * * * Description Display alarm menu. * * window and set alarm * * -flag. * * Return none. * * * * Calls draw_line,gotoxy * * draw_box. * * Called by work_mode. * * * If***************************************/ ♦(include <ccnio.h> extern int c1r, alarm_f1ag,high_sys,alarm_switch; void set_alarm<) { void gotoxytint x,int y) ; void draw_line(int xl,int yl,int x2,int y2)5 i nt i J alarm_-flag = 1; gotoxy(1,23)5 pr i nt-f (" <F7>ALARM OFF SYS = %3d <F5>UP <F6>D0WN <F4>MAIN MENU", )5 }h igh _SyS c1r=0; for (i = l 5 i<=4; i++) draw_line(100*i,181,100*i,195)5 clr=l; draw_line(120,181,120,195)5 draw_line(220,181,220,195)J draw_li ne(290,181,290,195)J d r aw_1ine(370,181,370,195)5 i-f (alarm_switch) { gotoxy(12,23)5 print-f ("N -) ; } > )i : L. Ε. OPTRONICS (CC) /**************************************** * File smooth_d.c * * Neme smooth_data - smoothes * if converted data * * * * Usage int smooth_data()f * * * * Prototype in cnibp.h * * * * Description smooth_data gets the * * arithmetic average of a * * shifting window of x * * samples at a time, to * * get a smoothed curve of * * the sampled data. * * * * Return value smooth_data returns the * if value of the new V coo- * * rdinate of the smoothed * * sample. * * * * Calls none * * * if Called by work_mode * * * ****************************************/ ♦•include <dos.h> «include <ipcrt.h> extern int Atl03} int smooth_data() { int i, sum = 0,max_A,min_A; ΑΓ43 = inportb(IPORT)5 /* Recieve the sixth sample. */ if ((AC43 > ZAO) ll (AC43 < 1)) AC43 = inpartb(ÏP0RT)! for < i —0» i<5| i++) /* Sun up the last six samples. */ sum = suit. + Ati3S for (i=05 i<45 i++) ΑΓ i 3 = AIi +13 5 retur n (suir/5) 5 /* Return average of last six samples*/ 3 ! L. E. OFTP.ONICS (CC) ! /**f^*-)(********·******·******************·** * File start_pr.c * * Name start_printer * * * * * * Usage * * * * * * Prototype in cas.h # * * * Description # * * * * * * * * * * * Return value none # * * * Calls * * * * * * * * Cal led by * K # ****************************************/ ♦(include <conio.h> ♦♦include <bios.h> st=>rt_printer () C che** ilSOl = ” \r."J char ataoi = " ICT Ltd Rehovo t, ISRAEL\n“{ char crSOl = " BPTEST PRO J E C T\n"; char dCeoi = " date:\n'j char· eCeoi = ” nameitn"! char bCEOl = H notes:\n " J char gC803 = » TIME SYSTOLIC MEAN DIASTOLIC HEART RATE \n 5 if ( biosprint(2,0,0) == 0x90 ) { write (4, + ,80)! wr i te(4,a,80)> wr i te(4,c,80)5 wr ite(4,d,80)I wr i te(4,e,80){ wr i te(4,b,80)} write(4,9,80)f > ) ; L.E. OFTRONICS (CC) | /**************************************** * F j ! e trend.c * * Neme trend * f * * * * Usage void tr end O{ * * * ·* Prototype in * * * * Description Print blood pressure * * trend. * * * * Return none * * * * Cells trend_draw * * * ·* Celled by displey_value * * * * * **************************************** / ♦(include <trend_w.h> extern int sy£to,diast; extern int c1r,ca 1ib_flag» extern -float meen» void trend O { void trend_drew(int, int, int)} static x « TREND_X15 static int odd_val=0, int meen_vel» int i» i-f (x « TREND_X2) x = TREND_X15 c1r=0} for (i — 1» i<55 i++) /* clear window -for trend display*/ i-f ( (x+ i) < TREND_X2) draw_line(x+i,TREND_YH1»x +i,TREND_Y2-2>J clr = l; i-f (celib_-flag == 1) ( draw_ 1 i ne (x, TREND_Y1 +1, x, TREND_Y2-2) ,* calib_-flag = 0} } i-f (odd_val == 0) ( trend_draw(0, x, systo)} odd_vel * 1» 5 else ( trend_dr#.w (1, x, diast), odd_vaI * 0} } *rear._v?l * meen} trend_drew(2, x, meen_vel)5 ,·· ·* * ï j ! L.E. OFTRONICS (CC) /FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFüFFFFFFFF* •F File trer.d_dr.c F if l'lEme trend_draw * if if * if •F Usage void trend_draw if if (int num, int x,int val) if F if F Prototype in trend_w.h F F F F Description Print blood pressure F F trend. F F F F Return none F F F F Calls draw„_line F F F F Called by trend F F F F F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/ Finclude <trend_w.h> extern int clr; void trend_draw(int num, int x, int value) { static int yC3) = (0,0,0); int nexty; clr = IS nexty = TREND_Y2 - value/3; i-f <nexty<TREND_Yl) nexty=TREND_Yl; i-f <nexty>TREND_Y2) nexty=TREND_Y2; i-f (ytnuml == 0) ytnum) = nexty! draw_li ne(x,ytnum),x+2,nexty); ytnum) = nexty; > ï L.E. OPTRONICS (CC) I /**************************************** * File WORK.MODE.C * * Name work_mode - acquires * If processes and displays * * converted data. * * * * Usage void wark_mode()| * * * * Prototype In cnibp.h If * * * Description acquire data -from sensor* * process it, display the # * results graphically and * * numerically. * * * * Return value none * * * * Calls smooth.data * * display, value * * calc_new_factor * * wr ite.results * * * * Called by main * * * ****************************************/ «include <iport.h> «include <funct.h> extern int At 101, max,min,max.counter, af ter.cal ib; extern int max_acc,min_aec,end_calibrat ion) extern -float y.level} vo i d wor l._tnode () { int smooth_data()! int i,point} i-f (*end_ce 1 ibrat ion) start.cnibp()} •for (i=0> i<4} i++) /* Read the first five samples from the */ ACil= i nportb (IPORT) J /* sensor. #/ for ti=li i<*60} i + +) /* For i = l to 60 do: #/ { /* t */ point«smaath_data<M /* Enter a new sample and smooth it, */ min=MIN.OF(point,inin)} /* */ max=MAX_0F(point,max)} if (i%3 “* 0) /* Display every third sample. */ display.value (point)} /* */ ) /* > */ max.acc * max.acc + max) min.acc * min.acc + min} ire.x_counter + + } /* calculations. */ gotoxyf70,20); /* Go to clock window. */ CLOCK(IS /# Display current time. */ i-f (ef ter.cel ib) /* If after calibration then calculate */ ca 1 c_new_f actor () } /* the new factor of systolic It diastolic.*/ ) /* end of work mode */ ! L.E. OPTRONICS <CC> I * Pile- ·' write_rs.c # * Neme write_results - displays# * results numerically. # * * * ÜEc^e void wr i te_r-esu 11 s () » # * * * Description displays numerical res- # * ults in the appropriate * * pieces on the screen. # * * * Return value none * * * * Calls gotoxy * * * * Called by worl<_mode # * * ******************************·**********/ extern int max, min,max_counter,alarm_switch, maxi; extern int max_acc,min_ace{ extern int prev_max_e.cc, prev_min_acc, prev_max_cou.nter; extern int systD,diast,heart_p,hi9h_sys; extern -float systol ic, diastol ic, mean; extern -float fe.ctor_s; void write_resu1ts() { void gotoxy(int,int); int imean5 max = rnax_acc/max_counter, min = mi ri_acc/max_counter 5 , systo = systolic + f e.ctor-_s# (max - maxi) 5 /* Syet *= syst_-f actor * sys ’ t(frorn sensor) */ diast = systolic + factor_s#(min - maxi); /# Diast * d i ast_-f actor * d iast(-from sensor·)·#/ max = 0; min = 300» i-f ( (alarm_st-.'i tch) 6< (max >= high_sys)) /* If systolic over limit*/ the systolic high beep(9,76)» /* turn on alarm system. X/ gotoxy(71,2); printf("%3d",systo); /# Numerical display of systolic. ¥>! goto.:y(71,7)J pr i ntf (*'%3d", d iast) ( /# Numerical display of diastolic. */ gotoxy(71,12)5 imean = mean; pr i ritf ("%3d", imean) ; /# Numerice.1 display of mean. */ gotoxy(71,17); pr-intf (”%3d", hear-t_p) { /# Numerical display of pu lse rate. prev_max_acc = max_acc; pr-ev_mi n_acc *= min_acc; prev_mex_counter *= msx_counter! mex_ecc - 0? mex_counter· = 0; min_ecc = 0; ' L.E. OPTRONICS (CC) | * File St*rt_c.c * * etart_cnibp - star te host* * to cnibp communications.* * * * Usage void start_cnibp(); * * * * Prototype- in logic.h * * * * Description main caller tor host to * * cnibp communication driv-* * ers and protocol. * * * * Return value none * * * * Cells com_setup * * send_msg * * get_m * * get_msg * * disp_cal_res * * * * Called by main (casS.c module) * * * ****************************************/ ^include <dos.h> * include <logic.h> extern int atter_cal ib, cal ib_t lag,end_cal ibration; void stert_cnibp() { int i I long n,ir; struct time tmj i-f (end_cel ibration) { gett ime (Ertm) J CDm_setup()l /* setup communications at 9600,n,S,l */ atter_calib = 1$ /* initialize flag */ prepare_msg(1)t /* prepare START command to cnibp */ send_msg()5 /* send the commend to cnibp */ } e-nd_cal ibration = FALSE; nhile (end_calibration == FALSE! end__cal ifcretion = get_m()| /* pressure. */ •f (erd^cal ibration) r p^epere_msg(lB)J /* prepare DATA REQUEST command to cnibp */ send_msg(>i /* send the command to cnibp -*/ get„msg()| /* receive calibration data trom cnibp *7 disp_cal_res()« /* display data on screen */ c*lib_tleg * 1» set t itre (ttmM /* just tor cal-stop version */ } ! L.E. OFTRONICS (CC) | / * ¥ * ¥ ** * Μ**·***************************** * File corn_Eet.c * * Name com_Eetup - setup com * * parameters. * * * * Usage void com_B6tup() * * * * Description setup communicatioriB at * * 9600,n,8,1. * * * * Return value none ·* * * # Calls none * * * * Called by start_cnibp * * * ****************iHt********************##/ ♦t i nc 1 ude <dos. h > ♦(include <regist.h> void com_setup() { outpor-tb (LCR, 0x80) ; f* eet DLAB = 1 */ Dutportb(IER,0x00); E6t Divisor Latch LSE (DLL) tD 0 */ outpor-tb (RER, 12) 5 '* set Divisor Latch MSB (DLM) to 12 */ outportb(LCR,0x03)! ** set ε bits, 1 stop bit no par ity */ outportb(IER,0) ; reset Interrupt Enable Register */ ': L.E. OPTRONICS (CC) j /*************1Ηί·******************#****** * File Send_msg.c # * Neme send_msg - RS232 output * * driver * * * * Usage void send_msg() * * * * Description driver for sending mes- * * sages over the serial * * communication port. * * * # Return value none # * * * Calls none * * * * Called by start_cnifap # * * ****************************************/ «include <ia.h> extern char msgC83} void send_msg() { i nt i,j 5 for (i=0; i<=75 i++){ /* loop for sending 8 bytes of message */ write(3,(msg + i),l)i /# TXing the bytes via RS23Z part ·*/ for(j=0> j<=400> j++)} /* delay loop for syncronization #/ } 8902/46 : L.E. OPTRONICS (CC) I /**************************************** * File disp_cal.c * * Name d isp_cal—res - displays * * calibration results * * * * Usage void disp_cal_res() * * * * Prototype in comm_cas.h * * * * Description displays calibration * *' results on the system’s * * display. * * * * Return value none * * * * Calls none * * * * Called by start_cas * * 3( ***************************** *********** / extern -float systo 1 i c, d i asto 1 i c, mean; extern int heart_p; void disp_ca1_res() { gotoxy(71,2)j printf("%3.Of ",systolic); gotoxy(71,7)5 pr i ntf ( "V.3. Of " , d iastol ic) } cntcxy(71,12); printf("%3.Of ", mean )5 gotoxy(71,17)5 pr' i ntf ( "%d " ,heart_p)J } 38 'τ l L.E. OPTRONICS (CC> /**************************************** * File get_jn.c * * Neme get_m reads real time * * cuff pressure. * * * * Usage int get_m() * * * * Description reads real time cuff * *' pressure. * * * * Return value TRUE or FALSE ff * # * Calls none * * * * Called by start_enibp * * * ****************************************/ ♦(include <dos.h> ♦♦include <logic.h> ♦(include <regist.h> int get_in() ( char ch» static int tri_9_flag=0{ while (inportb(LSR) tc 0x01) { /ft while bit 0 of Line Control Register */ outportb(NCR,0x00)j /# is on, disable DTR or RTS */ ch * jnportb(RBR); /# gat character form receive buffer */ if (tri_9_flag > 2 Be ch == /# if last 4 characters are "959I9ICR" */ 13){ tri_9_t Jag * 0; /* reset flag indicating 3 *9"*s ·*/ return(TRUE)l /# terminate caller's while loop */ > if (ch == 57) { /* count successive ’^'s */ tr i_9_flag+ + | pr intf ( “ ", tr i^9_f lag) I } /* Λ necessary oddity ff/ els€ /* if no successive “P"*s reset flag tri_9_flag » 0$ outportb(MCR,0x02)I Be^ R-j-g ff/ > return(FALSE)l j /# wait for next character V 1 '*...............................-.....-........................i i L.E. OPTRONICS <CC) | --------------------_-----------------------------------------** /**************************************** * File prep_msg.c * * Neme prepere_mEg - prepares * * e message for trensmi- * * scion to cnibp. X * * * Usage void prepare_msg (int in)* * * * Description prepares a. message for * * transmission by setting * * the proper sequence of * * characters of a command.* * * * Return value none * * * * Calls none * * * * Called by start^cnibp * * * ****************************************/ extern char msgC81S void prepare_msg(int in) { int i{ char chs£18IC23={<0x44,0x37>, <0x44,0x38>, <0x44,0x391, <0x44,0x411, <0x44,0x421, <0x44,0x431, <0x44,0x441, <0x44,0x451, <0x44,0x461, <0x44,0x371, <0x44,0x381, <0x44,0x391, <0x44,0x411, <0x44,0x421, <0x44,0x431, <0x44,0x441, <0x44,0x451, <0x44,0x46111 char cmdtl81t23«=<<0x30, 0x311, <0x30,0x321, <0x30,0x331, <0x30,0x341, <0x30,0x351, <0x30,0x361, <0x30,0x371, <0x30,0x381, <0x30,0x391, <0x31,0x301, <0x31,0x311, <0x31,0x321, <0x31,0x331, <0x31,0x341, <0x31,0x351, <0x31,0x36), {0:31,0x371, {0x31,0x38 J} I I ***-****** *·** *******************·********** * p'.>ts the sprapriate characters in msg # *************^*******#*******************/ j * (in > 0){ m=gtl3 = cmdtin - 13t03; rrsgt23 = cmdtin - 13tl3} msgC53 = chstin - 13 C 031 msg[63 = chstin - 13tl3| J 3 *....................................................................1 I L.E. OPTRONICS (CC) I ____________________________________________________________________*/ /**************************************** * File get_msg.c * * Name get_msg - RS232 input # * driver. * * * * Usage int get_msg() * * * * Description driver for receiving * * messages over the serial* * communication port. * * * * Return value 0 if RX successful. * * NOSTX if no text RXed * * * * Calls none * * * * Called by start_cnibp * * * ****************************************/ «include <des.h> «include <time.h> «include <regist.h> «include <logic.h> «include <text.h> «include <hart_w.h> extern -float systol i c, d i astol ic, mean» extern int heart_p> exter n int dr ί extern int prev_max_acc, prev_min_acc, prev_max_eounterJ int get_msgt) t int re-f_up, re-f_bot> int i,j, done,ref} char rmsgt37),aC801 ; int line; long timei; char *str_now; for <i*Oii<80)i + +) aCil = 32J done = FALSE; /* set initial condition for whi le loop */ i = O; /* initialize message index */ whilet(done) l /* while no ETX receive characte rs */ it (inportblLSR) fc 0x01)t /* it bit 0 ot Line Control Regi ster! on*/ outportb(MCR.OxOO); /* no DTR or RTS */ rmsgti) « inportb(RBR); /* read character trom R eceive Buffer */ ittrmsgCil ** ETX) /* if ETX terminate while loop */ done = TRUE; + + i1 /* otherwise increment m essage index */ } ootpor tb (MCP, 0-.-02) { /# set F.T3 /a********#***#******##***#***##·### # display rtciivid dat· on screen * ff·##·##·#*##*#*#####***#***##*******#/ syttolic ~ 100#(rmsgl133-48) ♦ 10#(rmsgl143-46) +(rmsgl153-4£*>5 .gj ' ^ * dieftDlic = 100 * (rmsgtlól - 40) + 10 # (rmsgI173 - 4ó) + (rκ&^1 . _ 4ó> ’ mean * 100 * <rmsgtl93 - 46) * 10 * (rh)sgC203 - 46) + (rmsgTZi3 heart_p * 100#<rmsg1243-48) + 10#(rmsgt253-46) +(rmsg!263-46)» scree* for (1 = 1J i<HART_Xl| i*+) /·# clean previous marfc£ on #/ c 1 r=05 draw_l i ne < i, HAF.T_Y1, i , HART_Y25 ! 3 c 1 r = 1 { d raw_1i ne(HART_X1-1,HART_Y1,HART_X1-1,HART_Y2)J r#f_up = HART_Y2 - (prev_max_*cc/prev_max_cour»ter) /HART_SCALES re#_bot * HART_Y2 - (prev_min_acc/prev_max_counter) /HART_SCALE5 ref*systolicS Iine=ref_up/10 » gotoxy <1,1i ne)} print# (“%3d*. re-f) I ref=diastolic! 1ine=ref_bot/10 + 2ΐ gotoxy(1,1ine)! pr i ntf (“%3d , ref ) { draw_line(3,ref_up,HART_Xl-l,ref_up> 5 draw_li ne(3,ref_bot,HART_X1-1,re#_bot > 5 •103 = 10J t ime (l?t imel); str_non * et ime (L-t imel) J for (i = 3{ i<9} i++) at »3 * #(str_now+10.i) I al!73 = rmsgl133 » aC183 = rmsg(I43; •1193 = rmsg(153> a 1283 * rmsgl1935 el29] = rmsgl2035 el303 = rmsgI213l a!393 = rmsgl163» a(403 = rmsgll735 •1413 * rmsgl183; a1503 * rmsgl243} • 1513 *= rmsgl2531 •1523 “ ?msgt263l a 1603 <= 361 if (biosprint(2,0,03 ** 0x90) write(4,a,60)5 return(O)1 3 _bss . segment stack ’stack’ DW 128 DUP(?) _bss ends dgroup group _data,_bss _data segment ascii_tab db "0123456789" hour dw ?,’Φ’ minute dw ?,’$’ second dw ?, ’$’ separat db ten db 10 thu dw 1092 eight db 18 cur_pos dw 163+h toprint db 1 dup(’d’),’*’ _data ends _print_string macro mov ah,9 int 21h endm ; Code segment containing the main and subroutines. !================================================================= _text SEGMENT PUBLIC assume cs:_text,ds:dgroup pub lie _CLOCK _CL0CK proc near mov ax,dgroup «establish data segment mov ds,ax j ΐ ; blank cursor and get time from system clock j + get_t ime! mov ch,0ffh 5trans+er cursor blanking code mov ah,l f~ ta BIOS int lOh J mov ah,0 iget time o+ day int lah Jusing BIOS j-------- lea bx,ascii_tab Iget address ai translation tabl e » “ i translate returned value for hour into ASCII ; + hi: mov ax,cx Iget value +or hour in AX div ten tdivde by 10 to convert to decim al 1 xlat ascii_tab {translate to ASCII xchg ah,al {exchange AH and AL xlat ascii_tab Itrnaslate the remainder to ASCI xchg al,ah {get back in right order +or dim play mov hour,ax (save value for display I tr»nel*te rHurntd vtlut for minutes into ASCII 1 + ml: mov ax,dx ( xor dx,dx div thu div ten xlat ascii_tab xchg ah,al xlat ascii_tab xchg a I, ah mov minute,ax 1 - i translate returned value for seconds into ASCII t + si: mov ax,dx div eight xor ah,ah div ten xlat ascii_tab xchg ah,al xlat ascii_tab xchg al,ah mov second,ax mov dx,cur_pos mov ah,2 int lOh disp_h: mov ax,hour push ax lea bx,toprint mov Cbx3,al mov dx,bx _print_etring pop ax xchg ah,al lea bx,toprint mov [bx3,al mov dx,bx _print_string lea dx,separat _print_*tring disp^mi mov ax,minute push ax lea bx.toprint mov rbxl,al mov dx,bx _print_*tring pop ax xchg ah,al lea bx,toprint mov Cbx3,al mov dx,bx _print_string lea dx,separat _print_*tring d i 5p_s: mov ex,second pufch ax lea bx,toprint moV (bxl,al mov dx,bx _print_etring pop ax xchg ah,al lea bx,toprint mov tbxJ,al mov dx,bx _prlnt_etrlng ret _CLOCK endp _text ends END13. A method according to any one of claims 9-12, characterized in that the blood flow in an artery is detected optically. ! L.E. OPTRDNICS (CC) I / XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX * Pile keycn 1.e * * Name main - main caller -far XX CM1BP eo-ftware system * XXX Usene · - X * * X Prototype in - cnibp.HXX * X Description main caller for system, X • X handling; user input, X X data acquisition, data * X processing, and data X X display. X X. * X. Return value none X X X X Calls graphic_init X X init X X 5ta.rt_cnibp X X work_mode X X gotoxy X c key_inp X X X X Called by none X X X xxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxx / ¥ inc1ude <dos.h> ♦ linelude <cnibp_in.h> me i n () t i n t i n i t (i n t), int num = l; / X variables declarations X / char-key_ch; struct time tm; graphic_init (); / X initialize graphic mode X / tm.ti_hour = 0! / X set clock to 0 * / t Tt>. t i _m i n = 0; tm.t i_sec = 0; tm.t i_hund = 0? sett ime (fetm) ΐ while (1) C switch (num) / X case * / t / X X / case 59: init <tmode) 1 / X <Fl> restore graphic mode It X / ex i t (0) 5 / X exit. * t case 60: / X <F2> system calibration (cnibp) It * / if (hartx> 220) num = 60i else (start_cnibp () | no_cycle * -11 num * = 1i) work_mode () i / X work * mode (sensor). X ^ break I / X X / case 61! Num * 1l / X <F3> trend on blood pressure. X / break} / * · * / cue 62: if (alarm ^ flag »0) / * <F4> set systolic high limit * 7 set_alarm ()} / # that turn on alarm system. * 7 else / * * / rewrite_main_menu ()} / # * / num * 1} / * * / break} / * * / case 63: if (alarm_flag == 1) £ / * <F5> increment of systolic * / high_sys + «10} / * high limit by ten units. * / gotoxy (23.23)} / * * / printf (”% 3d", high_sys)} num = lj break}} case 64: if (alarir ._ + lag == 1) £ / # <F6> decrement of systolic * 7 high_sys - = 10} / * high limit by ten units. # 7 gotoxy (23.23)} printf C% 3d ", high_sys)} num = 1; break)} case 65: if ((alarm_flag) & (alarm_switch == 1)) £ gotoxy (1,23)} printfC <F7> ALARM OFF ")} alarm_switch = 0}} else if (alarm_flag) £ alarm_switch = 1} gotoxy (1.23) I printf (" <F7> ALARM ON "))> num = 1; break} case 68: outportb (0x61, speaker_reset)) / # <F10> stop speaker. # / num = i | break} case 1: work_mode ()} / * 1: work-mode (sensor). * / break} / · * default: work_mode ()} / * default: work-mode (sensor). * / if (num «« 1) num «key_inp () j M ί. L.E. OPTRONICS (CC) I / XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX * File key_inp.c X * Name call the keys from new X * keyboard X * XX Usage - X * XX Prototype in - DOS.H * * KEY.H * * XX Description Read data from appropri —XX ate address and trans la — X · X te it to ASCII codes. * * * X Return value num - ASCII code X X X X Calls inportb X X X X Cal led by none χ X X xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx / «include <dos.h> «include <key.h> int key_inp () {static prev_key = OxFFFF; char key_ch} int num »key_ch = inportb (KEYPORT); switch (key_ch) t case Fl: num = 59 »break» case FZ: num = 60; break »case F3: if (prev_key! = F3) num = 61; else num = l; break; case F4: if (prev_key! = F4) num = 621 else num = l; break; c ** e F5: if (prev_key! = F5) num = 63; else num = l; break; case F6: if Cprev_key! = F6) num = 64J else num = l; break; case F7 '. if (prev_key! = F7) num = 65; else num = l; break) case F10; if <prev_key! * F10) num = 68 (else num = l; break; default: num * 1)> prev_key * key_ch; return (num)) J! L.E. OPTRONICS (CO * File beep.c * * N'sre beep * * * * * * Usage void beep (int, intJ; * * * * Prototype in cnibp.h * * * * Description turn on the speaker # * until <F10> is * * pressed. * * Return none. * * * * Calls none. # * * * Called by write results. # * * ********************* # ****** # *** · * # *** # ** / ♦♦ include <dos.h> extern int speaUer_resetj void beep (int divl, int div2) (i nt cv!, j Ϊ spel.er_reset = inportb (0x61) J c. 'tpor tb (0x43,0xB6) J ci'tpor tb (0x42, ie v2); O'jtportb (0x42, divl); cvl = (play.er_reset 3); outpor tb (0x61, cvl) j} '* ........-.---- -------------------------------------------------- ---- Ί! LE OFTROKI CS (CC) -------------------------------------- ------------------------------ 4 (/ / **************** ************************ * File calc_new.c * * Name calc_new_factor - * * computes cal ibratiori * * ί actor * * * * Usage void calc_new_ (actor- () 5 * * * * Prototype in cas.h * * * * Description compute factor against * * calibration results, for * * data processing. * * * * Return value none * * * * Calls none * * * * Called by work_mode * * * ************ **************************** / external int max, min5 extern int maxi, mini; extern float factor_s; extern int after_calibj extern float systolic, diastolic; void calc_new_factor () <int temp; maxi = max; mini = min; if ((temp = max-mini == 0) factor_s = 0.0; else C factor_s = (systolic-diastolic) / temp; / * systolic factor = * / after ^ calib = 0; / * Reset after-ealib flag. * />! LE OPTRONICS (CC) I / ********** - ***** ************************ * * File clear_w.c * * Name clear_window * * * * Usage * * * * Frototype in * * * * Description * * * * Return value * · * # * Calls * * * * Called by * * * *** *********************************** # - * / / * x = column y = raw wid = width o + window hght = height of window * / «include <dos.h> «include <videa.h> externally unsigned xaddr 16401, ysddr C20015 void clear_w i ndow (x, y, w id, hght) unsigned int x, y, wid, hght; r union REGS regsj regs.x.ax = 0x0600 »regs.h.bh = Oi regs.x.cx = CyaddrCyJ < <8)! xaddrCxlj regs.x.dx * (ty + hght) < <5)! xaddrtx + widl; i nt86 (VIDEO, S <regs, Lregs); > ί L.E. OPTRONICS (CC) | / **************************************** * File count_hp.c * * Name count_h_pulse * * * * * * Usa ^ e void count_h_pu1se (5} * * * * Prototype in casS.h * * * * Description Calculate the heart * * pulse. * * * Return none * * * * Calls none * * * * Called by disp1ay_value * * * * * ******************** X ******************* / extern int heart_p; extern int no_cycle> extern -float o 1 d_t irne, new_t ime; void count_h_pu1se () float h_pulse> if ((new_t ime == old_time) !! (no_cycle == -1)) heart_p = 05 else { h_pulse = (60.0 * no_cycle / 2.0) / (new_time - old-time); heart_p = h_pulsej}> JLE OPTRONICS (CC) I / ************** **** ****** **************** * File disp_val.c * * Nasty display_value - deep leys * * values graphically. * * * * Usege void display_value # * (int point) I * * * * Prototype in * * * * Description displays a value graph- * * icelly, in the -form of * * dot, and a line drawn * * from it to the last di— * * awn dot. * * * * Return value none * * * * Calls draw_line * * count_h_puises * * * * Called by work_mode * * * fHHHHMHMHHHHHHHHHHHUHHHHHHHHHHHHHHHHHHHHf / - ♦ (include <time.h> ♦♦ include <hart_w.h> ♦ (include <dos.h> «define X_DIST 2 extern float old_time, new_timel extern int c1r, no_cycle, hartx1 extern float mean, systolic, factor_sJ extern int max_acc, min_accJ extern int * ax_eounter, maxi {void display_value (int point) C int newy, i, j, oldx, ref (window_hight * HART_Y2 - HART_Ylj float epsilon “lE-5j struct time time_o! d, time_newl static int print_rate * 3j static int oldy * -l, x * HART_Xl + l | static long mean_point« OJ static float sum_mean 0.0J static float y _] # sheet * 0.0! static int cycle_x HART_X1 + 1, eycle ^ point * 01 newy point / HART_SCALEl / * Translate the signal to the dimensions * / newy »HART_Y2 - newyl / * of the display- window. * / if (oldy * -1) oldymnewyi c leer_wiridow (x + d, HART_Yl, 0, window> _hight) 1 if (newy <HART_Y1) newy * HART ~ Ylj oldx - x ->: _ riSTi if (oldx <HAPT_X1) oldx »HART_XlJ elr II draw_line (oldx, oldy, x, newyl | / * Draw the next connecting line. * / Draw_line (oldx, HAPT_YI-I» xfHART_Y | -l) f draw_J ir, e (Old>, HAF T_Y2, x, HART_Y2) I if (cvstolic) epsilon) / * after calibration * / (* va _ «» eai »+ point) ntean_paiHL rt | > if (((y_level> oldy) && (y_level <= newy))! ! ((y_level <oldy) 8 * &: <y_ieve 1> = newy))) {if <no_cycle == -1) {gettime (6 <time_old); old_time = time_old.ti_hour * 3600.0 + time_old.ti_min * 60.0} old_time = ald_time + time_old.ti_sec + time_o1d.ti_hund / 100.0}} if t (x-eycle_x)> cycle_point / 4) C no_cyc1e ++; gett ime (8ct ime_new); new_time = time_new.ti_haur # 3600.0 + time_new.ti_min * 60.0 »new_time = new_time + time_new.ti_sec + time_new.ti_hund / 100.0; cycle_x = xj}> x + = x_dist; oldy = newyj if (x> HART_X2> / * If it reached the end of the * f i / * display-window l *, / courit_h_pulse () I / # Calculate hear t pulse. y_level = (0.5 * <max_acc - min_acc) + min_acc) / max_counter; y_level = HART_Y2 - y_level / HART_SCALE; if (systolic> epsiIonJ mean = systolic + factor_s * (sum_mean / mean_point) - factor__s * maxi; sum_mean = 0.0J mean_point »0; write_results <) 5 / * Write measuring results. * / trend <); / # Write systolic trend. * / if (no_cycle> 0) eyele_point = (HART_X2 - HART_X1) / no_cycle; else cycle_point = <HART_X2 - HART_X1) / 11; no_cycle = -1; x = HART_Xl + 15 / * * / c1ear_w i ndow (x + 3, HART_Y1, X_DIST, windaw_h ight); draw_box (HART_X1, HART_Y1-1, HART_X2 + 1, HART_Y2> 5 cycle_x = xl pr i nt_rate + + 5 if ((print_rate% 3) == 0) pr i nt_results (>; print_rate = 0;}} / *> * / hartx = x »! LE OPTRONICS (CO Λ * ------------------------- heêder -files included --------- -------------- # / extern unsigned yaddrt2001; extern unsigned xaddrt6401; extern char shi-ftC6403j extern char pointtó40] J extern int clr> extern char -far iscrn! / If **** ^ ********* · * ## ** # ***** # * ^ ******** # ** * File dot.c * * Name dot - draws a dot . * * * * Usage void dot (int x, int y); * * * * Prototype in cas.h # * * * Description computes the of-fset in * * the screen bu-ffer of * * the bit to be set. * * * * Return value none * * * * Cal Is none * * # ¥ Called by dmw_l ine * * * *********************** ***************** / void dot (int x, int y) {unsigned totalJ total = xaddrlxl + yaddrtyl »scrnEtotalJ = (dr < <shiftlxl) i (scrnttotall k pointCxj); >! L.E. OPTRONICS (CC) | / **************** ********** ************** * File draw_l.c * * Name draw_line - draws a line * * * * Usage void draw_line * * (int xl, yl, x2, y2) f * * * * Prototype in casS.h * * * * Description draws line -from (XI, Yl) * * to (X2, Y2). * * * * Return value none * * * * Calls dot * * * * Called by disp1ay_value * * draw_screen * * draw_bax * * * ********************* ******************* / void draw_line (int xl, int yl, int x2, int y2) {void dot (int x, int y); int x, y, xstep, ystep, dx, dy, direct; x = x 1; y = yl; xstep = 1; ystep = 1j i-f (xl> x2) xstep = -1; i-f (yl> y2) ystep = -15 dx = abs (x2 - xl) 5 dy = abs (y2 - y1); it (dx == 0) direct = -15 else direct = 0} while (! ( <x == x2) & 8c (y == y2))) (dot (x, y) 5 i-f (direct <0) (y = y + ystep; direct = direct + dx;} else {x = x + xstep; direct = direct - dy;}: LE OPTRONICS (CCJ / ******** # *** * ****** · ***** · **************** * File draw_box.c * * Name draw_box - draws a box. * * * * Usage void draw_box # * (int xl, y1, x2, y2) 5 * * * * Prototype in cas3.h * * * * Description draws a box bounded by * * colomns XI, X2 and rows * * Y1, Y2. * * * * Return value none * * * * Calls draw_line * * * · * Called by draw, screen * * * ******** ******************* *********** / void draw_boxiint xl, int yl, int x2, int y2) {void di'aw_line (int xl, int yl, int x2, int y2)! dra w_ 1 i ne ( x 1, y 1, x2, y 1) 5 dr aw_line (x2, yl, x2, y2) 5 di-aw_l ine (x2, y2, xl, y2) 5 drat "_l i ne (, v 1, y2, xl, yl> ï}! LE OPTEONICS (CO! / **** + ************************** + ***** * ++ + File draw_Ecr.c * + Name dran_5creen - draws the * * functional screen. * * * + Usage void draw_screen () i * * * * Prototype in trend_w.h, hart_w.h * * * + Descri ption draws all the windows * * far graphic and numeric * + displays of parameters. + * + * Return value none * * * + Calls draw_box + * draw_line + * gotoxy * * rewrite_main_menu * * * * Called by graphic_init + * * ****************** ******** + ***** ++ *** + ** / ♦♦ include <trend_w.h> ♦♦ include <hart_w.h> void draw_screen () {i n t i; draw_box (HART_X1, HART_Y1-1, HART_X2 + 1, HART_Y2); / * Graph window. * / draw_box (TREND_X1, TREND_Y1, TREND_X2 + 1, TREND_Y2); / * History-graph window. * / Draw_box (0, ISO, 500,195) ί / * Menu window. * / gotoxy (1.21) J / * trend scale mark * / printfC 0 "); gotoxy (1.16)> printf (" 120 "); gotoxy (1.11) 1 printf (" 240 ") 5 for (i = 0j i <3; i + +) draw_line (TREND_X1-10,110 + 20 * i, TREND_X1,110 + 20 * i) (draw_box (540> 13,611,27) t / * Systolic window. * / draw_box (540,53,611,67) I / * Diastolic window. * / Draw_box (540,93,611,107)! / * Mean window. * / Draw_box <540,133,611,147); / * Heart pulse window. * / draw_box (540,153,634,170) {/ * Clock window. * / gotoxy (64.22); printf ("ICT LE ISRAEL"); gotoxy (64.23); printf ("CNIBP V: l.00 *) J draw_box <505,172,635,195) 1 / * ICT ISRAEL window * / for (i = l; K6S i ++) (gotoxy ((3 + 10 * i), 21) (printf <"% d", (5 * i));> gotoxy (68,0) t printf ("SYSTOLIC"); gotoxy <6S, 5) (printf ("DIASTOLIC")! Gotoxy (6Θ, 10)! Printf ("MEAN EP")! Gotoxy (68,15) I printf ("H. RATE"), · rewr 11 & _rp j ri_meru 1 ! ·! LE OPTRONICS (CC) j / **************************************** * File getmode.c * * Name getmode - gets display * * adapter type and mode. * * * * Usage int getmode () 5 * * * * Prototype in casS.h * * * * Description gets mode of display ad- * * apter. * * * * Return value mode of adapter card. * * * * Calls none * * * * Called by graphic_init * * * *************** ***** ******************** / «include <dcs.h> int getmode () {union REGS inregs, outregs! inregs.h.ah = OxOfJ inregs.h.al = 0; i ntSé (0x10, S <i nregs, ficoutregs); return (outregs. h. al) \}! L.E. OPTRONICS (CC) / ** # * # ****** # * # * ###### *** ### ** #### * #### * # * File gatoxy.c * * Name gatoxy - position cursor # * * # Usage void gotoxy (int x, y)> # # * * Prototype in cas.h # * * # Description position cursor at Χ, Υ # # coordinates. # # * # Return value none * * * * Calls none * * * # Called by many # * # ## **** # ** # *** # * ## *** ## ***** # **** ## * ## *** / «include <dos.h> «include <video.h> void gotoxy (int x, int y) £ union REGS regsj regs.h.ah = 2; regs.h.dh = yj regs.h.d1 = x 5 r-egs. h. bh = 0; i r. tS6 (VIDEO, Scregs, kregs); }! L.E. OPTRONICS ICC) | / **************************************** * File graph_in.c * * Name graphical nit * * * * Usage void graphic_init (); * * * * Prototype in cas8.h * * * * Description initializing hi - res * * graphics on a CGA card, * * and drawing the systems * * -functional screen. * * * * Return value none * * * * Calls init * * draw_screen * * * * Called by main * * * ************************ **************** / extern int tmodej void graphic_init () {int getmode ()! void startsprinter () J int init (int); void draw_5creen () j / * ------------------------------------------- --------------------- * / / tmode = getmodeC) j / * Save the current mode. * / / init (6 >> / * Initialize graphic mode. * / / stert_printer ()} draw_sereen () f / * Display system's screen. * / /} I LE OPTRONICS (CC) / ****** # * ** ## ** # ** ## * # * # * # * # **** # ** # * ### * * File · init.e * * Name init - intialize display # * adapter to graphic mode. # * * # Usage int inittint num)} * # * * Prototype in # * * # Description initializes CGA card to # # hi-res graphic mode. # # * * Return value mode adapter card is in. # * * # Calls none # * # # Called by main # # grahpic_init * # * ♦ (include <das.h> ♦♦ include <video.h> extern unsigned yaddrE2003) extern unsigned xaddr £ 6401) extern char shiftC6403) extern char pointC6401) extern char -far #scrn) int inittint num) {int indx * 0, indx2 = 0} static int max_cl r, max_x , max_y, sh if ter; unsigned clr „wid, mask; union REGS inregs, outregsj if (num> 6) {puts ("invade id mode. \ x07")} exit (0)} y switch (num) {case 4: max_clr 3 (max_x 320) max_y * 200; shifter = 4) clr_wid 2) break) case 5) max_clr “1) max_x * 320) max_y - 200) shifter 4) clr_wid 2) break) case 6: max_clr * 1) max_x * 640) max_y 200) shifter» 8) c1r_w id «11 oreax? } if (nuM> 3) {/ # For graphics modes only * / while (indx <max_y) C / ^ - already calculate 1 y offsets # / yaddrCindxl 80 * indx2S ++ indx? yaddrC indxl * <80 * indx2) + 0x20005 ++ indxj ++ indx2? > for (indx * 0} indx <max ^ x? ++ indx) <mask * 0x80 >> (clr_wid * (indx X shifter))? if (nun ά) {/ * · Medium resolution offsets * / mask 1 = (mask >> 1)? shiftCindxl »6 - (clr_wid * (indx * shifter)); } else High resolution offsets * / shiftCindxl = 7 - (indx X shifter)? pointCindxl * ~ mask; xaddrCindxl * indx / shifter? > inregs.h.ah “0? inregs.h.al * numl int86 (VIDE0,8iinregs, ldOutregs)? return (num) | > / * end of init * / i L.E. OPTRONICS (CC) * Fi le pr int_rs.c * * Name print_results # * * * * * Usage void print_results (); * * * * Prototype ir. Cas.h * * * # Description Print blood pressure * i results. * * * i Return none * * * * Cal 1 s none ff * * * Called by disp1ay_value * * * * * ************************ **************** / «include <bios.h> «include <time.h> extern int systo, diast, heart_p; extern -float mean »pr i nt_results () {int i, at 813, mean_val; long timelj char #str_now »for <i = 0ji <81ji + +) atil = ""; et813 = "/ oi time (ktimel); Etr_now = ct ime (let imel) 5 for (i = l5 i <9j i ++) at i3 = * (str_now + 10 + i); at 17 3 = '0' + systo / 100J a 118 3 = '0' + (systo% 100) / 105 at 193 »'0' + systo% 105 mean_val = mean; aC283 = Ό + + mean_val / 100; at293 = "0" + (mean_val% 100) / 10; at303 = "0" + mean_val% 105 at393 = 48 + diast / 100; at403 = 48 + (diasty.100) / 10; at 413 = 48 + diast'AlOJ at503 = 43 + heart_p / 100; e 1513 = 48 + (heart_p% 100> / 10; at523 = 48 + heart_p% 10; at0 3 «= 10! if (biosprint (2,0,0) == 0x90) write (4, a, 160); }! LE OPTRONICS (CC) | / *************************************** File rewrite , c * * Name rewrite_main_menu # * * * # * Usage void rewr i te_main_mer.u (); * * * * Prototype in * * * K Description * * * * * * Return none. * * * * Calls none # * * * Called by * * * **************************************** / external int c1r, alarm_f1agj rewr i te_mai n_menu () {void draw_line (int xl, int yl, int x2, int y2); void gotaxy (int x, int y); i nt i; alarn_flag = 0; c1r = 0; draw_line ( 120,181,120,195); draw_li ne (220,181,220,195); dr aw_li ne (290,181,290,195); draw_l i ne (370, 181,370, 195), * gotoxy (1,23) 1 pr i ntf ("FI: EXIT F2." CALIB F3: HIST0RY F4: SET ALARM "); for (i = i; i <= 4; i ++) {clr = ljdraw_line (100 * i, 180,100 * i, 195);>> ί L.E. OPTRONICS (CC) | / **************************************** * File Bet_al r. c * * Name set_alarm * * * * * * Usage void set_alarm (); * * * * Prototype in * * * * Description Display alarm menu. * * window and set alarm * * flag. * * Return none. * * * * Calls draw_line, gotoxy * * draw_box. * * Called by work_mode. * * * If *************************************** / ♦ (include <ccnio.h> extern int c1r, alarm_f1ag, high_sys, alarm_switch; void set_alarm <) {void gotoxytint x, int y); void draw_line (int xl, int yl, int x2, int y2) 5 i nt i J alarm_-flag = 1; gotoxy (1.23) 5 pr i nt-f (" <F7> ALARM OFF SYS =% 3d <F5> UP <F6> D0WN <F4> MAIN MENU ",) 5} h igh _SyS c1r = 0; for (i = l 5 i <= 4; i ++) draw_line (100 * i, 181,100 * i, 195) 5 clr = 1; draw_line (120,181,120,195) 5 draw_line (220,181,220,195) J draw_line (290,181,290,195) J dr aw_1ine (370,181,370,195) 5 if (alarm_switch) {gotoxy (12,23) 5 print-f ("N -);}>) i: L. OPTRONICS (CC) / **************************************** * File smooth_d .c * * Neme smooth_data - smoothes * if converted data * * * * Usage int smooth_data () f * * * * Prototype in cnibp.h * * * * Description smooth_data gets the * * arithmetic average of a * * shifting window of x * * samples at a time, to * * get a smoothed curve of * * the sampled data. * * * * Return value smooth_data returns the * if value of the new V coo- * * rdinate of the smoothed * * sample. * * * * Calls none * * * if Called by work_mode * * * ********************************** ****** / ♦ • include <dos.h> «include <ipcrt.h> extern int Atl03} int smooth_data () {int i, sum = 0, max_A, min_A; ΑΓ43 = inportb (IPORT) 5 / * Recieve the sixth sample. * / if ((AC43> ZAO) ll (AC43 <1)) AC43 = inpartb (ÏP0RT)! for <i —0 »i <5 | i ++) / * Sun up the last six samples. * / sum = suit. + Ati3S for (i = 05 i <45 i ++) ΑΓ i 3 = AIi +13 5 retur n (suir / 5) 5 / * Return average of last six samples * / 3! L. E. OFTP.ONICS (CC)! / ** f ^ * -) (******** · ****** · ****************** · ** * File start_pr. c * * Name start_printer * * * * * * Usage * * * * * * Prototype in cas.h # * * * Description # * * * * * * * * * * * Return value none # * * * Calls * * * * * * * * Cal led by * K # ************************************** ** / ♦ (include <conio.h> ♦♦ include <bios.h> st => rt_printer () C che ** ilSOl = ”\ r." J char ataoi = "ICT Ltd Rehovo t, ISRAEL \ n" {char crSOl = "BPTEST PRO J E C T \ n"; char dCeoi = "date: \ n'j char · eCeoi =” nameitn "! char bCEOl = H notes: \ n "J char gC803 =» TIME SYSTOLIC MEAN DIASTOLIC HEART RATE \ n 5 if (biosprint (2,0,0) == 0x90) {write (4, +, 80)! wr i te (4, a, 80)> wr i te (4, c, 80) 5 wr ite (4, d, 80) I wr i te (4, e, 80) {wr i te (4, b, 80) } write (4,9,80) f>); LE OFTRONICS (CC) | / ****************************** ********** * F j! E trend.c * * Neme trend * f * * * * Usage void tr end O {* * * · * Prototype in * * * * Description Print blood pressure * * trend. * * * * Return none * * * * Cells trend_draw * * * · * Celled by displey_value * * * * * ********************** ****************** / ♦ (include <trend_w.h> extern int sy £ to, diast; extern int c1r, ca 1ib_flag »extern -float meen» void trend O {void trend_drew (int, int, int)} static x «TREND_X15 static int odd_val = 0, int meen_vel» int i »if (x« TREND_X2) x = TREND_X15 c1r = 0} for (i - 1 »i <55 i ++) / * clear window -for trend display * / i-f ((x + i) <TREND_X2) draw_line (x + i, TREND_YH1 »x + i, TREND_Y2-2> J clr = l; if (celib_-flag == 1) (draw_ 1 i ne (x, TREND_Y1 +1, x, TREND_Y2-2 ), * calib_-flag = 0}} if (odd_val == 0) (trend_draw (0, x, systo)} odd_vel * 1 »5 else (trend_dr # .w (1, x, diast), odd_vaI * 0} } * rear._v? l * meen} trend_drew (2, x, meen_vel) 5, ·· · * * ï j! LE OFTRONICS (CC) / FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFüFFFFFFFFFF * • F File trer.d_dr.c F if l'lEme trend_draw * if if * if • F Usage void trend_draw if if (int num, int x, int val) if F if F Prototype in trend_w.h FFFF Description Print blood pressure FF trend. FFFF Return none FFFF Calls draw „_line FFFF Called by trend FFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF / Finclude <trend_w.h> extern int clr; void trend_draw (int num, int x, int value) {static int yC3) = (0,0,0); int nexty; clr = IS nexty = TREND_Y2 - value / 3; i-f <nexty <TREND_Yl) nexty = TREND_Yl; i-f <nexty> TREND_Y2) nexty = TREND_Y2; i-f (ytnuml == 0) ytnum) = nexty! draw_li ne (x, ytnum), x + 2, nexty); ytnum) = nexty; > ï L.E. OPTRONICS (CC) I / **************************************** * File WORK. MODE.C * * Name work_mode - acquires * If processes and displays * * converted data. * * * * Usage void wark_mode () | * * * * Prototype In cnibp.h If * * * Description acquire data -from sensor * * process it, display the # * results graphically and * * numerically. * * * * Return value none * * * * Calls smooth.data * * display, value * * calc_new_factor * * wr ite.results * * * * Called by main * * * *********** ***************************** / «include <iport.h> «include <funct.h> extern int At 101, max, min, max.counter, af ter.cal ib; extern int max_acc, min_aec, end_calibrat ion) extern -float y.level} vo i d wor l._tnode () {int smooth_data ()! int i, point} i-f (* end_ce 1 ibrat ion) start.cnibp ()} • for (i = 0> i <4} i ++) / * Read the first five samples from the * / ACil = i nportb (IPORT) J / * sensor. # / for ti = li i <* 60} i + +) / * For i = l to 60 do: # / {/ * t * / point «smaath_data <M / * Enter a new sample and smooth it, * / min = MIN.OF (point, inin)} / * * / max = MAX_0F (point, max)} if (i% 3 “* 0) / * Display every third sample. * / display.value (point)} / * * /) / *> * / max.acc * max.acc + max) min.acc * min.acc + min} ire.x_counter + +} / * calculations. * / gotoxyf70.20); / * Go to clock window. * / CLOCK (IS / # Display current time. * / If (ef ter.cel ib) / * If after calibration then calculate * / ca 1 c_new_f actor ()} / * the new factor of systolic It diastolic. * /) / * end of work mode * /! L.E. OPTRONICS <CC> I * Pile- · 'write_rs.c # * Neme write_results - displays # * results numerically. # * * * ÜEc ^ e void wr i te_r-esu 11 s () »# * * * Description displays numerical res- # * ults in the appropriate * * pieces on the screen. # * * * Return value none * * * * Calls gotoxy * * * * Called by worl <_mode # * * ****************************** ********** / external int max , min, max_counter, alarm_switch, maxi; extern int max_acc, min_ace {extern int prev_max_e.cc, prev_min_acc, prev_max_cou.nter; extern int systD, diast, heart_p, hi9h_sys; extern-float systol ic, diastol ic, mean; external -float fe.ctor_s; void write_resu1ts () {void gotoxy (int, int); int imean5 max = rnax_acc / max_counter, min = mi ri_acc / max_counter 5, systo = systolic + f e.ctor-_s # (max - maxi) 5 / * syet * = syst_-f actor * sys' t (frorn sensor) * / diast = systolic + factor_s # (min - maxi); / # Diast * d i ast_-f actor * d iast (-from sensor ·) # / max = 0; min = 300 »i-f ((alarm_st -. 'i tch) 6 <(max> = high_sys)) / * If systolic over limit * / the systolic high beep (9.76) »/ * turn on alarm system. X / gotoxy (71.2); printf ("% 3d", systo); / # Numerical display of systolic. ¥>! goto.:y(71,7)J pr i ntf (* '% 3d ", d iast) (/ # Numerical display of diastolic. * / gotoxy (71,12) 5 imean = mean; pr i ritf ("% 3d ", imean); / # Numerice.1 display of mean. * / Gotoxy (71.17); pr-intf (”% 3d ", hear-t_p) {/ # Numerical display of pulse rate. Prev_max_acc = max_acc ; pr-ev_mi n_acc * = min_acc; prev_mex_counter * = msx_counter! mex_ecc - 0? mex_counter · = 0; min_ecc = 0; 'LE OPTRONICS (CC) | * File St * rt_c.c * * etart_cnibp - star te host * * to cnibp communications. * * * * Usage void start_cnibp (); * * * * Prototype- in logic.h * * * * Description main caller tor host to * * cnibp communication driv- * * ers and protocol. * * * * Return value none * * * * Cells com_setup * * send_msg * * get_m * * get_msg * * disp_cal_res * * * * Called by main (casS.c module) * * * ************* *************************** / ^ include <dos.h> * include <logic.h> extern int atter_cal ib, cal ib_t lag, end_cal ibration; void stert_cnibp () {int i I long n, ir; struct time tmj if (end_cel ibration) {gett ime (Ertm) J CDm_setup () l / * setup communications at 9600, n, S, l * / atter_calib = 1 $ / * initialize flag * / prepare_msg (1) t / * prepare START command to cnibp * / send_msg () 5 / * send the commend to cnibp * /} e-nd_cal ibration = FALSE; nhile (end_calibration == FALSE! end__cal ifcretion = get_m () | / * pressure. * / • f (erd ^ cal ibration) rp ^ epere_msg (lB) J / * prepare DATA REQUEST command to cnibp * / send_msg (> i / * send the command to cnibp - * / get „msg () | / * receive calibration data trom cnibp * 7 disp_cal_res ()« / * display data on screen * / c * lib_tleg * 1 »set t itre (ttmM / * just tor cal-stop version * /}! LE OFTRONICS (CC) | / * ¥ * ¥ ** * Μ ** · *********************** ****** * File corn_Eet.c * * Name com_Eetup - setup com * * parameters. * * * * Usage void com_B6tup () * * * * Description setup communicatioriB at * * 9600, n, 8.1. * * * * Return value none · * * * # Calls none * * * * Called by start_cnibp * * * **************** iHt ********** ********** ## / ♦ ti nc 1 ude <dos. h> ♦ (include <regist.h> void com_setup () {outpor-tb (LCR, 0x80); f * eat DLAB = 1 * / Dutportb (IER, 0x00); E6t Divisor Latch LSE (DLL) tD 0 * / outpor-tb (RER, 12) 5 '* set Divisor Latch MSB (DLM) to 12 * / outportb (LCR, 0x03)! ** set ε bits, 1 stop bit no parity * / outportb (IER, 0); reset Interrupt Enable Register * / ': L.E. OPTRONICS (CC) j / ************* 1Ηί · ****************** # ****** * File Send_msg. c # * Neme send_msg - RS232 output * * driver * * * * Usage void send_msg () * * * * Description driver for sending mes- * * sages over the serial * * communication port. * * * # Return value none # * * * Calls none * * * * Called by start_cnifap # * * *************************** ************* / «include <ia.h> external char msgC83} void send_msg () {i nt i, j 5 for (i = 0; i <= 75 i ++) {/ * loop for sending 8 bytes of message * / write (3, (msg + i), l) i / # TXing the bytes via RS23Z part * / for (j = 0> j <= 400> j ++)} / * delay loop for syncronization # /} 8902/46: L.E. OPTRONICS (CC) I / **************************************** * File disp_cal. c * * Name d isp_cal — res - displays * * calibration results * * * * Usage void disp_cal_res () * * * * Prototype in comm_cas.h * * * * Description displays calibration * * 'results on the system's * * display. * * * * Return value none * * * * Calls none * * * * Called by start_cas * * 3 (************************** *** *********** / extern-float systo 1 ic, di asto 1 ic, mean; extern int heart_p; void disp_ca1_res () {gotoxy (71.2) j printf ("% 3 .Or ", systolic); gotoxy (71.7) 5 pr i ntf (" V.3. Of ", d iastol ic)} cntcxy (71.12); printf ("% 3.Of ", mean) 5 gotoxy (71.17) 5 pr 'i ntf ("% d", heart_p) J} 38' τ l LE OPTRONICS (CC> / ******************* ********************* * File get_jn.c * * Neme get_m reads real time * * cuff pressure. * * * * Usage int get_m () * * * * Description reads real time cuff * * 'pressure. * * * * Return value TRUE or FALSE ff * # * Calls none * * * * Called by start_enibp * * * ************** ************************** / ♦ (include <dos.h> ♦♦ include <logic.h> ♦ (include <regist.h> int get_in () (char ch »static int tri_9_flag = 0 {while (inportb (LSR) tc 0x01) {/ ft while bit 0 or Line Control Register * / outportb (NCR, 0x00) j / # on, disable DTR or RTS * / ch * jnportb (RBR); / # gat character form receive buffer * / if (tri_9_flag> 2 Be ch == / # if last 4 characters are "959I9ICR" * / 13) {tri_9_t Jag * 0; / * reset flag indicating 3 * 9 "* s · * / return (TRUE) l / # terminate caller's while loop * /> if (ch == 57) {/ * count successive '^' s * / tr i_9_flag + + | pr intf (“", tr i ^ 9_f lag) I} / * Λ necessary oddity ff / els € / * if no successive “P" * s reset flag tri_9_flag »0 $ outportb (MCR, 0x02) I Be ^ Rjg ff /> return (FALSE) lj / # wait for next character V 1 '* .............................. .-.....-........................ ii LE OPTRONICS <CC) | --------------------_----------------------------- ------------ ** / *********************************** ***** * File prep_msg.c * * Neme prepere_mEg - prepares * * e message for trensmi- * * scion to cnibp. X * * * Usage void prepare_msg (int in) * * * * Description prepares a. Message for * * transmission by setting * * the proper sequence of * * characters of a command. * * * * Return value none * * * * Calls none * * * * Called by start ^ cnibp * * * ************************************ **** / external char msgC81S void prepare_msg (int in) {int i {char chs £ 18IC23 = { <0x44.0x37>, <0x44.0x38>, <0x44.0x391, <0x44.0x411, <0x44.0x421, <0x44.0x431, <0x44.0x441, <0x44.0x451, <0x44.0x461, <0x44.0x371, <0x44.0x381, <0x44.0x391, <0x44.0x411, <0x44.0x421, <0x44.0x431, <0x44.0x441, <0x44.0x451, <0x44,0x46111 char cmdtl81t23 «= < <0x30, 0x311, <0x30.0x321, <0x30.0x331, <0x30.0x341, <0x30.0x351, <0x30.0x361, <0x30.0x371, <0x30.0x381, <0x30.0x391, <0x31.0x301, <0x31.0x311, <0x31.0x321, <0x31.0x331, <0x31.0x341, <0x31.0x351, <0x31.0x36), {0: 31.0x371, {0x31.0x38 J} II *** - ****** * ** **************** *** ********** * p '.> Ts the sprapriate characters in msg # ************* ^ ******* # ** ***************** / j * (in> 0) {m = gtl3 = cmdtin - 13t03; rrsgt23 = cmdtin - 13tl3} msgC53 = chstin - 13 C 031 msg [63 = chstin - 13tl3 | J 3 * ............................................... ..................... 1 I LE OPTRONICS (CC) I ____________________________________________________________________ * / / **************************************** * File get_msg.c * * Name get_msg - RS232 input # * driver. * * * * Usage int get_msg () * * * * Description driver for receiving * * messages over the serial * * communication port. * * * * Return value 0 if RX successful. * * NOSTX if no text RXed * * * * Calls none * * * * Called by start_cnibp * * * *************************** ************* / «include <des.h> «include <time.h> «include <regist.h> «include <logic.h> «include <text.h> «include <hart_w.h> extern-float systol ic, di astol ic, mean »extern int heart_p> exter n int dr ί extern int prev_max_acc, prev_min_acc, prev_max_eounterJ int get_msgt) t int re-f_up, re-f_bot> int i, j , done, ref} char rmsgt37), aC801; int line; long timei; char * str_now; for <i * Oii <80) i + +) aCil = 32J done = FALSE; / * set initial condition for whi le loop * / i = O; / * initialize message index * / whilet (done) l / * while no ETX receive characte rs * / it (inportblLSR) fc 0x01) t / * it bit 0 ot Line Control Region! on * / outportb (MCR.OxOO); / * no DTR or RTS * / rmsgti) «inportb (RBR); / * read character trom R eceive Buffer * / ittrmsgCil ** ETX) / * if ETX terminate while loop * / done = TRUE; + + i1 / * otherwise increment m essage index * /} ootpor tb (MCP, 0 -.- 02) {/ # set F.T3 / a ******** # *** # **** ** ## *** # *** ## · ### # display rtciivid dat on screen * ff ### ## · # * ## * # * ##### *** # * ** ## ******* # / syttolic ~ 100 # (rmsgl133-48) ♦ 10 # (rmsgl143-46) + (rmsgl153-4 £ *> 5 .gj '^ * dieftDlic = 100 * (rmsgtlól - 40) + 10 # (rmsgI173 - 4ó) + (rκ & ^ 1. _ 4ó> 'mean * 100 * <rmsgtl93 - 46) * 10 * (rh) sgC203 - 46) + (rmsgTZi3 heart_p * 100 # <rmsg1243-48) + 10 # (rmsgt253-46) + (rmsg! 263-46) »scree * for (1 = 1J i <HART_Xl | i * +) / · # clean previous marfc £ on # / c 1 r = 05 draw_l i ne <i, HAF.T_Y1, i, HART_Y25! 3 c 1 r = 1 {d raw_1i ne (HART_X1-1, HART_Y1, HART_X1-1, HART_Y2) J r # f_up = HART_Y2 - (prev_max_ * cc / prev_max_cour »ter) / HART_SCALES re # _bot * HART_Y2 - (prev_min_acc / prev_max_counter) / HART_SCALE5 ref * systolicS Iine = ref_up / 10 »gotoxy <1,1i ne)} print # (“% 3d *. Re-f) I ref = diastolic! 1ine = ref_bot / 10 + 2ΐ gotoxy (1.1ine)! pr i ntf (“% 3d, ref) {draw_line (3, ref_up, HART_Xl-l, ref_up> 5 draw_li ne (3, ref_bot, HART_X1-1, re # _bot> 5 • 103 = 10J t ime (l? t imel); str_non * et ime (Lt imel) J for (i = 3 {i <9} i ++) at »3 * # (str_now + 10.i) I al! 73 = rmsgl133» aC183 = rmsg (I43; • 1193 = rmsg (153> a 1283 * rmsgl1935 el29] = rmsgl2035 el303 = rmsgI213l a! 393 = rmsgl163 »a (403 = rmsgll735 • 1413 * rmsgl183; a1503 * rmsgl243} • 1513 * = rmsgl2531 • 1523”? Msgt263l a 1603 <= 361 if (biosprint (2.0.03 ** 0x90) write (4, a, 60) 5 return (O) 1 3 _bss. segment stack 'stack' DW 128 DUP (?) _Bss ends dgroup group _data, _bss _data segment ascii_tab db "0123456789" hour dw?, 'Φ' minute dw?, '$' second dw?, '$' separat db ten db 10 thu dw 1092 eight db 18 cur_pos dw 163 + h toprint db 1 dup ( 'd'), '*' _data ends _print_string macro mov ah, 9 int 21h endm; Code segment containing the main and subroutines.! ===================== ============================================ _text SEGMENT PUBLIC assume cs: _text, ds: dgroup pub lie _CLOCK _CL0CK proc near mov ax, dgroup «establish data segment mov ds, ax j ΐ; blank cursor and get time from system clock j + get_t ime! mov ch, 0ffh 5trans + er cursor blanking code mov ah, lf ~ ta BIOS int lOh J mov ah, 0 iget time o + day int lah Jusing BIOS j -------- lea bx, ascii_tab Iget address ai translation tabl e »“ i translate returned value for hour into ASCII ; + hi: mov ax, cx Iget value + or hour in AX div ten tdivde by 10 to convert to decim al 1 xlat ascii_tab {translate to ASCII xchg ah, al {exchange AH and AL xlat ascii_tab Itrnaslate the remainder to ASCI xchg al, ah {get back in right order + or dim play mov hour, ax (save value for display I tr »nel * te rHurntd vtlut for minutes into ASCII 1 + ml: mov ax, dx (xor dx, dx div thu div ten xlat ascii_tab xchg ah, al xlat ascii_tab xchg a I, ah mov minute, ax 1 - i translate returned value for seconds into ASCII t + si: mov ax, dx div eight xor ah, ah div ten xlat ascii_tab xchg ah, al xlat ascii_tab xchg al, ah mov second , ax mov dx, cur_pos mov ah, 2 int lOh disp_h: mov ax, hour push ax lea bx, toprint mov Cbx3, al mov dx, bx _print_etring pop ax xchg ah, al lea bx, toprint mov [bx3, al mov dx , bx _print_string lea dx, separat _print_ * tring disp ^ mi mov ax, minute push ax lea bx.toprint mov rbxl, al mov dx, bx _print_ * tring pop ax xchg ah, al lea bx, toprint mov Cbx3, al mo v dx, bx _print_string lea dx, separat _print_ * tring di 5p_s: mov ex, second pufch ax lea bx, toprint moV (bxl, al mov dx, bx _print_etring pop ax xchg ah, al lea bx, toprint mov tbxJ, al mov dx, bx _prlnt_etrlng ret _CLOCK endp _text ends END
NL8902746A 1988-11-07 1989-11-07 METHOD AND APPARATUS FOR NON-INVASIVE CONTINUOUS MONITORING OF THE BLOOD PRESSURE NL8902746A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
IL8830588 1988-11-07
IL88305A IL88305A0 (en) 1988-11-07 1988-11-07 Real time non-invasive continuous blood pressure monitor

Publications (1)

Publication Number Publication Date
NL8902746A true NL8902746A (en) 1990-06-01

Family

ID=11059394

Family Applications (1)

Application Number Title Priority Date Filing Date
NL8902746A NL8902746A (en) 1988-11-07 1989-11-07 METHOD AND APPARATUS FOR NON-INVASIVE CONTINUOUS MONITORING OF THE BLOOD PRESSURE

Country Status (6)

Country Link
DE (1) DE3935939A1 (en)
FR (1) FR2638629A1 (en)
GB (1) GB2226131A (en)
IL (1) IL88305A0 (en)
IT (1) IT1236648B (en)
NL (1) NL8902746A (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE790454A (en) * 1971-10-23 1973-04-24 Philips Nv PHYSIOLOGICAL QUANTITIES RECORDER
US4109643A (en) * 1976-06-17 1978-08-29 Hewlett-Packard Company Perfusion meter
GB1538695A (en) * 1977-01-17 1979-01-24 Biotron Medical Products Ltd Method and apparatus for continuously monitoring systolic blood pressure
NL8003548A (en) * 1980-06-19 1982-01-18 Barry William Hyndman CONTINUOUS BLOODED PRESSURE MONITOR.
IL64421A0 (en) * 1980-12-05 1982-03-31 Cousin Bernard M Device for picking off and evaluating a pressure,in particular a pressure of a fluid
FR2524792B1 (en) * 1982-04-13 1985-09-27 Fenestraz Louis METHOD FOR MEASURING CARDIO-VASCULAR VALUES AND DEVICE FOR IMPLEMENTING SAME
EP0160994A3 (en) * 1984-05-10 1987-02-04 Warner, Sylvia Heart-related parameters monitoring apparatus
US4869262A (en) * 1987-02-02 1989-09-26 Pulse Time Products Limited Device for displaying blood pressure

Also Published As

Publication number Publication date
IT8922250A1 (en) 1991-05-03
IT1236648B (en) 1993-03-25
DE3935939A1 (en) 1990-05-17
GB8925013D0 (en) 1989-12-28
FR2638629A1 (en) 1990-05-11
IL88305A0 (en) 1989-06-30
IT8922250A0 (en) 1989-11-03
GB2226131A (en) 1990-06-20

Similar Documents

Publication Publication Date Title
US8988372B2 (en) Obtaining physiological measurements using a portable device
US6497657B2 (en) Remote diagnosis system
CA2446986A1 (en) Signal conditioning device for interfacing intravascular sensors
CN104602592A (en) Wearable device for continuous cardiac monitoring
CN201974808U (en) Self-help health service and management integrated machine terminal used in public place
CN104619238A (en) Biological information processing system, biological information measurement device, control device, method for controlling these, and storage medium
GB1055097A (en) Improvements relating to data monitoring systems
NL8902746A (en) METHOD AND APPARATUS FOR NON-INVASIVE CONTINUOUS MONITORING OF THE BLOOD PRESSURE
JPH06133937A (en) At-home medical care data management system
WO2003009754A1 (en) Apparatus having redundant sensors for continuous monitoring of vital signs and related methods
CN201194803Y (en) Portable oximeter
KR20030021812A (en) The total body measuring device and methodologies using PC linked Digital weighing scale and Digital tape-measure.
JPS6274328A (en) Apparatus for checking pulsation by detection of blood amount
CN102881087A (en) Community self-service human physical health monitoring method and equipment
KR20020094334A (en) A vending machine type comprehensive medical testing apparatus
KR102668246B1 (en) Electronic device for generating body size information for cloth fitting, method and system for generating body size information for cloth fitting, and method and system for recommending cloth size using the generated body size information
CN213149726U (en) Hand touch control device for measuring instrument
CN213986829U (en) Electronic product use prompt system based on ultrasonic distance measurement
CN221308178U (en) Automatic arm type mother-son machine sphygmomanometer
KR101945623B1 (en) Physical condition measuring method using healthcare mirror
KR200489756Y1 (en) Biosignal Sensing Apparatus
KR200255610Y1 (en) A vending machine type comprehensive medical testing apparatus
CN108932657B (en) Android-based garment design intelligent measurement system and measurement method
CN117017245A (en) Physical sign measurement method and device based on double-channel optical fiber sensing
KR200297522Y1 (en) The pulsation sensing system

Legal Events

Date Code Title Description
BV The patent application has lapsed