28. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 8/3/2017 10:10:46 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.

28.1 Files compared

# Location File Last Modified
1 V31A.zip\V31A\448\OR_30_448V7_SRC\UI\Encounter fDiagnoses.pas Thu Mar 2 16:33:30 2017 UTC
2 V31A.zip\V31A\448\OR_30_448V7_SRC\UI\Encounter fDiagnoses.pas Thu Aug 3 13:30:26 2017 UTC

28.2 Comparison summary

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

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

28.4 Active regular expressions

No regular expressions were active.

28.5 Comparison detail

  1   unit fDiag noses;
  2  
  3   interface
  4  
  5   uses
  6     Windows,  Messages,  SysUtils,  Classes,  Graphics,  Controls,  Forms, Dia logs,
  7     fPCEBase , StdCtrls , CheckLst , ORCtrls,  ExtCtrls,  Buttons,  uPCE, rPCE , ORFn,
  8     ComCtrls , fPCEBase Main; //,  UBAGlobals ;
  9  
  10   type
  11     TfrmDiag noses = cl ass(TfrmPC EBaseMain)
  12       cmdDia gPrimary:  TButton;
  13       ckbDia gProb: TCh eckBox;
  14       lblAdd 2PL: TLabe l;
  15       proced ure cmdDia gPrimaryCl ick(Sender : TObject) ;
  16       proced ure ckbDia gProbClick ed(Sender:  TObject);
  17       proced ure FormCr eate(Sende r: TObject );
  18       proced ure btnRem oveClick(S ender: TOb ject);
  19       proced ure FormRe size(Sende r: TObject ); overrid e;
  20       proced ure lbxSec tionClickC heck(Sende r: TObject ; Index: I nteger);
  21  
  22       //
  23       // NOT E: Set lbx Section.It emTipEnabl e to False  in order  to see nor mal operat ion
  24       // of  tooltip fl y-over hin ts.  rpk 1 /22/2012
  25       //
  26       proced ure lbxSec tionMouseM ove(Sender : TObject;  Shift: TS hiftState;  X,
  27         Y: I nteger);
  28       proced ure lbxSec tionEnter( Sender: TO bject); //  rpk 1/20/ 2012
  29     private
  30       proced ure Ensure PrimaryDia g;
  31     protecte d
  32       proced ure Update NewItemStr (var x: st ring); ove rride;
  33       proced ure Update Controls;  override;
  34     public
  35     end;
  36  
  37   const
  38     // ICD10 -R.
  39     xTX_INAC TIVE_CODE  = 'The "#"  character  next to t he code fo r this pro blem indic ates that  the proble m' + #13#1 0 +
  40       'refer ences an I CD code th at is not  active as  of the dat e of this  encounter. ' + #13#10  +
  41       'Befor e you can  select thi s problem,  you must  update the  ICD code  it contain s' + #13#1 0 +
  42       'via t he Problem s tab.';
  43     TX_INACT IVE_CODE =
  44       'The " #" charact er next to  the code  for this p roblem ind icates ' +  CRLF+
  45       'that  the proble m referenc es an ICD  code that  is not act ive ' + CR LF+
  46       'as of  the date  of this en counter.'  + CRLF+CRL F+
  47       'Befor e you can  select thi s problem,  you must  '+ CRLF+
  48       'updat e the ICD  code it co ntains via  the Probl ems tab.';
  49  
  50     TC_INACT IVE_CODE =  'Problem  Contains I nactive Co de';
  51  
  52     TX_INV_I CD10_DX =
  53       'The s elected IC D-10-CM di agnosis ca nnot be ad ded to an  encounter  prior to I CD-10 impl ementation .' + CRLF  + CRLF +
  54       'Pleas e select a  valid ICD -9-CM diag nosis whic h best des cribes the  diagnosis .';
  55     TC_INV_I CD10_DX =  'Invalid S election';
  56  
  57   var
  58     frmDiagn oses: Tfrm Diagnoses;
  59  
  60   implementa tion
  61  
  62   {$R *.DFM}
  63  
  64   uses
  65     fEncount erFrame, u Const, uUt ils, rMisc ;
  66  
  67   var
  68     CurrentI tem: Integ er;  // rp k 1/20/201 2                                SDD 3.3.72   should b e form fie ld?
  69  
  70   procedure  TfrmDiagno ses.Ensure PrimaryDia g;
  71   var
  72     i: Integ er;
  73     Primary:  Boolean;
  74  
  75   begin
  76     with lbG rid do
  77     begin
  78       Primar y := False ;
  79       for i  := 0 to It ems.Count  - 1 do
  80         if T PCEDiag(It ems.Object s[i]).Prim ary then
  81           Pr imary := T rue;
  82  
  83       if not  Primary a nd (Items. Count > 0)  then
  84       begin
  85         Grid Index := 0 ;
  86         TPCE Diag(Items .Objects[0 ]).Primary  := True;
  87         Grid Changed;
  88       end;
  89     end;
  90   end;
  91  
  92   procedure  TfrmDiagno ses.cmdDia gPrimaryCl ick(Sender : TObject) ;
  93   var
  94     gi, i: I nteger;
  95     ADiagnos is: TPCEDi ag;
  96  
  97   begin
  98     inherite d;
  99     gi := Gr idIndex;
  100     with lbG rid do for  i := 0 to  Items.Cou nt - 1 do
  101       begin
  102         ADia gnosis :=  TPCEDiag(I tems.Objec ts[i]);
  103         ADia gnosis.Pri mary := (g i = i);
  104       end;
  105     GridChan ged;
  106   end;
  107  
  108   procedure  TfrmDiagno ses.ckbDia gProbClick ed(Sender:  TObject);
  109   var
  110     i: integ er;
  111   const
  112     PL_ITEMS  = 'Proble m List Ite ms';
  113  
  114   begin
  115     inherite d;
  116     if (NotU pdating) t hen
  117     begin
  118       for i  := 0 to lb Grid.Items .Count - 1  do
  119         if ( lbGrid.Sel ected[i])  then
  120           TP CEDiag(lbG rid.Items. Objects[i] ).AddProb  := (ckbDia gProb.Chec ked) and
  121              (TPCEDiag( lbGrid.Ite ms.Objects [i]).Categ ory <> PL_ ITEMS);
  122       GridCh anged;
  123     end;
  124   end;
  125  
  126   procedure  TfrmDiagno ses.FormCr eate(Sende r: TObject );
  127   begin
  128     inherite d;
  129     FTabName  := CT_Dia gNm;
  130     FPCEList CodesProc  := ListDia gnosisCode s;
  131     FPCEItem Class := T PCEDiag;
  132     FPCECode  := 'POV';
  133     FSection TabCount : = 3;
  134     CurrentI tem := -1;  // rpk 1/ 21/2012          SDD  3.3.71
  135     FormResi ze(Self);
  136     ckbDiagP rob.Captio n := ''; / / ICD-10.  CodeCR CPR S163. Over lapping wi th lblAdd2 Pl
  137     Applicat ion.HintHi dePause :=  15000;
  138   {$IFDEF IC D10TEST01}
  139     cbICD10D ebugRPC.Ch ecked := g DebugProbl emList;
  140   {$ENDIF}
  141   end;
  142  
  143   procedure  TfrmDiagno ses.btnRem oveClick(S ender: TOb ject);
  144   begin
  145     inherite d;
  146     EnsurePr imaryDiag;
  147   end;
  148  
  149   procedure  TfrmDiagno ses.Update NewItemStr (var x: st ring);
  150   begin
  151     inherite d;
  152     if lbGri d.Items.Co unt = 0 th en
  153       x := x  + U + '1'
  154     else
  155       x := x  + U + '0' ;
  156   end;
  157  
  158   procedure  TfrmDiagno ses.Update Controls;
  159   var
  160     i, j, k,  PLItemCou nt: intege r;
  161     OK: bool ean;
  162   const
  163     PL_ITEMS  = 'Proble m List Ite ms';
  164   begin
  165     inherite d;
  166     if (NotU pdating) t hen
  167     begin
  168       BeginU pdate;
  169       try
  170         cmdD iagPrimary .Enabled : = (lbGrid. SelCount =  1);
  171         OK : = (lbGrid. SelCount >  0);
  172         PLIt emCount :=  0;
  173         if O K then
  174           fo r k := 0 t o lbGrid.I tems.Count  - 1 do
  175              if (lbGrid .Selected[ k]) and
  176                (TPCEDia g(lbGrid.I tems.Objec ts[k]).Cat egory = PL _ITEMS) th en
  177                PLItemCo unt := PLI temCount +  1;
  178         OK : = OK and ( PLItemCoun t < lbGrid .SelCount) ;
  179         lblA dd2PL.Enab led := OK;
  180         ckbD iagProb.En abled := O K;
  181         if ( OK) then
  182         begi n
  183           j  := 0;
  184           fo r i := 0 t o lbGrid.I tems.Count  - 1 do
  185           be gin
  186              if (lbGrid .Selected[ i]) and
  187                (TPCEDia g(lbGrid.I tems.Objec ts[i]).Add Prob) then
  188                inc(j);
  189           en d;
  190           if  (j = 0) t hen
  191              ckbDiagPro b.Checked  := FALSE
  192           el se
  193              if (j < lb Grid.SelCo unt) then
  194                ckbDiagP rob.State  := cbGraye d
  195              else
  196                ckbDiagP rob.Checke d := TRUE;
  197         end
  198         else
  199           ck bDiagProb. Checked :=  FALSE;
  200       finall y
  201         EndU pdate;
  202       end;
  203     end;
  204   end;
  205  
  206   procedure  TfrmDiagno ses.FormRe size(Sende r: TObject );
  207   begin
  208     inherite d;
  209     FSection Tabs[0] :=  -(lbxSect ion.width  - LBCheckW idthSpace  -
  210                           (8 * Mai nFontWidth ) - Scroll BarWidth);
  211     FSection Tabs[1] :=  -FSection Tabs[0] +  2;
  212     FSection Tabs[2] :=  -FSection Tabs[0] +  4;
  213     UpdateTa bPos;
  214   end;
  215  
  216   procedure  TfrmDiagno ses.lbxSec tionClickC heck(Sende r: TObject ;
  217     Index: I nteger);
  218   var
  219     sSystem:  String;
  220     EncDT: T FMDateTime ;
  221   begin
  222     if not F UpdatingGr id then
  223       begin
  224       FUpdat ingGrid :=  TRUE;
  225       if (lb xSection.C hecked[Ind ex]) and ( Piece(lbxS ection.Ite ms[Index],  U, 5) = ' #') then
  226       begin
  227         Info Box(TX_INA CTIVE_CODE , TC_INACT IVE_CODE,  MB_ICONWAR NING or MB _OK);
  228         lbxS ection.Che cked[Index ] := False ;
  229         FUpd atingGrid  := FALSE;
  230         btnO therClick( btnOther);                                  // ICD-10  SDD 3.3.73
  231         exit ;
  232       end
  233       // Cod eCR 186 -- ---------- ---------- ---------- ---------- ---------- ---- begin
  234   {
  235       else i f (Piece(E ncounter.G etICDVersi on, U, 1)  = 'ICD') a nd
  236         ((Po s('ICD-10' , Piece(lb xSection.I tems[Index ], U, 2))  > 0) or (P iece(lbxSe ction.Item s[Index],  U, 6)='10D ')) then
  237       begin
  238         // A ttempting  to add an  ICD10 diag nosis code  to an ICD 9 encounte r
  239         Info Box(TX_INV _ICD10_DX,  TC_INV_IC D10_DX, MB _ICONERROR  or MB_OK) ;
  240         lbxS ection.Che cked[Index ] := False ;
  241         exit ;
  242       end
  243   }
  244       else
  245         begi n
  246           sS ystem := P iece(lbxSe ction.Item s[Index],  U, 7);
  247           En cDT := Tru nc(uEncPCE Data.Visit DateTime);
  248           if  (sSystem= 'ICD-10')  and (Trunc (StrToFloa t(GImpleme ntationDat e))>EncDT)  then
  249           be gin
  250              InfoBox(TX _INV_ICD10 _DX, TC_IN V_ICD10_DX , MB_ICONW ARNING or  MB_OK);
  251              lbxSection .Checked[I ndex] := F alse;
  252              FUpdatingG rid := FAL SE;
  253              btnOtherCl ick(btnOth er);                                 // ICD -10 SDD 3. 3.73
  254              exit;
  255           en d;
  256         end;
  257       // Cod eCR 186 -- ---------- ---------- ---------- ---------- ---------- ------ end
  258       FUpdat ingGrid :=  FALSE;
  259       end;
  260     inherite d;
  261     EnsurePr imaryDiag;
  262   end;
  263  
  264   procedure  TfrmDiagno ses.lbxSec tionEnter( Sender: TO bject);
  265   begin
  266     inherite d;
  267     CurrentI tem := -1;   // rpk 2 /22/2012                                    SDD 3.3.73
  268   end;
  269  
  270   procedure  TfrmDiagno ses.lbxSec tionMouseM ove(Sender : TObject;  Shift: TS hiftState;
  271     X, Y: In teger); //  rpk 1/20/ 2012
  272   var
  273     idx: Int eger;
  274     s: strin g;
  275     APoint:  TPoint;
  276     lbx: TOR ListBox;   // rpk 2/2 7/2012
  277  
  278  
  279     function  getItemSt atus(anIte m:String): String;
  280     begin
  281       Result  := piece( anItem,U,5 );
  282       if Res ult = '#'   then
  283         Resu lt := '(#)  '
  284       else
  285         Resu lt := '';
  286     end;
  287  
  288   begin
  289     inherite d;
  290  
  291     APoint.X  := X;
  292     APoint.Y  := Y;
  293  
  294     lbx := S ender as T ORListBox;
  295     idx := l bx.ItemAtP os(APoint,  True);
  296  
  297     if (idx  = -1) or ( CurrentIte m <> idx)  then begin
  298       Applic ation.Canc elHint;
  299       lbx.Hi nt := '';
  300     end
  301     else beg in
  302       s := l bx.Items[i dx];
  303       // get  ICD-10 lo ng descrip tion in pi ece 6 and  put in hov er hint.
  304       If lbx .Name = 'l bGrid' the n
  305         begi n
  306             lbx.Hint : = HintStri ng(Piece(s , U, 4));  // DN S      BELLC [spe c30.3.3]               SDD 3.3.73
  307         end
  308       else
  309         begi n
  310           s  := getItem Status(s)+ ' '+Piece( s, U, 6);
  311           s  := RemoveD uplicate(s ,' - '); / / RPC Desc ription fo rmat fix f or "Sectio n Name" it em
  312   //         lbx.Hint : = HintStri ng(getItem Status(s)+ ' '+Piece( s, U, 6));   // rpk 2 /27/2012
  313           lb x.Hint :=  HintString (s);  // r pk 2/27/20 12
  314         end;
  315     end;
  316  
  317     CurrentI tem := idx ;
  318  
  319   end;  // l bxSectionM ouseMove
  320  
  321  
  322   end.