48. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/31/2017 10:45:44 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

48.1 Files compared

# Location File Last Modified
1 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VS_Monitors uVHA_ATE740X.pas Tue Dec 13 18:26:16 2016 UTC
2 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VS_Monitors uVHA_ATE740X.pas Fri Mar 31 15:01:55 2017 UTC

48.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 1446
Changed 1 2
Inserted 0 0
Removed 0 0

48.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

48.4 Active regular expressions

No regular expressions were active.

48.5 Comparison detail

  1   unit uVHA_ ATE740X;
  2   {
  3   ========== ========== ========== ========== ========== ========== ========== ==========
  4   *
  5   *       Ap plication:   Vitals
  6   *       Re vision:      $Revisio n: 1 $  $M odtime: 1/ 20/09 3:56 p $
  7   *       De veloper:      PII                              
  8   *       Si te:          Hines OI FO
  9   *
  10   *       De scription:   CASMED V itals Sign s Monitor  support
  11   *
  12   *       No tes:
  13   ========== ========== ========== ========== ========== ========== ========== ==========
  14   }
  15  
  16   interface
  17   uses
  18     RS232, C lasses, Sy sUtils, Di alogs, Con trols, For ms;
  19  
  20   const
  21     iLimit =  200; //   millisecon ds to wait  for COM p ort
  22  
  23   type
  24     TStatusI ndicator =  procedure (aStatus:S tring) of  object;
  25  
  26     TATE740X  = class(T Object)
  27     private
  28       ComPor t: TComPor t;
  29       fBootV ersion,
  30       fPICVe rsion,
  31       fNBPVe rsion,
  32       fTempV ersion,
  33       fSoftw areVersion ,
  34       fSoftw aredate,
  35       fModel ,
  36       fSeria l,
  37       fReadi ngs:String ;
  38       fMeasu rements: T StringList ;
  39       functi on getActi onResult(a nAction,aR esultCode: String;
  40         aRes ultLength: Integer;aT imeout:Int eger = iLi mit):Strin g;
  41  
  42       functi on getDate Time:Strin g;
  43       functi on getNume rics:Strin g;
  44       functi on getBatt eryVoltage :String;
  45       functi on getBatt eryCharge: String;
  46  
  47   //    func tion getPn eumaticTes tResults:T StringList ;
  48       functi on getMeas urements:T StringList ;
  49  
  50       functi on getSyst olic:Integ er;
  51       functi on getDias tolic:Inte ger;
  52       functi on getTemp : Real;
  53       functi on getMAP:  Integer;
  54       functi on getSpo2 :Integer;
  55       functi on getPuls e:Integer;
  56       functi on getTemp Units:Stri ng;
  57  
  58       functi on getSBP: String;
  59       functi on getSTem p:String;
  60       functi on getSPul se:String;
  61       functi on getSSpO 2:String;
  62  
  63       functi on getMode l:String;
  64       functi on getSeri al:String;
  65       functi on getDesc ription:St ring;
  66       proced ure getSof twareVersi on;
  67       functi on getSWVe rsion:Stri ng;
  68     public
  69   //    prop erty ComPo rtname:Str ing read f ComPortNam e;  vhaish andria 200 80109
  70       ComPor tName:Stri ng; // vha ishandria  20080109
  71       Status Indicator:  TStatusIn dicator;
  72  
  73       proper ty Softwar eVersion:S tring read  fSoftware Version;
  74       proper ty BootVer sion:Strin g read fBo otVersion;
  75       proper ty PICVers ion:String  read fPIC Version;
  76       proper ty NBPVers ion:String  read fNBP Version;
  77       proper ty TempVer sion:Strin g read fTe mpVersion;
  78  
  79       proper ty Softwar eDate:Stri ng read fS oftwareDat e;
  80       proper ty Model:S tring read  getModel;
  81       proper ty SerialN umber:Stri ng read ge tSerial;
  82  
  83       proper ty iSystol ic:Integer  read getS ystolic;
  84       proper ty iDiasto lic:Intege r read get Diastolic;
  85       proper ty fTemp:  Real read  getTemp;
  86       proper ty TempUni t: String  read getTe mpUnits;
  87       proper ty iMAP: I nteger rea d getMap;
  88       proper ty iSpo2:I nteger rea d getSpO2;
  89       proper ty iPulse: Integer re ad getPuls e;
  90  
  91       proper ty sBP: St ring read  getSBP;
  92       proper ty sTemp:  String rea d getSTemp ;
  93       proper ty sPulse: String rea d getsPuls e;
  94       proper ty sSpO2:S tring read  getSSpO2;
  95  
  96       proper ty DateTim e:String r ead getDat eTime;
  97       proper ty Numeric s: String  read getNu merics;
  98       proper ty Battery Voltage:St ring read  getbattery Voltage;
  99       proper ty Battery Charge: St ring read  getBattery Charge;
  100  
  101   //    prop erty Pneum aticTest:T StringList  read getP neumaticTe stResults;
  102       proper ty NIBP:TS tringList  read getMe asurements ;
  103   //    prop erty Measu rements: T StringList  read fMea surements;
  104       proper ty Descrip tion:Strin g read get Descriptio n;
  105  
  106       constr uctor Crea te(aPortNa me:String= ''); // pa rameter ad ded vhaish andria 200 80109
  107       destru ctor Destr oy;overrid e;
  108  
  109       proced ure NewPat ient;
  110  
  111       proced ure CloseP ort;
  112     end;
  113  
  114   const
  115     cmsCreat ed = 'Crea ted';
  116     cmsError  = 'Error' ;
  117     cmsReady  = 'Ready' ;
  118  
  119     errCheck Status = ' Please ver ify that t he monitor  is connec ted and tu rned on.';
  120     _errCasm edNotFound  = 'Monito r not foun d';
  121  
  122   function g etCasmedDe scription( aCasmed: T ATE740X;aC asmedPort: String;
  123     StatusIn dicator: T StatusIndi cator=nil) : String;
  124   function n ewATE740X( var Casmed Port,Error Msg:String ;
  125     StatusIn dicator: T StatusIndi cator=nil) : TATE740X ;
  126  
  127   implementa tion
  128  
  129   const
  130     cUnknown  =             'Unkno wn';
  131     arError  =              'ERROR ';
  132  
  133     acDateTi me =           'X08'+ #13;
  134     acNumeri cValues =      'X09'+ #13;
  135   // Request s ======== ========== ========== ========== ========== ========== ==========
  136   //                        X032      “X03 2. 0”             PIC Ve rsion 2.0
  137   //                        X033      “X02 1. 1”             NIBP M odule Vers ion 1.1
  138   //                        X034      “X02  1 4”             Temp M odule Vers ion 14
  139  
  140     cmGetBat teryVoltag e = 'X20';
  141     cmGetSof twareVersi on ='X030' ;
  142     cmGetBoo tVersion =     'X031' ; // “X032 .0 “             Boot  Version 2 .0
  143     cmGetPIC Version =      'X032' ;
  144     cmGetNBP Version =      'X033' ;
  145     cmGetTem pVersion =     'X034' ;
  146     cmGetMod el =           'X04';
  147     cmGetSer ial =          'X05';
  148     cmGetDat eTime =        'X08';
  149     cmGetNum ericValues  =  'X09';
  150     cmStopMe asurement  =   'X130' ;
  151     cmStartM easurement  =  'X131' ;
  152     cmStartS TATMeasure ment = 'X1 32';
  153     cmExitma nometerMod e = 'X140' ;
  154     cmEnterM anometerMo de ='X141' ;
  155     cmStartP neumaticTe st ='X151' ;
  156     cmStopPn eumaticTes t = 'X150' ;
  157     cmGetBat teryCharge  =  'X18';
  158     cmNewPat ient =         'X37';
  159  
  160   // Respons es ======= ========== ========== ========== ========== ========== ==========
  161     rspGetSo ftwareVers ion = 'X03 ';
  162     rspGetBo otVersion  =   'X031' ;
  163     rspGetPI CVersion =     'X032' ;
  164     rspGetNB PVersion =     'X033' ;
  165     rspGetTe mpVersion  =   'X034' ;
  166     rspGetMo del =          'X04';
  167     rspGetSe rial =         'X05';
  168     rspDateT ime =          'X08';
  169     rspNumer icValues =     'X09';
  170     rspNIBPM easurement  =  'X13';
  171     rspNIBPM anometerMo de ='X14'; //response  is sent w hile in th e manomete r mode
  172     rspNIBPP neumaticTe st ='X15';
  173     rspBatte ryCharge =     'X18';
  174     rspBatte ryVoltage  =   'X20';
  175     rspUnkno wn =           'X??';
  176     rspATEDi sabled =       'X**';
  177  
  178     // CASME D supports  740-3MS 7 40-2T 740- 3ML and so ftware 2.2  and up
  179     // 2008- 04-23 vhai shandria 7 40-3NL add ed to the  list of su pportedins truments.
  180     // GUI v ersion: 5. 0.22.6
  181     const
  182       cSuppo rtedUnits  = '740-3MS  740-2T 74 0 2T 740-3 NL 740M-3N L ';
  183       cSuppo rtedSoftva re = ' 2.2 '; // v. 5 .0.2.1
  184  
  185   function S tripFirstC har(aChar: Char;aValu e:String): String;
  186   var
  187     s: Strin g;
  188   begin
  189     Result : = aValue;
  190     s := aVa lue;
  191     while po s(aChar,s)  = 1 do
  192       s := c opy(s,2,Le ngth(s));
  193     Result : = s;
  194   end;
  195  
  196   function g etCasmedDe scription( aCasmed: T ATE740X;aC asmedPort: String;
  197     StatusIn dicator: T StatusIndi cator=nil) : String;
  198   var
  199     aCM: TAT E740X;
  200     sCasmedE rror: Stri ng;
  201   begin
  202     Screen.C ursor := c rHourGlass ;
  203     if not A ssigned(aC asmed) the n
  204       begin
  205         aCM  := newATE7 40X(aCasme dPort,sCas medError,S tatusIndic ator); //T ATE740X.Cr eate(aCasm edPort);
  206         if n ot Assigne d(aCM) the n
  207           Re sult := er rCheckStat us
  208         else
  209           Re sult := aC M.Descript ion;
  210         Free AndNil(aCM );
  211       end
  212     else
  213       Result  := aCasme d.Descript ion;
  214  
  215     Screen.C ursor := c rDefault;
  216   end;
  217  
  218   function n ewATE740X( var Casmed Port,Error Msg:String ;
  219     StatusIn dicator: T StatusIndi cator=nil) : TATE740X ;
  220   var
  221     CasmedMo del,
  222     CasmedSo ftware,
  223     ErrorIte m,
  224     ErrorLis t: String;
  225     i: Integ er;
  226     CM: TATE 740X;
  227     sPortNam e:String;
  228  
  229     function  Supported Model(aVal ue:String) :Boolean;
  230     begin
  231       Result  := pos(tr im(upperca se(aValue) ),cSupport edUnits) >  0;// aVal ue = cSupp ortedUnit;
  232     end;
  233  
  234     function  Supported Software(a Value:Stri ng):Boolea n;
  235     var
  236       f: Dou ble;
  237     begin
  238       try
  239         f :=  strToFloa t(aValue);
  240       except
  241         on E : Exceptio n do
  242           f  := 0.0;
  243       end;
  244       Result  := f >=2. 2;
  245     end;
  246  
  247     function  CasmedOnP ort(aPortN ame:String ): TATE740 X;
  248     var
  249       sValue : String;
  250       aCM: T ATE740X;
  251     begin
  252       aCM :=  TATE740X. Create(aPo rtName);
  253       if Ass igned(aCM)  then
  254         begi n
  255           sV alue := aC M.Model;
  256           if  not Suppo rtedModel( sValue) th en
  257              begin
  258                ErrorIte m := 'Sorr y. The mod el <'+sVal ue+'> is n ot support ed.';
  259                FreeAndN il(aCM);
  260              end
  261           el se
  262              CasmedMode l := sValu e;
  263         end;
  264       if Ass igned(aCM)  then
  265         begi n
  266           sV alue := aC M.getSWVer sion;
  267           if  not Suppo rtedSoftwa re(sValue)  then
  268              begin
  269                ErrorIte m := 'Sorr y. The sof tware vers ion <'+sVa lue+'> is  not suppor ted.';
  270                FreeAndN il(aCM);
  271              end
  272           el se
  273              CasmedSoft ware := sV alue;
  274         end;
  275       Result  := aCM;
  276     end;
  277  
  278   begin
  279     ErrorIte m := '';
  280     ErrorLis t := '';
  281  
  282     if Casme dPort = ''  then
  283       begin
  284         for  i := 1 to  8 do
  285           be gin
  286              sPortName  := 'COM'+I ntToStr(i) ;
  287              if Assigne d(StatusIn dicator) t hen
  288                StatusIn dicator('L ooking for  CASMED on  Port: '+s PortName);
  289              CM := Casm edOnPort(s PortName);
  290              if CM <> n il then
  291                begin
  292                  Casmed Port := 'C OM'+IntToS tr(i);
  293                  break;
  294                end;
  295              ErrorList  := ErrorLi st + Error Item+#13;
  296           en d;
  297       end
  298     else
  299       begin
  300         if A ssigned(St atusIndica tor) then
  301           St atusIndica tor('Looki ng for CAS MED on Por t: '+Casme dPort);
  302         CM : = CasmedOn Port(Casme dPort);
  303       end;
  304  
  305     if assig ned(CM) th en
  306       CM.Sta tusIndicat or := Stat usIndicato r;
  307  
  308     if Assig ned(Status Indicator)  then
  309       begin
  310         Stat usIndicato r('Port: ' +CasmedPor t);
  311         if A ssigned(CM ) then
  312           be gin
  313              StatusIndi cator('Mod el: '+Casm edModel);
  314              StatusIndi cator('Sta tus: Conne cted');
  315              StatusIndi cator('');
  316           en d
  317         else
  318           be gin
  319              StatusIndi cator('Mod el: Unknow n');
  320              StatusIndi cator('Sta tus: Unkno wn');
  321              StatusIndi cator(errC heckStatus {errCasmed NotFound}) ;
  322           en d;
  323       end;
  324  
  325     Result : = CM;
  326     ErrorMsg  := ErrorL ist;
  327   end;
  328  
  329   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  330  
  331   constructo r TATE740X .Create(aP ortName:St ring='');
  332   begin
  333     TObject. Create;                          // vhaisha ndria 2009 0109
  334     ComPortN ame := aPo rtName;               // vhaisha ndria 2009 0109
  335     ComPort  := TComPor t.Create;
  336     fMeasure ments := T StringList .Create;
  337     fBootVer sion := cU nknown;
  338     fPICVers ion := cUn known;
  339     fNBPVers ion := cUn known;
  340     fTempVer sion := cU nknown;
  341     fSoftwar eversion : = 'Unknown '
  342   end;
  343  
  344   destructor  TATE740X. Destroy;
  345   begin
  346     FreeAndN il(ComPort );
  347     FreeAndN il(fMeasur ements);
  348     inherite d;
  349   end;
  350  
  351   function T ATE740X.ge tActionRes ult(anActi on,aResult Code:Strin g;
  352     aResultL ength:Inte ger;aTimeo ut:Integer  = iLimit) :String;
  353   var
  354     i: Integ er;
  355   begin
  356     result : = arError;
  357     if ComPo rt.ComPort Status <>  cpsOpened  then // vh aishandria  20090115
  358       if Com Port.Open( ComPortNam e) then //  Port adde d.  vhaish andria 200 90109
  359         ComP ort.Config ;
  360  
  361     i := 0;
  362     if ComPo rt.Write(a nAction+#1 3) then
  363       while  (pos(aResu ltCode, Co mPort.Comm andResults ) = 0) do
  364         begi n
  365           in c(i);
  366           sl eep(aTimeo ut);
  367           Co mport.Read (aResultLe ngth);
  368           if  i>1 then  break;
  369         end;
  370     if (pos( aResultCod e, ComPort .CommandRe sults) <>  0) then
  371       result  := ComPor t.CommandR esults;
  372  
  373     ComPort. Purge;
  374     ComPort. Close;// v haishandri a 2009-01- 20
  375   end;
  376  
  377   function T ATE740X.ge tModel:Str ing;
  378   begin
  379     if Assig ned(Status Indicator)  then
  380       Status Indicator( 'Collectin g monitor  model info rmation... ');
  381     fModel : = copy(Get ActionResu lt(cmGetMo del,rspGet Model,12), 4,8);
  382     Result : = fModel;
  383     if Assig ned(Status Indicator)  then
  384       Status Indicator( '');
  385   end;
  386  
  387   function T ATE740X.ge tSWVersion :String;
  388   var
  389     sl: TSTr ingList;
  390   begin
  391     if Assig ned(Status Indicator)  then
  392       Status Indicator( 'Collectin g software  version.. .');
  393     Result : = GetActio nResult(cm GetSoftwar eVersion,r spGetSoftw areVersion ,80,1000);
  394     if Resul t <> arErr or then
  395       begin
  396         sl : = TstringL ist.Create ;
  397         sl.T ext := Res ult;
  398         if s l.Count >  0 then
  399           Re sult := co py(sl[0],5 ,Length(sl [0]))
  400         else
  401           Re sult := 'U nknown';
  402       end;
  403     if Assig ned(Status Indicator)  then
  404       Status Indicator( '');
  405   end;
  406  
  407   procedure  TATE740X.g etSoftware Version;
  408   var
  409     s: Strin g;
  410     SL: TStr ingList;
  411  
  412     function  SetValue( aValue:Str ing;aPos,a Len:Intege r):String;
  413       begin
  414         if a Value = ar Error then  Result :=  'Unknown'
  415         else
  416           Re sult := co py(aValue, aPos,aLen) ;
  417       end;
  418  
  419   begin
  420     if Assig ned(Status Indicator)  then
  421       Status Indicator( 'Collectin g software  version i nformation ...');
  422     s := Get ActionResu lt(cmGetSo ftwareVers ion,rspGet SoftwareVe rsion,80,1 000);
  423     if s <>  arError th en
  424       begin
  425         SL:=  TStringLi st.Create;
  426         SL.T ext := s;
  427         if S L.Count >  0 then
  428           fS oftwareVer sion := co py(SL[0],5 ,Length(SL [0]));
  429  
  430         if S L.Count >  1 then
  431           fS oftwareDat e := copy( SL[1],3,2) +'/'+copy( sl[1],1,2) +'/'+copy( sl[1],5,2)
  432         else
  433           fS oftwareDat e := 'Unkn own';
  434         SL.F ree;
  435  
  436         if A ssigned(St atusIndica tor) then
  437           St atusIndica tor('Colle cting Boot  version.. .');
  438         fBoo tVersion : =SetValue( GetActionR esult(cmGe tBootVersi on,rspGetB ootVersion ,8),5,4);
  439         if A ssigned(St atusIndica tor) then
  440           St atusIndica tor('Colle cting RIC  version... ');
  441         fPIC Version :=  SetValue( GetActionR esult(cmGe tPICVersio n,rspGetPI CVersion,8 ),5,4);
  442         if A ssigned(St atusIndica tor) then
  443           St atusIndica tor('Colle cting NBP  version... ');
  444         fNBP Version :=  Setvalue( GetActionR esult(cmGe tNBPVersio n,rspGetNB PVersion,8 ),5,4);
  445         if A ssigned(St atusIndica tor) then
  446           St atusIndica tor('Colle cting Temp  version.. .');
  447         fTem pVersion : = Setvalue (GetAction Result(cmG etTempVers ion,rspGet TempVersio n,8),5,4);
  448       end;
  449     if Assig ned(Status Indicator)  then
  450       Status Indicator( '');
  451   end;
  452  
  453   function T ATE740X.ge tSerial:St ring;
  454   begin
  455     if Assig ned(Status Indicator)  then
  456       Status Indicator( 'Collectin g monitor  Serial num ber inform ation...') ;
  457     fSerial  := copy(Ge tActionRes ult(cmGetS erial,rspG etSerial,1 2),4,8);
  458     Result : = fSerial;
  459     if Assig ned(Status Indicator)  then
  460       Status Indicator( '');
  461   end;
  462  
  463   function T ATE740X.ge tDescripti on:String;
  464   begin
  465   //  Result  := Model  + #13#10+   SerialNum ber;
  466     if Assig ned(Status Indicator)  then
  467       Status Indicator( 'Collectin g version  informatio n...');
  468     getSoftw areVersion ;
  469     Result : =
  470       'CASME D '+Model+  ' (SN: '+ SerialNumb er+')  at  '+ComPortn ame+#13+
  471       '_____ __________ __________ __________ '+#13+#13+ #9+
  472       'Softw are: '+Sof twareVersi on+' ( Dat e: '+Softw areDate+') '+#13+#9+# 9+
  473       'Boot:  '+#9+Boot Version+#1 3+#9+#9+
  474       'PIC:  '+#9+PICVe rsion+#13+ #9+#9+
  475       'NBP:  '+#9+NBPVe rsion+#13+ #9+#9+
  476       'Temp:  '+#9+Temp Version;
  477     if Assig ned(Status Indicator)  then
  478       Status Indicator( '');
  479   end;
  480  
  481   function T ATE740X.ge tDateTime: String;
  482   begin
  483     Result : = GetActio nResult(cm GetDateTim e,rspDateT ime,16);
  484   end;
  485  
  486   function T ATE740X.ge tNumerics: String;
  487   begin
  488     if Assig ned(Status Indicator)  then
  489       Status Indicator( 'Requestin g monitor  readings.. .');
  490     fReading s := GetAc tionResult (cmGetNume ricValues, rspNumeric Values,24) ;
  491     if Assig ned(Status Indicator)  then
  492       Status Indicator( '');
  493     Result : = fReading s;
  494   end;
  495  
  496   function T ATE740X.ge tBatteryVo ltage:Stri ng;
  497   begin
  498     Result : = GetActio nResult(cm GetBattery Voltage,rs pBatteryVo ltage,9);
  499   end;
  500  
  501   function T ATE740X.ge tBatteryCh arge:Strin g;
  502   begin
  503     Result : = GetActio nResult(cm GetBattery Charge,rsp BatteryCha rge,7);
  504   end;
  505  
  506   function T ATE740X.ge tMeasureme nts:TStrin gList;
  507   var
  508     i: Integ er;
  509   begin
  510     i := 0;
  511     fMeasure ments.Clea r;
  512     ComPort. CommandRes ults := '' ;
  513     if ComPo rt.Open(Co mPortName)  then // v haishandri a 20090109
  514       ComPor t.Config;
  515  
  516     ComPort. Write(cmSt artMeasure ment+#13);
  517     while i  < iLimit d o
  518       begin
  519         inc( i);
  520         if C omPort.Rea d(7) then
  521           if  (pos('X13 ', ComPort .CommandRe sults) = 1 ) then
  522              begin
  523                fMeasure ments.Add( ComPort.Co mmandResul ts);
  524                i := 0;
  525              end;
  526       end;
  527     ComPort. Write(cmSt opMeasurem ent);
  528     ComPort. Purge;
  529     ComPort. Close;
  530     Result : = fMeasure ments;
  531   end;
  532  
  533   function T ATE740X.ge tSystolic: Integer;
  534   begin
  535     try
  536       Result  := StrToI ntDef(copy (fReadings ,4,3),-1);
  537     except
  538       Result  := -1;
  539     end;
  540   end;
  541  
  542   function T ATE740X.ge tDiastolic :Integer;
  543   begin
  544     try
  545       Result  := StrToI ntDef(copy (fReadings ,7,3),-1);
  546     except
  547       Result  := -1;
  548     end;
  549   end;
  550  
  551   function T ATE740X.ge tTemp: Rea l;
  552   var
  553     s,ss: St ring;
  554   begin
  555     try
  556       s := c opy(fReadi ngs,19,3);
  557       ss :=  copy(fRead ings,22,1) ;
  558       if pos (ss,'01234 56789') >  0 then
  559         s :=  s + ss;
  560       Result  := StrToI ntDef(s,-1 ) / 10.0;
  561     except
  562       Result  := -1;
  563     end;
  564   end;
  565  
  566   function T ATE740X.ge tMAP: Inte ger;
  567   begin
  568     try
  569       Result  := StrToI ntDef(copy (fReadings ,10,3),-1) ;
  570     except
  571       Result  := -1;
  572     end;
  573   end;
  574  
  575   function T ATE740X.ge tSpo2:Inte ger;
  576   begin
  577     try
  578       Result  := StrToI ntDef(copy (fReadings ,16,3),-1) ;
  579     except
  580       Result  := -1;
  581     end;
  582   end;
  583  
  584   function T ATE740X.ge tPulse:Int eger;
  585   begin
  586     try
  587       Result  := StrToI ntDef(copy (fReadings ,13,3),-1) ;
  588     except
  589       Result  := -1;
  590     end;
  591   end;
  592  
  593   function T ATE740X.ge tTempUnits :String;
  594   var
  595     s : Stri ng;
  596   begin
  597     try
  598       s := c opy(fReadi ngs,22,1);
  599       if pos (s,'012345 6789') > 0  then
  600         s :=  copy(fRea dings,23,1 );
  601       if (s< >'C') and  (s<>'F') t hen s := ' ';
  602       Result  := s;
  603     except
  604       Result  := '';
  605     end;
  606   end;
  607  
  608   function T ATE740X.ge tSBP:Strin g;
  609   var
  610     i: Integ er;
  611     s: Strin g;
  612   begin
  613     Result : = '';
  614     try
  615       s := c opy(fReadi ngs,4,3);
  616       while  copy(s,1,1 ) = '0' do   s := Cop y(s,2,leng th(s));
  617       i := S trToIntDef (s,-1);
  618       if i <  0 then Ex it;
  619       Result  := s + '/ ';
  620       s := c opy(fReadi ngs,7,3);
  621       while  copy(s,1,1 ) = '0' do   s := Cop y(s,2,leng th(s));
  622       i := S trToIntDef (s,-1);
  623       if i <  0 then
  624         begi n
  625           Re sult := '' ;
  626           Ex it;
  627         end;
  628       Result  := Result  + s;
  629     except
  630       Result  := '';
  631     end;
  632   end;
  633  
  634   function T ATE740X.ge tSTemp:Str ing;
  635   begin
  636     try
  637       if fTe mp > 0 the n
  638         Resu lt := Form at('%5.1f' ,[fTemp])
  639       else
  640         Resu lt := '';
  641     except
  642       Result  := '';
  643     end;
  644   end;
  645  
  646   function T ATE740X.ge tSPulse:St ring;
  647   begin
  648     try
  649       if iPu lse < 0 th en
  650         Resu lt := ''
  651       else
  652         begi n
  653           Re sult := co py(fReadin gs,13,3);
  654           Re sult := St ripFirstCh ar('-',Res ult);
  655           Re sult := St ripFirstCh ar(' ',Res ult);
  656           Re sult := St ripFirstCh ar('0',Res ult);
  657         end;
  658     except
  659       Result  := '';
  660     end;
  661   end;
  662  
  663   function T ATE740X.ge tSSpO2:Str ing;
  664   begin
  665     try
  666       if iSp O2 < 0 the n
  667         Resu lt := ''
  668       else
  669         begi n
  670           Re sult := co py(fReadin gs,16,3);
  671           Re sult := St ripFirstCh ar('-',Res ult);
  672           Re sult := St ripFirstCh ar('0',Res ult);
  673         end;
  674     except
  675       Result  := '';
  676     end;
  677   end;
  678  
  679   procedure  TATE740X.N ewPatient;
  680   begin
  681     if Assig ned(Status Indicator)  then
  682       Status Indicator( 'Cleaning  data buffe r...');
  683     getActio nResult(cm NewPatient +#13,cmNew Patient+#1 3,Length(c mNewPatien t+#13));
  684     if Assig ned(Status Indicator)  then
  685       Status Indicator( '');
  686   end;
  687  
  688   procedure  TATE740X.C losePort;
  689   begin
  690     ComPort. Close;
  691   end;
  692  
  693   (*
  694   function T ATE740X.ge tPneumatic TestResult s:TStringL ist;
  695   var
  696     i: Integ er;
  697   begin
  698     i := 0;
  699     fMeasure ments.Clea r;
  700     ComPort. CommandRes ults := '' ;
  701     if ComPo rt.Open(Co mPortName)  then // v haishandri a 20090109
  702       ComPor t.Config;
  703  
  704     ComPort. Write(cmSt artPneumat icTest+#13 );
  705     while i  < iLimit d o
  706       begin
  707         inc( i);
  708         if C omPort.Rea d(8) then
  709           if  (pos('X15 ', ComPort .CommandRe sults) = 1 ) then
  710              begin
  711                fMeasure ments.Add( ComPort.Co mmandResul ts);
  712                i := 0;
  713                if (ComP ort.Comman dResults =  'X15PASS' ) or
  714                   (ComP ort.Comman dResults =  'X15FAIL' ) then bre ak;
  715              end;
  716       end;
  717     ComPort. Write(cmSt opPneumati cTest);
  718     ComPort. Purge;
  719     ComPort. Close;
  720     Result : = fMeasure ments;
  721   end;
  722   *)
  723   end.
  724