43. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/16/2018 9:34:20 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.

43.1 Files compared

# Location File Last Modified
1 CPRS_Build_4.zip\CPRS_src\CPRS-chart\Womens Health fWVPregLacStatusUpdate.pas Tue May 15 15:02:16 2018 UTC
2 CPRS_Build_4.zip\CPRS_src\CPRS-chart\Womens Health fWVPregLacStatusUpdate.pas Tue May 15 18:16:35 2018 UTC

43.2 Comparison summary

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

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

43.4 Active regular expressions

No regular expressions were active.

43.5 Comparison detail

  1   unit fWVPr egLacStatu sUpdate;
  2   {
  3     ======== ========== ========== ========== ========== ========== ========== ========== ==
  4     *
  5     *        Applicatio n:  TDrugs  Patch OR* 3*377 and  WV*1*24
  6              Developer:       PII                   
  7     *        Site:          Salt L ake City I SC
  8     *
  9     *        Descriptio n:  Update  form to e nter the a ppropriate  informati on for
  10     *                       pregna ncy and la ctation da ta. Caller  supplies  the
  11     *                       approp riate pati ent via th e TWVPatie nt object  as
  12     *                       an IWV Paitent in terface.
  13     *
  14     *        Notes:
  15     *
  16     ======== ========== ========== ========== ========== ========== ========== ========== ==
  17   }
  18  
  19   interface
  20  
  21   uses
  22     System.A ctions,
  23     System.C lasses,
  24     System.S ysUtils,
  25     System.U ITypes,
  26     System.V ariants,
  27     Vcl.Actn List,
  28     Vcl.ComC trls,
  29     Vcl.Cont rols,
  30     Vcl.Dial ogs,
  31     Vcl.ExtC trls,
  32     Vcl.Form s,
  33     Vcl.Grap hics,
  34     Vcl.Menu s,
  35     Vcl.StdC trls,
  36     Winapi.M essages,
  37     Winapi.W indows,
  38     iWVInter face,
  39     DateUtil s,
  40     rMisc,
  41     ORFn,
  42     ORCtrls,
  43     VAUtils,
  44     ORDtTm,
  45     rReminde rs;
  46  
  47   type
  48     TfrmWVPr egLacStatu sUpdate =  class(TFor m)
  49       btnCan cel: TButt on;
  50       btnSav e: TButton ;
  51       pnlOpt ions: TPan el;
  52       robnAb leToConcei veYes: TRa dioButton;
  53       robnAb leToConcei veNo: TRad ioButton;
  54       ckbxMe nopause: T CheckBox;
  55       ckbxHy sterectomy : TCheckBo x;
  56       stxtAb leToConcei ve: TStati cText;
  57       stxtCu rrentlyPre gnant: TSt aticText;
  58       robnPr egnantYes:  TRadioBut ton;
  59       robnPr egnantNo:  TRadioButt on;
  60       robnPr egnantUnsu re: TRadio Button;
  61       stxtLa stMenstrua lPeriod: T StaticText ;
  62       pnlLac tationStat us: TPanel ;
  63       robnLa ctatingYes : TRadioBu tton;
  64       robnLa ctatingNo:  TRadioBut ton;
  65       stxtLa ctationSta tus: TStat icText;
  66       ckbxPe rmanent: T CheckBox;
  67       stxtED DMethod: T StaticText ;
  68       stxtRe aderStop:  TStaticTex t;
  69       grdCon ceive: TGr idPanel;
  70       pnlCon eiveLabel:  TPanel;
  71       grdPre gStatus: T GridPanel;
  72       pnlPre gStatusLab el: TPanel ;
  73       pnlLMP : TPanel;
  74       pnlEDD : TPanel;
  75       grdDat es: TGridP anel;
  76       grdLay out: TGrid Panel;
  77       pnlCon veive: TPa nel;
  78       pnlPre gnant: TPa nel;
  79       pnlLac tationLabe l: TPanel;
  80       grdLac tation: TG ridPanel;
  81       pnlOth er: TPanel ;
  82       ststxt Other: TSt aticText;
  83       edtOth er: TEdit;
  84       dteLMP D: TORDate Box;
  85       dteEDD : TORDateB ox;
  86       scroll Box: TScro llBox;
  87       pnlFor m: TPanel;
  88  
  89       proced ure AbleTo ConceiveYe sNo(Sender : TObject) ;
  90       proced ure Pregna ntYesNoUns ure(Sender : TObject) ;
  91       proced ure CheckO kToSave(Se nder: TObj ect);
  92       proced ure robnLa ctatingYes NoClick(Se nder: TObj ect);
  93       proced ure FormCr eate(Sende r: TObject );
  94       proced ure FormCl ose(Sender : TObject;  var Actio n: TCloseA ction);
  95       proced ure dteLMP DExit(Send er: TObjec t);
  96       proced ure dteLMP DChange(Se nder: TObj ect);
  97       proced ure dteEDD Change(Sen der: TObje ct);
  98       proced ure dteLMP DMouseLeav e(Sender:  TObject);
  99       proced ure scroll BoxResize( Sender: TO bject);
  100       proced ure SetScr ollBarHeig ht(FontSiz e: Integer );
  101       proced ure dteLMP DDateDialo gClosed(Se nder: TObj ect);
  102     private
  103       { Priv ate declar ations }
  104       fDFN:  string;
  105       MinFor mHeight: I nteger; // Determines  when the  scrollbars  appear
  106       MinFor mWidth: In teger;
  107       proced ure setLab elTabStops (value: bo olean);
  108       functi on calcDat es(origina lValue, ne wValue: TF MDateTime;  update, p atient: st ring): TFM DateTime;
  109       proced ure update EDD(date:  TFMDateTim e);
  110     public
  111       EDD: i nteger;
  112       functi on Execute : Boolean;
  113       functi on GetData (aList: TS tringList) : Boolean;
  114     end;
  115  
  116   function N ewPLUpdate Form(aDFN:  string):  TfrmWVPreg LacStatusU pdate;
  117  
  118   implementa tion
  119  
  120   {$R *.dfm}
  121  
  122  
  123   const
  124     { Names  for Name=V alue pairs  }
  125     SUB_ABLE _TO_CONCEI VE = 'ABLE  TO CONCEI VE';
  126     SUB_LACT ATION_STAT US = 'LACT ATION STAT US';
  127     SUB_LAST _MENSTRUAL _PERIOD =  'LAST MENS TRUAL PERI OD DATE';
  128     SUB_EDD  = 'EXPECTE D DUE DATE ';
  129     SUB_MEDI CAL_REASON  = 'MEDICA L REASON';
  130     SUB_PATI ENT = 'PAT IENT';
  131     SUB_PREG NANCY_STAT US = 'PREG NANCY STAT US';
  132  
  133  
  134   function N ewPLUpdate Form(aDFN:  string):  TfrmWVPreg LacStatusU pdate;
  135   begin
  136     Result : = TfrmWVPr egLacStatu sUpdate.Cr eate(Appli cation.Mai nForm);
  137  
  138     with Res ult do
  139       begin
  140         Load ed;
  141         fDFN  := aDFN;
  142         pnlL actationSt atus.Visib le := True ;
  143       end;
  144   end;
  145  
  146   function T frmWVPregL acStatusUp date.calcD ates(origi nalValue,
  147     newValue : TFMDateT ime; updat e, patient : string):  TFMDateTi me;
  148   var
  149   itemID, te mp: string ;
  150   begin
  151     if updat e = 'EDD'  then
  152       begin
  153         if E DD < 1 the n
  154           be gin
  155               Result :=  -1;
  156               Exit;
  157           en d;
  158         item ID := IntT oStr(EDD);
  159       end;
  160     temp :=  getLinkPro mptValue(F loatToStr( newValue),  itemID, F loatToStr( originalVa lue), pati ent);
  161     Result : = StrToFlo atDef(temp , -1);
  162   end;
  163  
  164   procedure  TfrmWVPreg LacStatusU pdate.Chec kOkToSave( Sender: TO bject);
  165   begin
  166     if robnA bleToConce iveYes.Che cked then
  167       begin
  168         if r obnPregnan tYes.Check ed then
  169           bt nSave.Enab led := (dt eLMPD.FMDa teTime > 0 ) and (dte EDD.FMDate Time > 0)
  170          els e btnSave. Enabled :=  robnPregn antNo.Chec ked or rob nPregnantU nsure.Chec ked;
  171       end
  172     else if  robnAbleTo ConceiveNo .Checked t hen
  173       btnSav e.Enabled  := ckbxHys terectomy. Checked or  ckbxMenop ause.Check ed or ckbx Permanent. Checked
  174       or (ed tOther.Tex t <> '')
  175     else if  robnLactat ingYes.Che cked or ro bnLactatin gNo.Checke d then
  176       btnSav e.Enabled  := True
  177     else
  178       btnSav e.Enabled  := False;
  179   end;
  180  
  181   procedure  TfrmWVPreg LacStatusU pdate.dteE DDChange(S ender: TOb ject);
  182   begin
  183     CheckOkT oSave(Send er);
  184   end;
  185  
  186   procedure  TfrmWVPreg LacStatusU pdate.dteL MPDChange( Sender: TO bject);
  187   begin
  188   //  CheckO kToSave(Se nder);
  189   end;
  190  
  191   procedure  TfrmWVPreg LacStatusU pdate.dteL MPDDateDia logClosed( Sender: TO bject);
  192   begin
  193     updateED D(dteLMPD. FMDateTime );
  194     CheckOkT oSave(Send er);
  195   end;
  196  
  197   procedure  TfrmWVPreg LacStatusU pdate.dteL MPDExit(Se nder: TObj ect);
  198   begin
  199     updateED D(dteLMPD. FMDateTime );
  200   end;
  201  
  202   procedure  TfrmWVPreg LacStatusU pdate.dteL MPDMouseLe ave(Sender : TObject) ;
  203   begin
  204     updateED D(dteLMPD. FMDateTime );
  205     CheckOkT oSave(Send er);
  206   end;
  207  
  208   procedure  TfrmWVPreg LacStatusU pdate.robn LactatingY esNoClick( Sender: TO bject);
  209   begin
  210     CheckOkT oSave(Send er);
  211   end;
  212  
  213  
  214   procedure  TfrmWVPreg LacStatusU pdate.scro llBoxResiz e(Sender:  TObject);
  215   begin
  216     inherite d;
  217     ScrollBo x.OnResize  := nil;
  218     //At lea st minimum
  219      if (pnl Form.Width  < MinForm Width) or  (pnlForm.H eight < Mi nFormHeigh t) then
  220      pnlForm .Align :=  alNone;
  221      pnlForm .AutoSize  := false;
  222      if (pnl Form.Width  < MinForm Width) the n pnlForm. Width := M inFormWidt h;
  223      if pnlF orm.Height  < MinForm Height the n pnlForm. Height :=  MinFormHei ght;
  224  
  225  
  226     if (Scro llBox.Widt h >= MinFo rmWidth) t hen
  227     begin
  228      if (Scr ollBox.Hei ght >= (Mi nFormHeigh t)) then
  229      begin
  230          pnl Form.Align  := alClie nt;
  231      end els e begin
  232        pnlFo rm.Align : = alTop;
  233        pnlFo rm.AutoSiz e := true;
  234      end;
  235     end else  begin
  236      if (Scr ollBox.Hei ght >= (Mi nFormHeigh t)) then
  237      begin
  238       pnlFor m.Align :=  alNone;
  239       pnlFor m.Top := 0 ;
  240       pnlFor m.Left :=  0;
  241       pnlFor m.AutoSize  := false;
  242       pnlFor m.Width :=  MinFormWi dth;
  243       pnlFor m.height : =  ScrollB ox.Height;
  244      end els e begin
  245       pnlFor m.Align :=  alNone;
  246       pnlFor m.Top := 0 ;
  247       pnlFor m.Left :=  0;
  248       pnlFor m.AutoSize  := true;
  249      end;
  250     end;
  251     ScrollBo x.OnResize  := Scroll BoxResize;
  252   end;
  253  
  254   procedure  TfrmWVPreg LacStatusU pdate.setL abelTabSto ps(value:  boolean);
  255   begin
  256     stxtAble ToConceive .TabStop : = value;
  257     ststxtOt her.TabSto p := value ;
  258     stxtCurr entlyPregn ant.TabSto p := value ;
  259     stxtLast MenstrualP eriod.TabS top := val ue;
  260     stxtEDDM ethod.TabS top := val ue;
  261     stxtLact ationStatu s.TabStop  := value;
  262   end;
  263  
  264   procedure  TfrmWVPreg LacStatusU pdate.SetS crollBarHe ight(FontS ize: Integ er);
  265   begin
  266     MinFormH eight := ( self.grdPr egStatus.H eight + se lf.grdConc eive.Heigh t + self.g rdConceive .Height);
  267     case Fon tSize of
  268       8: Min FormWidth  := self.ck bxPermanen t.Left + s elf.ckbxPe rmanent.Wi dth + 5;
  269       10: Mi nFormWidth  := self.c kbxPermane nt.Left +  self.ckbxP ermanent.W idth + 5;
  270       12: Mi nFormWidth  := self.c kbxPermane nt.Left +  self.ckbxP ermanent.W idth + 30;
  271       14: Mi nFormWidth  := 800;
  272       18: Mi nFormWidth  := 1000;
  273     end;
  274  
  275   end;
  276  
  277   procedure  TfrmWVPreg LacStatusU pdate.upda teEDD(date : TFMDateT ime);
  278   var
  279   aDate: TFM DateTime;
  280   begin
  281     if dteED D.FMDateTi me > 0 the n exit;
  282     aDate :=  calcDates (0, date,  'EDD', fDF N);
  283     if aDate  > 0 then  dteEDD.FMD ateTime :=  aDate;
  284   end;
  285  
  286   procedure  TfrmWVPreg LacStatusU pdate.Able ToConceive YesNo(Send er: TObjec t);
  287   begin
  288     if robnA bleToConce iveYes.Che cked then
  289       begin
  290         ckbx Menopause. Checked :=  False;
  291         ckbx Menopause. Enabled :=  False;
  292         ckbx Hysterecto my.Checked  := False;
  293         ckbx Hysterecto my.Enabled  := False;
  294         ckbx Permanent. Checked :=  False;
  295         ckbx Permanent. Enabled :=  False;
  296         stst xtOther.En abled := f alse;
  297         edto ther.Enabl ed := fals e;
  298  
  299         robn PregnantYe s.Enabled  := True;
  300         robn PregnantYe s.TabStop  := True;
  301         robn PregnantNo .Enabled : = True;
  302         robn PregnantUn sure.Enabl ed := True ;
  303  
  304         stxt LastMenstr ualPeriod. Enabled :=  False;
  305         dteL MPD.Enable d := false ;
  306         dteE DD.Enabled  := false;
  307         stxt EDDMethod. Enabled :=  False;
  308       end
  309     else if  robnAbleTo ConceiveNo .Checked t hen
  310       begin
  311         ckbx Menopause. Enabled :=  True;
  312         ckbx Hysterecto my.Enabled  := True;
  313         ckbx Permanent. Enabled :=  True;
  314         stst xtOther.En abled := t rue;
  315         edtO ther.Enabl ed := true ;
  316  
  317         robn PregnantYe s.Enabled  := False;
  318         robn PregnantYe s.Checked  := False;
  319         robn PregnantNo .Enabled : = False;
  320         robn PregnantNo .Checked : = False;
  321         robn PregnantUn sure.Enabl ed := Fals e;
  322         robn PregnantUn sure.Check ed := Fals e;
  323  
  324         stxt LastMenstr ualPeriod. Enabled :=  False;
  325         dteL MPD.Enable d := false ;
  326         dteE DD.Enabled  := false;
  327         stxt EDDMethod. Enabled :=  False;
  328       end
  329     else
  330       begin
  331         ckbx Menopause. Checked :=  False;
  332         ckbx Menopause. Enabled :=  False;
  333         ckbx Hysterecto my.Checked  := False;
  334         ckbx Hysterecto my.Enabled  := False;
  335         ckbx Permanent. Checked :=  False;
  336         ckbx Permanent. Enabled :=  False;
  337         stst xtOther.En abled := f alse;
  338         edtO ther.Enabl ed := fals e;
  339  
  340         robn PregnantYe s.Enabled  := False;
  341         robn PregnantYe s.Checked  := False;
  342         robn PregnantNo .Enabled : = False;
  343         robn PregnantNo .Checked : = False;
  344         robn PregnantUn sure.Enabl ed := Fals e;
  345         robn PregnantUn sure.Check ed := Fals e;
  346  
  347         stxt LastMenstr ualPeriod. Enabled :=  False;
  348         dteL MPD.Enable d := false ;
  349         dteE DD.Enabled  := false;
  350         stxt EDDMethod. Enabled :=  False;
  351       end;
  352  
  353     CheckOkT oSave(Send er);
  354   end;
  355  
  356   procedure  TfrmWVPreg LacStatusU pdate.Preg nantYesNoU nsure(Send er: TObjec t);
  357   begin
  358       if rob nPregnantY es.Checked  then
  359         begi n
  360           st xtLastMens trualPerio d.Enabled  := True;
  361           dt eLMPD.Enab led := tru e;
  362           dt eEDD.Enabl ed := true ;
  363           st xtEDDMetho d.Enabled  := True;
  364   //         if ScreenR eaderActiv e then
  365   //         begin
  366   //           stxtEDDM ethod.TabS top := Tru e;
  367   //           stxtEDDM ethod.TabO rder := 4;
  368   //         end;
  369         end
  370       else
  371         begi n
  372           st xtLastMens trualPerio d.Enabled  := False;
  373           dt eLMPD.FMDa teTime :=  0;
  374           dt eEDD.FMDat eTime := 0 ;
  375           dt eLMPD.Text  := '';
  376           dt eEDD.Text  := '';
  377           dt eLMPD.Enab led := fal se;
  378           dt eEDD.Enabl ed := true ;
  379           st xtEDDMetho d.Enabled  := False;
  380         end;
  381  
  382     CheckOkT oSave(Send er);
  383   end;
  384  
  385   function T frmWVPregL acStatusUp date.Execu te: Boolea n;
  386   begin
  387     Result : = (ShowMod al = mrOk) ;
  388   end;
  389  
  390   procedure  TfrmWVPreg LacStatusU pdate.Form Close(Send er: TObjec t;
  391     var Acti on: TClose Action);
  392   begin
  393     inherite d;
  394     try
  395       SaveUs erBounds(S elf);
  396       Action  := caFree ;
  397     finally
  398       Action  := caFree ;
  399     end;
  400   end;
  401  
  402   procedure  TfrmWVPreg LacStatusU pdate.Form Create(Sen der: TObje ct);
  403   var
  404     height:  integer;
  405   begin
  406     inherite d;
  407     SetFormP osition(Se lf);
  408     ResizeFo rmToFont(s elf);
  409     setLabel TabStops(S creenReade rActive);
  410     height : = TextHeig htByFont(s txtAbleToC onceive.Fo nt.Handle,  stxtAbleT oConceive. Caption);
  411     pnlConei veLabel.He ight := he ight + 5;
  412     pnlPregS tatusLabel .Height :=  height +  5;
  413     pnlLacta tionLabel. Height :=  height + 5 ;
  414     SetScrol lBarHeight (MainFontS ize);
  415   end;
  416  
  417   function T frmWVPregL acStatusUp date.GetDa ta(aList:  TStringLis t): Boolea n;
  418   var
  419     aStr: st ring;
  420  
  421     procedur e AddReaso n(var aStr : string;  aValue: st ring);
  422     begin
  423       if aSt r <> '' th en
  424         begi n
  425           //  Remove an y previous  'and's
  426           if  Pos(' and  ', aStr)  > 0 then
  427              aStr := St ringReplac e(aStr, '  and ', ',  ', [rfRepl aceAll]);
  428           //  Append on  this valu e with a g ramaticall y correct  'and'
  429           aS tr := Form at('%s and  %s', [aSt r, aValue] );
  430           //  Set capit ialization  to gramat ically cor rect first  char only
  431           aS tr := Uppe rCase(Copy (aStr, 1,  1)) + Lowe rCase(Copy (aStr, 2,  Length(aSt r)));
  432         end
  433       else
  434         aStr  := aValue ;
  435     end;
  436  
  437   begin
  438     aList.Cl ear;
  439     try
  440       aList. Values[SUB _PATIENT]  := fDFN;
  441  
  442       if rob nAbleToCon ceiveYes.C hecked the n
  443         begi n
  444           aL ist.Values [SUB_ABLE_ TO_CONCEIV E] := 'Yes ';
  445  
  446           if  robnPregn antYes.Che cked then
  447              begin
  448                aList.Va lues[SUB_P REGNANCY_S TATUS] :=  'Yes';
  449                if dteLM PD.FMDateT ime > 0 th en aList.V alues[SUB_ LAST_MENST RUAL_PERIO D] := Floa tToStr(dte LMPD.FMDat eTime);
  450                if dteED D.FMDateTi me > 0 the n aList.Va lues[SUB_E DD] := Flo atToStr(dt eEDD.FMDat eTime);
  451              end
  452           el se if robn PregnantNo .Checked t hen
  453              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'N o'
  454           el se if robn PregnantUn sure.Check ed then
  455              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'U nsure'
  456           el se
  457              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'U nknown';
  458         end
  459       else i f robnAble ToConceive No.Checked  then
  460         begi n
  461           aL ist.Values [SUB_ABLE_ TO_CONCEIV E] := 'No' ;
  462           aS tr := '';
  463  
  464           if  ckbxHyste rectomy.Ch ecked then
  465              AddReason( aStr, ckbx Hysterecto my.Caption );
  466  
  467           if  ckbxMenop ause.Check ed then
  468              AddReason( aStr, ckbx Menopause. Caption);
  469  
  470           if  ckbxPerma nent.Check ed then
  471              AddReason( aStr, ckbx Permanent. Caption);
  472  
  473           if  edtOther. Text <> ''  then
  474              AddReason( aStr, edtO ther.Text) ;
  475  
  476           aL ist.Values [SUB_MEDIC AL_REASON]  := aStr;
  477         end;
  478  
  479       if rob nLactating Yes.Checke d then
  480         aLis t.Values[S UB_LACTATI ON_STATUS]  := 'Yes'
  481       else i f robnLact atingNo.Ch ecked then
  482         aLis t.Values[S UB_LACTATI ON_STATUS]  := 'No';
  483  
  484       Result  := True;
  485     except
  486       on e:  Exception  do
  487         begi n
  488           aL ist.Clear;
  489           aL ist.Add('- 1^' + e.Me ssage);
  490           Re sult := Fa lse;
  491         end;
  492     end;
  493   end;
  494  
  495   end.