45. EPMO Open Source Coordination Office Redaction File Detail Report

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

45.1 Files compared

# Location File Last Modified
1 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSVIEW fGMV_PatientVitals.pas Tue Dec 13 18:26:14 2016 UTC
2 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSVIEW fGMV_PatientVitals.pas Fri Mar 31 15:01:50 2017 UTC

45.2 Comparison summary

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

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

45.4 Active regular expressions

No regular expressions were active.

45.5 Comparison detail

  1   unit fGMV_ PatientVit als;
  2  
  3   interface
  4  
  5   uses
  6     Windows,  Messages,  SysUtils,  Variants,  Classes,  Graphics,  Controls,  Forms,
  7     Dialogs,  mGMV_Grid Graph, Ext Ctrls, Std Ctrls, Com Ctrls
  8     , ImgLis t
  9     , mGMV_M DateTime,  Menus
  10     , ShellA PI, AppEvn ts, U_Help MGR
  11     ;
  12  
  13   type
  14     TfrmVita ls = class (TForm)
  15       TfraGM V_GridGrap h1: TfraGM V_GridGrap h;
  16       MainMe nu1: TMain Menu;
  17       E1: TM enuItem;
  18       EnterV itals1: TM enuItem;
  19       N1: TM enuItem;
  20       Allerg ies1: TMen uItem;
  21       Exit1:  TMenuItem ;
  22       Help1:  TMenuItem ;
  23       Index1 : TMenuIte m;
  24       About1 : TMenuIte m;
  25       N2: TM enuItem;
  26       N3: TM enuItem;
  27       Entere dinError1:  TMenuItem ;
  28       PrintG raph1: TMe nuItem;
  29       ShowHi deGraphOpt ions1: TMe nuItem;
  30       Select GraphColor 1: TMenuIt em;
  31       Vitals We1: TMenu Item;
  32       AppEv:  TApplicat ionEvents;
  33       N4: TM enuItem;
  34       Patien tInformati on1: TMenu Item;
  35       Vitals Report1: T MenuItem;
  36       miShow RPCLog: TM enuItem;
  37       Grap1:  TMenuItem ;
  38       proced ure TfraGM V_GridGrap h1acEnterV italsExecu te(Sender:  TObject);
  39       proced ure FormCr eate(Sende r: TObject );
  40       proced ure FormDe stroy(Send er: TObjec t);
  41       proced ure FormKe yDown(Send er: TObjec t; var Key : Word;
  42         Shif t: TShiftS tate);
  43       proced ure FormCl ose(Sender : TObject;  var Actio n: TCloseA ction);
  44       proced ure TfraGM V_GridGrap h1acEntere dInErrorEx ecute(Send er: TObjec t);
  45       proced ure TfraGM V_GridGrap h1acPatien tAllergies Execute(Se nder: TObj ect);
  46       proced ure TfraGM V_GridGrap h1sbGraphC olorClick( Sender: TO bject);
  47       proced ure TfraGM V_GridGrap h1SpeedBut ton1Click( Sender: TO bject);
  48       proced ure TfraGM V_GridGrap h1SelectGr aphColor1C lick(Sende r: TObject );
  49       proced ure FormRe size(Sende r: TObject );
  50       proced ure Exit1C lick(Sende r: TObject );
  51       proced ure About1 Click(Send er: TObjec t);
  52       proced ure Index1 Click(Send er: TObjec t);
  53       proced ure Select GraphColor 1Click(Sen der: TObje ct);
  54       proced ure Vitals We1Click(S ender: TOb ject);
  55       functi on AppEvHe lp(Command : Word; Da ta: Native Int; var C allHelp: B oolean): B oolean;
  56       proced ure Vitals Report1Cli ck(Sender:  TObject);
  57       proced ure Grap1C lick(Sende r: TObject );
  58     private
  59       { Priv ate declar ations }
  60       fFileV ersion,
  61       fFileC omments,
  62       ptName ,
  63       ptInfo : String;
  64       FMDate TimeRange:  TMDateTim eRange;
  65       fIgnor eCount: In teger;
  66     public
  67       { Publ ic declara tions }
  68       proper ty FileVer sion:Strin g read fFi leVersion;
  69       proper ty FileCom ments:Stri ng read fF ileComment s;
  70       proced ure AppExc eption(Sen der: TObje ct; E: Exc eption);
  71     protecte d
  72     end;
  73  
  74   var
  75     frmVital s: TfrmVit als;
  76  
  77   // the nex t function  is used b y CPRS /// ////////// ////////// ////////// //////
  78   function P rocessInPa tientVital s(
  79     aDFN,
  80     aLocatio n,
  81     DateStar t,
  82     DateStop ,
  83     aSignatu re,
  84     aName,
  85     anInfo,
  86     aHospita lName:Stri ng):Intege r;
  87  
  88   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  89  
  90   function g etVitalsFo rm(
  91     aDFN,
  92     aLocatio n,
  93     DateStar t,
  94     DateStop ,
  95     aSignatu re,
  96     aName,
  97     anInfo,
  98     aHospita lName:Stri ng):TfrmVi tals;
  99  
  100  
  101   implementa tion
  102  
  103   uses
  104      uGMV_En gine, uGMV _VersionIn fo, uGMV_U ser, uGMV_ Common, fG MV_AboutDl g,
  105     fGMV_PtI nfo, uGMV_ WindowsEve nts;
  106  
  107   var
  108     PrevApp:  TApplicat ion;
  109     PrevScre en: TScree n;
  110  
  111   {$R *.dfm}
  112  
  113   function g etFrmVital s(aDFN, aL ocation, D ateStart,  DateStop,a Signature, aName,anIn fo,aHospit alName:Str ing): TFrm Vitals;
  114   var
  115     aForm: T frmVitals;
  116     aDT: TDa teTime;
  117     sHospita lName, sVi talABB:Str ing;
  118  
  119     function  EditHospi talName:St ring;
  120     var
  121       i: Int eger;
  122     begin
  123       i := p os('^',aHo spitalName );
  124       if i >  0 then
  125         Resu lt := copy (aHospital Name,1,i-1 )
  126       else
  127         Resu lt := aHos pitalName;
  128     end;
  129  
  130   begin
  131     try
  132       Applic ation.Crea teForm(Tfr mVitals,aF orm);
  133  
  134       aForm. TfraGMV_Gr idGraph1.F rameStyle  := 'CPRS';
  135       aForm. TfraGMV_Gr idGraph1.U pdateGridC olors1.Vis ible := Fa lse;
  136  
  137       if not  aForm.Tfr aGMV_GridG raph1.Fram eInitializ ed then aF orm.TfraGM V_GridGrap h1.SetupFr ame;
  138  
  139       aForm. FMDateTime Range.Star t.setSWDat eTime(Date Start);
  140       aForm. FMDateTime Range.Stop .setSWDate Time(DateS top);
  141  
  142       if Tru nc(aForm.F MDateTimeR ange.Stop. WDate) = t runc (Now)  then
  143         begi n
  144           aD T := Now;
  145           aF orm.FMDate TimeRange. Stop.WDate  := aDT;
  146           aF orm.FMDate TimeRange. Stop.WTime  := aDT;
  147         end;
  148       aForm. TfraGMV_Gr idGraph1.M DateTimeRa nge := aFo rm.FMDateT imeRange;  // propert y updates  labels onl y
  149  
  150       aForm. TfraGMV_Gr idGraph1.P atientLoca tion := aL ocation;
  151  
  152       aForm. TfraGMV_Gr idGraph1.I gnoreCount  := aForm. TfraGMV_Gr idGraph1.I gnoreCount  + 1;
  153       aForm. TfraGMV_Gr idGraph1.P atientDFN  := aDFN;                     //  property
  154       aForm. TfraGMV_Gr idGraph1.l bDateRange .Items.Add (aForm.Tfr aGMV_GridG raph1.lblD ateFromTit le.Caption ); //vhais handria 05 1221
  155       aForm. TfraGMV_Gr idGraph1.l bDateRange .ItemIndex  :=     aF orm.TfraGM V_GridGrap h1.lbDateR ange.Items .Count -1;
  156       aForm. TfraGMV_Gr idGraph1.I gnoreCount  := aForm. TfraGMV_Gr idGraph1.I gnoreCount  - 1;
  157  
  158       aForm. TfraGMV_Gr idGraph1.S etGraphTit le(aName,a nInfo);
  159       
  160       aForm. ptName :=  aName;
  161       aForm. ptInfo :=  anInfo;
  162  
  163   //    aFor m.TfraGMV_ GridGraph1 .lblPatien tName.Capt ion := aNa me;   // v aishandria  050322
  164   //    aFor m.TfraGMV_ GridGraph1 .lblPatien tInfo.Capt ion := anI nfo;  // v aishandria  050322
  165       aForm. TfraGMV_Gr idGraph1.e dPatientNa me.Text :=  aName;    // vaishan dria 05032 2
  166       aForm. TfraGMV_Gr idGraph1.e dPatientIn fo.Text :=  anInfo;   // vaishan dria 05032 2
  167  
  168   //    aFor m.Caption  := 'Vitals  Lite View  ('+aForm. FileCommen ts+')'; //  vhaishand ria 050415
  169       aForm. Caption :=  'Vitals L ite: Vital s for '+aN ame + ' '  +anInfo;
  170  
  171       with a Form do
  172         begi n
  173           Tf raGMV_Grid Graph1.Res toreUserPr eferences;
  174  
  175           //  GraphInde x as Param eter updat e
  176           //  ('xx', 'T ', 'P', 'R ', 'BP', ' HT', 'WT',  'PN', 'PO 2', 'CVP',  'CG');
  177           sV italABB :=  piece(aHo spitalName ,'^',2);
  178           if  sVitalABB  <> '' the n
  179              try
  180                if Upper case(sVita lABB) = 'P OX' then s VitalABB : = 'PO2'; / / vhaishan dria 06022 8
  181                TfraGMV_ GridGraph1 .setGraphB yABBR(sVit alABB);
  182              except
  183              end;
  184         end;
  185  
  186       sHospi talName :=  EditHospi talName;
  187  
  188       if sHo spitalName  = '' then
  189         begi n
  190           tr y
  191              aForm.Tfra GMV_GridGr aph1.lblHo spital.Cap tion := ge tFileField ('44','.01 ',aLocatio n); //vhai shandria 0 50210
  192           ex cept
  193              aForm.Tfra GMV_GridGr aph1.lblHo spital.Cap tion := 'U nknown Loc ation';
  194           en d;
  195         end
  196       else
  197         aFor m.TfraGMV_ GridGraph1 .lblHospit al.Caption  := sHospi talName;
  198     except
  199       on E:  Exception  do
  200         begi n
  201           aF orm := nil ;
  202           Me ssageDLG(' Cannot cre ate a wind ow'+#10#13 +E.Message ,mtError,[ mbOK],0);
  203         end;
  204     end;
  205  
  206     aForm.Tf raGMV_Grid Graph1.Upd ateFrame;  // vhaisha ndria 0512 03
  207     aForm.Tf raGMV_Grid Graph1.scb HGraphChan ge(aForm.T fraGMV_Gri dGraph1.tr bHGraph);
  208     Result : = aForm;
  209   end;
  210  
  211   //======== ========== ========== ========== ========== ========== ========== ==========
  212   function P rocessInPa tientVital s( aDFN, a Location,
  213     DateStar t, DateSto p,aSignatu re,aName,a nInfo,aHos pitalName: String):In teger;
  214   var
  215     Vitals:  TfrmVitals ;
  216  
  217     function  getIOptio n(aName:St ring;aDefa ult:Intege r):Integer ;
  218     var
  219       ss: St ring;
  220       ii: In teger;
  221       begin
  222         try
  223           ss  := getUse rSettings( aName);
  224           ii  := StrToI ntDef(ss,a Default);
  225           Re sult := ii ;
  226         exce pt
  227           Re sult := aD efault;
  228         end;
  229       end;
  230  
  231     procedur e setIOpti on(aName:S tring;aVal ue: Intege r);
  232     begin
  233       try
  234         setU serSetting s(aName,In tToStr(aVa lue));
  235       except
  236       end;
  237     end;
  238  
  239   begin
  240     Vitals : = getFrmVi tals(aDFN,  aLocation , DateStar t, DateSto p,aSignatu re,aName,a nInfo,aHos pitalName) ;
  241     if Vital s <> nil t hen
  242       begin
  243   {$IFDEF DL L}
  244         Appl ication.On Exception  := Vitals. AppExcepti on;
  245   {$ENDIF}
  246         Vita ls.Height  := getIOpt ion('VIEW- HEIGHT',60 0);
  247         Vita ls.Width : = getIOpti on('VIEW-W IDTH',600) ;
  248         Vita ls.Left :=  getIOptio n('VIEW-LE FT',600);
  249         Vita ls.Top :=  getIOption ('VIEW-TOP ',600);
  250         Posi tionForm(V itals);
  251  
  252         Appl ication.Br ingToFront ;   // vha ishandria  051107
  253         Appl ication.Pr ocessMessa ges;
  254  
  255         Vita ls.TfraGMV _GridGraph 1.UpdateFr ame;
  256         Vita ls.TfraGMV _GridGraph 1.scbHGrap hChange(ni l);
  257  
  258         Resu lt := Vita ls.ShowMod al;
  259  
  260         { --  Vitals is  already g one in the  DLL becau se of caFr ee in OnCL ose
  261         with  Vitals do
  262           be gin
  263              setIOption ('VIEW-HEI GHT',Vital s.Height);
  264              setIOption ('VIEW-WID TH',Vitals .Width);
  265              setIOption ('VIEW-LEF T',Vitals. Left);
  266              setIOption ('VIEW-TOP ',Vitals.T op);
  267  
  268              TfraGMV_Gr idGraph1.S aveStatus;
  269           en d;
  270         }
  271       end
  272     else
  273       Result  := -1;
  274  
  275   end;
  276  
  277   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  278  
  279   function g etVitalsFo rm(
  280     aDFN, aL ocation,
  281     DateStar t, DateSto p,aSignatu re,aName,a nInfo,aHos pitalName: String):Tf rmVitals;
  282   begin
  283     Result : = getFrmVi tals(aDFN,  aLocation , DateStar t, DateSto p,aSignatu re,aName,a nInfo,aHos pitalName) ;
  284   end;
  285  
  286   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  287   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  288   ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
  289  
  290   procedure  TfrmVitals .TfraGMV_G ridGraph1a cEnterVita lsExecute( Sender: TO bject);
  291   begin
  292     TfraGMV_ GridGraph1 .acEnterVi talsExecut e(Sender);
  293   end;
  294  
  295   procedure  TfrmVitals .FormCreat e(Sender:  TObject);
  296   var
  297     s: Strin g;
  298   begin
  299     inherite d;
  300     FMDateTi meRange :=  TMDateTim eRange.Cre ate;
  301     fIgnoreC ount := 0;
  302  
  303     with TVe rsionInfo. Create(sel f) do
  304     try
  305       fFileV ersion :=  FileVersio n;
  306       fFileC omments :=  Comments;
  307     finally
  308       free;
  309     end;
  310  
  311     try
  312       s := g etUserSett ings('GRAP H OPTIONS  VISIBLE');
  313       TfraGM V_GridGrap h1.pnlGrap hOptions.V isible :=  s='1';
  314       TfraGM V_GridGrap h1.pnlGrid Top.Visibl e := True;
  315     except
  316     end;
  317   {$IFDEF SH OWLOG}
  318     miShowRP CLog.Visib le := True ;
  319   {$ELSE}
  320     miShowRP CLog.Visib le := Fals e;
  321   {$ENDIF}
  322   end;
  323  
  324   procedure  TfrmVitals .FormDestr oy(Sender:  TObject);
  325   begin
  326     FMDateTi meRange.Fr ee;
  327     inherite d;
  328   end;
  329  
  330   procedure  TfrmVitals .FormKeyDo wn(Sender:  TObject;  var Key: W ord;
  331     Shift: T ShiftState );
  332   begin
  333     if Key =  VK_ESCAPE  then
  334       try
  335         Clos e;
  336       except
  337       end;
  338     if Key =  VK_F1 the n
  339       begin
  340         Appl ication.He lpCommand( HelpContex t,0);
  341       end;
  342     if Key =  VK_RETURN  then
  343       begin
  344         if T fraGMV_Gri dGraph1.pn lPtInfo.Be velOuter =  bvRaised  then
  345              TfraGMV_Gr idGraph1.a cPatientIn fo.Execute ; // vhais handria 06 0309
  346       end;
  347   end;
  348  
  349   procedure  TfrmVitals .FormClose (Sender: T Object; va r Action:  TCloseActi on);
  350  
  351   function g etIOption( aName:Stri ng;aDefaul t:Integer) :Integer;
  352     var
  353       ss: St ring;
  354       ii: In teger;
  355       begin
  356         try
  357           ss  := getUse rSettings( aName);
  358           ii  := StrToI ntDef(ss,a Default);
  359           Re sult := ii ;
  360         exce pt
  361           Re sult := aD efault;
  362         end;
  363       end;
  364  
  365     procedur e setIOpti on(aName:S tring;aVal ue: Intege r);
  366     begin
  367       try
  368         setU serSetting s(aName,In tToStr(aVa lue));
  369       except
  370       end;
  371     end;
  372  
  373   begin
  374     if TfraG MV_GridGra ph1.pnlGra phOptions. Visible th en
  375       setUse rSettings( 'GRAPH OPT IONS VISIB LE','1')
  376     else
  377       setUse rSettings( 'GRAPH OPT IONS VISIB LE','0');
  378  
  379     setIOpti on('VIEW-H EIGHT',Hei ght);
  380     setIOpti on('VIEW-W IDTH',Widt h);
  381     setIOpti on('VIEW-L EFT',Left) ;
  382     setIOpti on('VIEW-T OP',Top);
  383  
  384     TfraGMV_ GridGraph1 .SaveStatu s;
  385   {$IFDEF DL L}
  386     Action : = caFree;
  387   {$ENDIF}
  388   end;
  389  
  390   procedure  TfrmVitals .TfraGMV_G ridGraph1a cEnteredIn ErrorExecu te(Sender:  TObject);
  391   begin
  392     TfraGMV_ GridGraph1 .acEntered InErrorExe cute(Sende r);
  393   end;
  394  
  395   procedure  TfrmVitals .TfraGMV_G ridGraph1a cPatientAl lergiesExe cute(
  396     Sender:  TObject);
  397   begin
  398     TfraGMV_ GridGraph1 .acPatient AllergiesE xecute(Sen der);
  399   end;
  400  
  401   procedure  TfrmVitals .TfraGMV_G ridGraph1s bGraphColo rClick(Sen der: TObje ct);
  402   begin
  403     TfraGMV_ GridGraph1 .sbGraphCo lorClick(s ender);
  404   end;
  405  
  406   procedure  TfrmVitals .TfraGMV_G ridGraph1S peedButton 1Click(Sen der: TObje ct);
  407   begin
  408     TfraGMV_ GridGraph1 .sbGraphCo lorClick(S ender);
  409  
  410   end;
  411  
  412   procedure  TfrmVitals .TfraGMV_G ridGraph1S electGraph Color1Clic k(
  413     Sender:  TObject);
  414   begin
  415     TfraGMV_ GridGraph1 .sbGraphCo lorClick(S ender);
  416   end;
  417  
  418   procedure  TfrmVitals .FormResiz e(Sender:  TObject);
  419   var
  420     wd: Inte ger;
  421   begin
  422     Inc(fIgn oreCount);
  423     if fIgno reCount <  2 then
  424       with T fraGMV_Gri dGraph1 do
  425         begi n
  426           wd  := grdVit als.Width  - grdVital s.ColWidth s[0];
  427           wd  := wd mod  (grdVital s.DefaultC olWidth+1) ;
  428           if  wd > 1 th en Self.Wi dth := Sel f.Width -  wd;
  429           pn lRight.Wid th := grdV itals.Defa ultColWidt h div 4;
  430  
  431           ch rtVitalsRe size(nil);  //vhaisha ndria 0601 06
  432         end;
  433     dec(fIgn oreCount);
  434   end;
  435  
  436   procedure  TfrmVitals .Exit1Clic k(Sender:  TObject);
  437   begin
  438     Close;
  439   end;
  440  
  441   procedure  TfrmVitals .About1Cli ck(Sender:  TObject);
  442   begin
  443     gmvaBOUT dlg.eXECUT E;
  444   end;
  445  
  446   procedure  TfrmVitals .Index1Cli ck(Sender:  TObject);
  447   begin
  448     Applicat ion.HelpCo mmand(0,0) ;
  449   end;
  450  
  451   procedure  TfrmVitals .SelectGra phColor1Cl ick(Sender : TObject) ;
  452   begin
  453       TfraGM V_GridGrap h1.sbGraph ColorClick (nil);
  454   end;
  455  
  456   procedure  TfrmVitals .VitalsWe1 Click(Send er: TObjec t);
  457   var
  458     s: Strin g;
  459   begin
  460   //    ShellExecu te(0, nil,  PChar('ht tp:// DNS        . DNS     /ClinicalS pecialties /vitals/') , nil, nil , SW_NORMA L)
  461     s := get WebLinkAdd ress;
  462     if s <>  '' then
  463       ShellE xecute(0,  nil, PChar (S), nil,  nil, SW_NO RMAL)
  464   end;
  465  
  466   function T frmVitals. AppEvHelp( Command: W ord; Data:  NativeInt ;
  467     var Call Help: Bool ean): Bool ean;
  468   var
  469     s: Strin g;
  470   //  iHelp:  Integer;
  471    CrRtn: In teger;
  472   begin
  473     AppEv.Ca ncelDispat ch;
  474    // s := G etProgramF ilesPath+' \Vista\Com mon Files\ GMV_Vitals ViewEnter. hlp';
  475     CrRtn :=  Screen.Cu rsor;
  476     Screen.C ursor := c rHourGlass ;
  477     try
  478     LoadHelp File('GMV_ VitalsView Enter.hlp' );
  479     finally
  480       Screen .Cursor :=  CrRtn;
  481     end;
  482   //  iHelp  := ActiveC ontrol.Hel pContext;
  483   //  if iHe lp = 0 the n iHelp :=  1;
  484  
  485     try
  486   //    Appl ication.He lpSystem.S howContext Help(iHelp ,s);
  487      // Appl ication.He lpSystem.S howTopicHe lp('Introd uction',Ap plication. HelpFile);
  488       WinHel p( Applica tion.Handl e, PChar(A pplication .HelpFile) , HELP_CON TEXT, 1);
  489  
  490       Result  := True;
  491     except
  492       Result  := False;
  493     end;
  494  
  495     CallHelp  := False;
  496   end;
  497  
  498   procedure  TfrmVitals .VitalsRep ort1Click( Sender: TO bject);
  499   begin
  500     TfraGMV_ GridGraph1 .acVitalsR eportExecu te(Sender) ;
  501   end;
  502  
  503   procedure  TfrmVitals .Grap1Clic k(Sender:  TObject);
  504   begin
  505     TfraGMV_ GridGraph1 .acShowGra phReportEx ecute(Send er);
  506   end;
  507  
  508   procedure  TfrmVItals .AppExcept ion(Sender : TObject;  E: Except ion);
  509   begin
  510     {
  511     Noted th at this si mply hides  various e xceptions  within the  DLL and o nly logs
  512     them to  the Window s Event Lo g - DRP 5/ 29/2013@12 :49pm
  513     }
  514     WindowsL ogLine('Vi tals Excep tion'#13#1 0+E.Messag e);
  515   end;
  516  
  517   initializa tion
  518     PrevApp  := Applica tion;
  519     PrevScre en := Scre en;
  520  
  521   finalizati on
  522     Applicat ion := Pre vApp;
  523     Screen : = PrevScre en;
  524   end.
  525