33. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/31/2017 10:45:42 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.

33.1 Files compared

# Location File Last Modified
1 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSDATAENTRY fGMV_EnteredInError.pas Tue Dec 13 18:25:44 2016 UTC
2 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSDATAENTRY fGMV_EnteredInError.pas Fri Mar 31 15:01:28 2017 UTC

33.2 Comparison summary

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

33.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

33.4 Active regular expressions

No regular expressions were active.

33.5 Comparison detail

  1   unit fGMV_ EnteredInE rror;
  2   {
  3   ========== ========== ========== ========== ========== ========== ========== ==========
  4   *
  5   *       Ap plication:   Vitals
  6   *       Re vision:      $Revisio n: 1 $  $M odtime: 8/ 11/09 3:56 p $
  7   *       De veloper:      PII                                             
  8   *       Si te:          Hines OI FO
  9   *
  10   *       De scription:   Utility  for markin g vitals i n error.
  11   *
  12   *       No tes:
  13   *
  14   ========== ========== ========== ========== ========== ========== ========== ==========
  15   *       $A rchive: /V itals/5.0  (Version 5 .0)/5.0.23  (Patch 23 )/VITALS_5 _0_23_8/So urce/VITAL SDATAENTRY /fGMV_Ente redInError .pas $
  16   *
  17   * $History : fGMV_Ent eredInErro r.pas $
  18    * 
  19    * ******* **********   Version  1  ******* **********
  20    * User: V haishandri a Date: 8/ 12/09    T ime: 8:29a
  21    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_8/Sourc e/VITALSDA TAENTRY
  22    * 
  23    * ******* **********   Version  1  ******* **********
  24    * User: V haishandri a Date: 3/ 09/09    T ime: 3:38p
  25    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_6/Sourc e/VITALSDA TAENTRY
  26    * 
  27    * ******* **********   Version  1  ******* **********
  28    * User: V haishandri a Date: 1/ 13/09    T ime: 1:26p
  29    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_4/Sourc e/VITALSDA TAENTRY
  30    * 
  31    * ******* **********   Version  1  ******* **********
  32    * User: V haishandri a Date: 5/ 14/07    T ime: 10:29 a
  33    * Created  in $/Vita ls GUI 200 7/Vitals-5 -0-18/VITA LSDATAENTR Y
  34    * 
  35    * ******* **********   Version  1  ******* **********
  36    * User: V haishandri a Date: 5/ 16/06    T ime: 5:43p
  37    * Created  in $/Vita ls/VITALS- 5-0-18/Vit alsDataEnt ry
  38    * GUI v.  5.0.18 upd ates the d efault vit al type IE Ns with th e local
  39    * values.
  40    *
  41    * ******* **********   Version  1  ******* **********
  42    * User: V haishandri a Date: 5/ 16/06    T ime: 5:33p
  43    * Created  in $/Vita ls/Vitals- 5-0-18/VIT ALS-5-0-18 /VitalsDat aEntry
  44    * 
  45    * ******* **********   Version  1  ******* **********
  46    * User: V haishandri a Date: 5/ 24/05    T ime: 3:35p
  47    * Created  in $/Vita ls/Vitals  GUI  v 5.0 .2.1 -5.0. 3.1 - Patc h GMVR-5-7  (CASMed,  No CCOW) -  Delphi 6/ VitalsData Entry
  48    * 
  49    * ******* **********   Version  1  ******* **********
  50    * User: V haishandri a Date: 4/ 16/04    T ime: 4:20p
  51    * Created  in $/Vita ls/Vitals  GUI Versio n 5.0.3 (C COW, CPRS,  Delphi 7) /VITALSDAT AENTRY
  52    * 
  53    * ******* **********   Version  1  ******* **********
  54    * User: V haishandri a Date: 1/ 26/04    T ime: 1:08p
  55    * Created  in $/Vita ls/Vitals  GUI Versio n 5.0.3 (C COW, Delph i7)/V5031- D7/VitalsU ser
  56    * 
  57    * ******* **********   Version  1  ******* **********
  58    * User: V haishandri a Date: 10 /29/03   T ime: 4:15p
  59    * Created  in $/Vita ls503/Vita ls User
  60    * Version  5.0.3
  61    * 
  62    * ******* **********   Version  3  ******* **********
  63    * User: V haishandri a Date: 5/ 22/03    T ime: 10:16 a
  64    * Updated  in $/Vita ls GUI Ver sion 5.0/V italsUserN oCCOW
  65    * Prepara tion to CC OW
  66    * Message DLG change d to Messa geDLGS
  67    * 
  68    * ******* **********   Version  2  ******* **********
  69    * User: V haishandri a Date: 5/ 21/03    T ime: 1:46p
  70    * Updated  in $/Vita ls GUI Ver sion 5.0/V italsUserN oCCOW
  71    * Version  5.0.1.5
  72    * 
  73    * ******* **********   Version  1  ******* **********
  74    * User: V haishandri a Date: 5/ 21/03    T ime: 1:18p
  75    * Created  in $/Vita ls GUI Ver sion 5.0/V italsUserN oCCOW
  76    * Pre CCO W Version  of Vitals  User
  77    * 
  78    * ******* **********   Version  5  ******* **********
  79    * User: V haishandri a Date: 12 /20/02   T ime: 3:02p
  80    * Updated  in $/Vita ls GUI Ver sion 5.0/V itals User
  81    * 
  82    * ******* **********   Version  4  ******* **********
  83    * User: V haishandri a Date: 10 /11/02   T ime: 6:21p
  84    * Updated  in $/Vita ls GUI Ver sion 5.0/V itals User
  85    * Version  vT32_1
  86    * 
  87    * ******* **********   Version  3  ******* **********
  88    * User: V haishpetit d Date: 6/ 20/02    T ime: 9:33a
  89    * Updated  in $/Vita ls GUI Ver sion 5.0/V itals User
  90    * t27 Bui ld
  91    *
  92    * ******* **********   Version  2  ******* **********
  93    * User: V haishpetit d Date: 6/ 06/02    T ime: 11:14 a
  94    * Updated  in $/Vita ls GUI Ver sion 5.0/V itals User
  95    * Roll-up  to 5.0.0. 27
  96    *
  97    * ******* **********   Version  1  ******* **********
  98    * User: V haishpetit d Date: 4/ 04/02    T ime: 11:58 a
  99    * Created  in $/Vita ls GUI Ver sion 5.0/V itals User
  100    *
  101   *
  102   ========== ========== ========== ========== ========== ========== ========== ==========
  103   }
  104   interface
  105  
  106   uses
  107     Windows,
  108     Messages ,
  109     SysUtils ,
  110     Classes,
  111     Graphics ,
  112     Controls ,
  113     Forms,
  114     Dialogs,
  115     ExtCtrls ,
  116     StdCtrls ,
  117     Buttons,
  118     CheckLst ,
  119     MFunStr,
  120     uGMV_Com mon,
  121     ComCtrls ;
  122  
  123   type
  124     TfrmGMV_ EnteredInE rror = cla ss(TForm)
  125       GroupB ox1: TGrou pBox;
  126       rgReas on: TRadio Group;
  127       dtpDat e: TDateTi mePicker;
  128       pnlBut tons: TPan el;
  129       btnCan cel: TButt on;
  130       btnOK:  TButton;
  131       lvVita ls: TListV iew;
  132       Panel1 : TPanel;
  133       Label1 : TLabel;
  134       Label2 : TLabel;
  135       proced ure DateCh ange(Sende r: TObject );
  136       proced ure OkButt onClick(Se nder: TObj ect);
  137       proced ure FormCr eate(Sende r: TObject );
  138       proced ure OkToPr oceed(Send er: TObjec t);
  139       proced ure ClearL ist;
  140       proced ure FormCl ose(Sender : TObject;  var Actio n: TCloseA ction);
  141       proced ure lvVita lsChange(S ender: TOb ject; Item : TListIte m;
  142         Chan ge: TItemC hange);
  143       proced ure FormRe size(Sende r: TObject );
  144       proced ure FormKe yDown(Send er: TObjec t; var Key : Word;
  145         Shif t: TShiftS tate);
  146       proced ure lvVita lsCustomDr awItem(Sen der: TCust omListView ;
  147         Item : TListIte m; State:  TCustomDra wState; va r DefaultD raw: Boole an);
  148     private
  149       FPatie ntIEN: str ing;
  150       { Priv ate declar ations }
  151     public
  152       { Publ ic declara tions }
  153     end;
  154  
  155   function E nterVitals InError(DF N: string) : Integer;
  156   function E nteredInEr rorByDate( DFN: strin g;aDate:TD ateTime):  Integer;
  157  
  158   implementa tion
  159  
  160   uses uGMV_ FileEntry,  uGMV_User , uGMV_Eng ine, fGMV_ PtInfo
  161   ;
  162  
  163   const
  164     kwVitals  = 'Vitals ';
  165     kwCliO =  'CliO';
  166     
  167   {$R *.DFM}
  168  
  169   function E nterVitals InError(DF N: string) : Integer;
  170   var
  171     TimeToSt art: TDate Time;
  172   begin
  173     TimeToSt art := get ServerWDat eTime;
  174     TimeToSt art := Tru nc(TimeToS tart)+1 -  1/(3600*24 );
  175     Result : = EnteredI nErrorByDa te(DFN,Tim eToStart);
  176   end;
  177  
  178   function E nteredInEr rorByDate( DFN: strin g;aDate:TD ateTime):  Integer;
  179   begin
  180     with Tfr mGMV_Enter edInError. Create(App lication)  do
  181       try
  182         FPat ientIEN :=  DFN;
  183         dtpD ate.Date : = aDate;
  184         if d tpDate.Dat e = 0 then
  185              dtpDate.Da te := Now;
  186         Date Change(nil );
  187         Resu lt := Show Modal;
  188       finall y
  189         free ;
  190       end;
  191   end;
  192  
  193   procedure  TfrmGMV_En teredInErr or.FormCre ate(Sender : TObject) ;
  194   begin
  195     ClearLis t;
  196     dtpDate. Date := ge tServerWDa teTime;
  197     if dtpDa te.Date =  0 then
  198       begin
  199         dtpD ate.Date : = Now;
  200       end;
  201   end;
  202  
  203   procedure  TfrmGMV_En teredInErr or.DateCha nge(Sender : TObject) ;
  204   var
  205     sSource,
  206     s: Strin g;
  207     dt: Doub le;
  208     i: integ er;
  209     RetList  : TStrings ;
  210  
  211     function  DataSourc e(aValue:S tring):Str ing;
  212     begin
  213       Result  := kwVita ls;
  214       if pos ('{',trim( aValue)) =  1 then
  215         Resu lt := kwCl io;
  216     end;
  217  
  218   begin
  219     ClearLis t;
  220     dt := Wi ndowsDateT oFMDate(dt pDate.Date );
  221  
  222     RetList  := getGMVR ecord(FPat ientIEN +  '^' + Floa tToStr(dt)  + '^^' +  FloatToStr (dt));
  223  
  224     if (RetL ist.Count  > 0) and ( Piece(RetL ist[0], '^ ', 1) <> ' 0') then
  225       for i  := 0 to Re tList.Coun t - 1 do
  226         if C opy(RetLis t[i], 1, 1 ) <> ' ' t hen
  227           wi th lvVital s.Items.Ad d do
  228              begin
  229                s := Ret List[i];
  230                Caption  := Piece(P iece(RetLi st[i], '^' , 2), ' ',  1);
  231                sSource  := DataSou rce(s);
  232  
  233                s := tri m(Copy(Ret List[i], P os(' ', Re tList[i]),  255));
  234                SubItems .Add(piece (s,'_',1)) ;
  235                SubItems .Add(piece (s,'_',2)) ;
  236                SubItems .Add(sSour ce);
  237                Data :=  TGMV_FileE ntry.Creat eFromRPC(' 120.51;' +  RetList[i ]);
  238              end;
  239     RetList. Free;
  240     lvVitals .Invalidat e;
  241   end;
  242  
  243   procedure  TfrmGMV_En teredInErr or.ClearLi st;
  244   begin
  245     lvVitals .Items.Beg inUpdate;
  246     while lv Vitals.Ite ms.Count >  0 do
  247       begin
  248         if l vVitals.It ems[0].Dat a <> nil t hen
  249           TG MV_FileEnt ry(lvVital s.Items[0] .Data).Fre e;
  250         lvVi tals.Items .Delete(0) ;
  251       end;
  252     lvVitals .Items.End Update;
  253     btnOK.En abled := F alse;
  254     rgReason .Enabled : = False;
  255     rgReason .ItemIndex  := -1;
  256   end;
  257  
  258   procedure  TfrmGMV_En teredInErr or.OkButto nClick(Sen der: TObje ct);
  259   var
  260     i: integ er;
  261     sReason,
  262     sVitals, sClio,
  263     sDUZ,
  264     s: Strin g;
  265     RetList: TStrings;
  266     iVitals, iExternal: Integer;
  267  
  268     function  WarningSt ring(aClio :Integer): String;
  269     begin
  270       Result  := 'Are y ou sure yo u want to  mark ' +
  271         IntT oStr(iVita ls)+' vita ls sign re cords as '  + sReason +'?';
  272       if aCl io <> 0 th en
  273         Resu lt := Resu lt +#13#13 +
  274         'NOT E: some of  the selec ted record s are stor ed outside  of the Vi tals packa ge'+#13+
  275         'and  could not  be marked  as "Enter ed in Erro r" by the  Vitals app lication';
  276     end;
  277  
  278   begin
  279     if rgRea son.ItemIn dex < 0 th en
  280       Messag eDlg('No r eason has  been selec ted.', mtE rror, [mbo k], 0)
  281     else
  282       begin
  283         s :=  '';
  284         sVit als := '';
  285         sCli O := '';
  286         iVit als := 0;
  287         iExt ernal := 0 ;
  288         sRea son := rgR eason.Item s[rgReason .ItemIndex ];
  289         for  i := 0 to  lvVitals.I tems.Count  - 1 do
  290           if  lvVitals. Items[i].S elected th en
  291              begin
  292                s := s +  lvVitals. Items[i].C aption +'   ' + lvVit als.Items[ i].SubItem s[0] + #13 ;
  293                if lvVit als.Items[ i].SubItem s[2] = kwV itals then
  294                  begin
  295                    sVit als := sVi tals + lvV itals.Item s[i].Capti on +'  ' +  lvVitals. Items[i].S ubItems[0]  + #13;
  296                    inc( iVitals);
  297                  end
  298                else
  299                  begin
  300                    sCli O := sCliO  + lvVital s.Items[i] .Caption + '  ' + lvV itals.Item s[i].SubIt ems[0] + # 13;
  301                    inc( iExternal) ;
  302                  end;
  303              end;
  304  
  305   //      if  MessageDl g('Are you  sure you  want to ma rk '+IntTo Str(j)+' v itals sign  records a s '
  306   //         + sReason+ '?', mtCon firmation,  [mbYes, m bNo], 0) < > mrYes th en
  307   //            Exit;
  308         if i Vitals = 0  then
  309           be gin
  310              MessageDlg ('Selected  records a re not sto red in the  Vitals pa ckage.'+#1 3+
  311                'Please  use the Fl owsheets a pplication  to update  them.', m tInformati on, [mbOk] , 0);
  312              exit;
  313           en d;
  314  
  315         if M essageDlg( WarningStr ing(iExter nal), mtCo nfirmation , [mbYes,  mbNo], 0)  <> mrYes t hen
  316           Ex it;
  317  
  318         sDUZ  := getUse rDUZString ;
  319         for  i := 0 to  lvVitals.I tems.Count  - 1 do
  320           if  lvVitals. Items[i].S elected an d (lvVital s.Items[i] .SubItems[ 2] = kwVit als)
  321           th en
  322              with TGMV_ FileEntry( lvVitals.I tems[i].Da ta) do
  323                begin
  324                  RetLis t := setGM VErrorReco rd(IEN + ' ^' + sDUZ  + '^' + In tToStr(rgR eason.Item Index + 1) );
  325                  RetLis t.Free;
  326                end;
  327   //      Me ssageDlg(' Vitals:'+# 13#10#13#1 0+s+#13#10 #13#10+'ma rked as '  + rgReason .Items[rgR eason.Item Index],mtI nformation ,[mbOk],0) ;
  328   //      Sh owInfo('En tered In E rror Resul t','Vitals :'+#13#10# 13#10+s+#1 3#10#13#10 +'marked a s ' + rgRe ason.Items [rgReason. ItemIndex] );
  329         Moda lResult :=  mrOK;
  330       end;
  331   end;
  332  
  333   procedure  TfrmGMV_En teredInErr or.OkToPro ceed(Sende r: TObject );
  334   begin
  335     btnOK.En abled := ( rgReason.I temIndex >  -1)
  336       and (l vVitals.Se lCount > 0 ) and  (rg Reason.Ite mIndex >=  0);
  337   end;
  338  
  339   procedure  TfrmGMV_En teredInErr or.FormClo se(Sender:  TObject;  var Action : TCloseAc tion);
  340   begin
  341     ClearLis t;
  342   end;
  343  
  344   procedure  TfrmGMV_En teredInErr or.lvVital sChange(Se nder: TObj ect;
  345     Item: TL istItem; C hange: TIt emChange);
  346   begin
  347     rgReason .Enabled : = (lvVital s.ItemFocu sed <> nil ) or (lvVi tals.SelCo unt > 0);
  348   end;
  349  
  350   procedure  TfrmGMV_En teredInErr or.FormRes ize(Sender : TObject) ;
  351   var
  352     i,iLen:I nteger;
  353   begin
  354   //  lvVita ls.Columns [1].Width  := lvVital s.Width -  lvVitals.C olumns[0]. Width - lv Vitals.Col umns[2].Wi dth- 4;
  355     iLen :=  lvVitals.W idth - 20;
  356     for i :=  0 to lvVi tals.Colum ns.Count -  1 do
  357       if i < > 1 then
  358         iLen  := iLen -  lvVitals. Columns[i] .Width;
  359     lvVitals .Columns[1 ].Width :=  iLen;
  360   end;
  361  
  362   procedure  TfrmGMV_En teredInErr or.FormKey Down(Sende r: TObject ;
  363     var Key:  Word; Shi ft: TShift State);
  364   begin
  365     if Key =  VK_ESCAPE  then
  366       ModalR esult := m rCancel;
  367   end;
  368  
  369   procedure  TfrmGMV_En teredInErr or.lvVital sCustomDra wItem(
  370     Sender:  TCustomLis tView; Ite m: TListIt em; State:  TCustomDr awState;
  371     var Defa ultDraw: B oolean);
  372   begin
  373     if Item. SubItems.C ount >= 2  then begin
  374     if Item. SubItems[2 ] = kwClio  then
  375       lvVita ls.Canvas. Font.Color  := clGray
  376     else
  377       lvVita ls.Canvas. Font.Color  := clWind owText;
  378     end;
  379   end;
  380  
  381   end.
  382