42. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 8/3/2017 2:38:22 PM 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.

42.1 Files compared

# Location File Last Modified
1 V32.zip\V32\OR_30_405V28_SRC\Womens Health fWVPregLacStatusUpdate.pas Wed May 10 17:35:58 2017 UTC
2 V32.zip\V32\OR_30_405V28_SRC\Womens Health fWVPregLacStatusUpdate.pas Thu Aug 3 16:09:52 2017 UTC

42.2 Comparison summary

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

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

42.4 Active regular expressions

No regular expressions were active.

42.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  
  40   type
  41     TfrmWVPr egLacStatu sUpdate =  class(TFor m)
  42       btnCan cel: TButt on;
  43       btnSav e: TButton ;
  44       pnlOpt ions: TPan el;
  45       pnlPre gnancyStat us: TPanel ;
  46       bvlPre gnancyStat us: TBevel ;
  47       ckbxAb leToConcei veYes: TCh eckBox;
  48       ckbxAb leToConcei veNo: TChe ckBox;
  49       ckbxMe nopause: T CheckBox;
  50       ckbxHy sterectomy : TCheckBo x;
  51       stxtAb leToConcei ve: TStati cText;
  52       stxtCu rrentlyPre gnant: TSt aticText;
  53       ckbxPr egnantYes:  TCheckBox ;
  54       ckbxPr egnantNo:  TCheckBox;
  55       ckbxPr egnantUnsu re: TCheck Box;
  56       dtpLas tMenstrual Period: TD ateTimePic ker;
  57       stxtLa stMenstrua lPeriod: T StaticText ;
  58       pnlLac tationStat us: TPanel ;
  59       bvlLac tationStat us: TBevel ;
  60       ckbxLa ctatingYes : TCheckBo x;
  61       ckbxLa ctatingNo:  TCheckBox ;
  62       Bevel1 : TBevel;
  63       stxtLa ctationSta tus: TStat icText;
  64       ckbxPe rmanent: T CheckBox;
  65       pnlEdd Method: TP anel;
  66       lblEDD Method: TL abel;
  67  
  68       proced ure AbleTo ConceiveYe sNo(Sender : TObject) ;
  69       proced ure Pregna ntYesNoUns ure(Sender : TObject) ;
  70       proced ure dtpLas tMenstrual PeriodChan ge(Sender:  TObject);
  71       proced ure CheckO kToSave(Se nder: TObj ect);
  72       proced ure ckbxLa ctatingYes NoClick(Se nder: TObj ect);
  73     private
  74       { Priv ate declar ations }
  75       fDFN:  string;
  76     public
  77       functi on Execute : Boolean;
  78       functi on GetData (aList: TS tringList) : Boolean;
  79     end;
  80  
  81   function N ewPLUpdate Form(aDFN:  string):  TfrmWVPreg LacStatusU pdate;
  82  
  83   implementa tion
  84  
  85   {$R *.dfm}
  86  
  87  
  88   const
  89     { Names  for Name=V alue pairs  }
  90     SUB_ABLE _TO_CONCEI VE = 'ABLE  TO CONCEI VE';
  91     SUB_LACT ATION_STAT US = 'LACT ATION STAT US';
  92     SUB_LAST _MENSTRUAL _PERIOD =  'LAST MENS TRUAL PERI OD DATE';
  93     SUB_MEDI CAL_REASON  = 'MEDICA L REASON';
  94     SUB_PATI ENT = 'PAT IENT';
  95     SUB_PREG NANCY_STAT US = 'PREG NANCY STAT US';
  96  
  97   function N ewPLUpdate Form(aDFN:  string):  TfrmWVPreg LacStatusU pdate;
  98   var
  99     i: integ er;
  100   begin
  101     Result : = TfrmWVPr egLacStatu sUpdate.Cr eate(Appli cation.Mai nForm);
  102  
  103     with Res ult do
  104       begin
  105         Load ed;
  106         Posi tion := po MainFormCe nter;
  107         fDFN  := aDFN;
  108         pnlP regnancySt atus.Visib le := True ;
  109         pnlL actationSt atus.Visib le := True ;
  110  
  111         i :=  pnlOption s.Height;
  112  
  113         if p nlLactatio nStatus.Vi sible then
  114           i  := i + pnl LactationS tatus.Heig ht + pnlLa ctationSta tus.Margin s.Top + pn lLactation Status.Mar gins.Botto m;
  115  
  116         if p nlPregnanc yStatus.Vi sible then
  117           i  := i + pnl PregnancyS tatus.Heig ht + pnlPr egnancySta tus.Margin s.Top + pn lPregnancy Status.Mar gins.Botto m;
  118  
  119         Clie ntHeight : = i;
  120       end;
  121   end;
  122  
  123   procedure  TfrmWVPreg LacStatusU pdate.Chec kOkToSave( Sender: TO bject);
  124   begin
  125     if ckbxA bleToConce iveYes.Che cked then
  126       btnSav e.Enabled  := ckbxPre gnantYes.C hecked or  ckbxPregna ntNo.Check ed or ckbx PregnantUn sure.Check ed
  127     else if  ckbxAbleTo ConceiveNo .Checked t hen
  128       btnSav e.Enabled  := ckbxHys terectomy. Checked or  ckbxMenop ause.Check ed or ckbx Permanent. Checked
  129     else if  ckbxLactat ingYes.Che cked or ck bxLactatin gNo.Checke d then
  130       btnSav e.Enabled  := True
  131     else
  132       btnSav e.Enabled  := False;
  133   end;
  134  
  135   procedure  TfrmWVPreg LacStatusU pdate.ckbx LactatingY esNoClick( Sender: TO bject);
  136   begin
  137     if Sende r = ckbxLa ctatingYes  then
  138       if ckb xLactating Yes.Checke d then
  139         ckbx LactatingN o.Checked  := False;
  140  
  141     if Sende r = ckbxLa ctatingNo  then
  142       if ckb xLactating No.Checked  then
  143         ckbx LactatingY es.Checked  := False;
  144  
  145     CheckOkT oSave(Send er);
  146   end;
  147  
  148   procedure  TfrmWVPreg LacStatusU pdate.dtpL astMenstru alPeriodCh ange(Sende r: TObject );
  149   begin
  150     dtpLastM enstrualPe riod.Forma t := '';
  151   end;
  152  
  153   procedure  TfrmWVPreg LacStatusU pdate.Able ToConceive YesNo(Send er: TObjec t);
  154   begin
  155     if Sende r = ckbxAb leToConcei veYes then
  156       if ckb xAbleToCon ceiveYes.C hecked the n
  157         ckbx AbleToConc eiveNo.Che cked := Fa lse;
  158  
  159     if Sende r = ckbxAb leToConcei veNo then
  160       if ckb xAbleToCon ceiveNo.Ch ecked then
  161         ckbx AbleToConc eiveYes.Ch ecked := F alse;
  162  
  163     if ckbxA bleToConce iveYes.Che cked then
  164       begin
  165         ckbx Menopause. Checked :=  False;
  166         ckbx Menopause. Enabled :=  False;
  167         ckbx Hysterecto my.Checked  := False;
  168         ckbx Hysterecto my.Enabled  := False;
  169         ckbx Permanent. Checked :=  False;
  170         ckbx Permanent. Enabled :=  False;
  171  
  172         ckbx PregnantYe s.Enabled  := True;
  173         ckbx PregnantNo .Enabled : = True;
  174         ckbx PregnantUn sure.Enabl ed := True ;
  175  
  176         stxt LastMenstr ualPeriod. Enabled :=  False;
  177         dtpL astMenstru alPeriod.E nabled :=  False;
  178         dtpL astMenstru alPeriod.F ormat := '  ';
  179         lblE DDMethod.E nabled :=  False;
  180       end
  181     else if  ckbxAbleTo ConceiveNo .Checked t hen
  182       begin
  183         ckbx Menopause. Enabled :=  True;
  184         ckbx Hysterecto my.Enabled  := True;
  185         ckbx Permanent. Enabled :=  True;
  186  
  187         ckbx PregnantYe s.Enabled  := False;
  188         ckbx PregnantYe s.Checked  := False;
  189         ckbx PregnantNo .Enabled : = False;
  190         ckbx PregnantNo .Checked : = False;
  191         ckbx PregnantUn sure.Enabl ed := Fals e;
  192         ckbx PregnantUn sure.Check ed := Fals e;
  193  
  194         stxt LastMenstr ualPeriod. Enabled :=  False;
  195         dtpL astMenstru alPeriod.E nabled :=  False;
  196         dtpL astMenstru alPeriod.F ormat := '  ';
  197         lblE DDMethod.E nabled :=  False;
  198       end
  199     else
  200       begin
  201         ckbx Menopause. Checked :=  False;
  202         ckbx Menopause. Enabled :=  False;
  203         ckbx Hysterecto my.Checked  := False;
  204         ckbx Hysterecto my.Enabled  := False;
  205         ckbx Permanent. Checked :=  False;
  206         ckbx Permanent. Enabled :=  False;
  207  
  208         ckbx PregnantYe s.Enabled  := False;
  209         ckbx PregnantYe s.Checked  := False;
  210         ckbx PregnantNo .Enabled : = False;
  211         ckbx PregnantNo .Checked : = False;
  212         ckbx PregnantUn sure.Enabl ed := Fals e;
  213         ckbx PregnantUn sure.Check ed := Fals e;
  214  
  215         stxt LastMenstr ualPeriod. Enabled :=  False;
  216         dtpL astMenstru alPeriod.E nabled :=  False;
  217         dtpL astMenstru alPeriod.F ormat := '  ';
  218         lblE DDMethod.E nabled :=  False;
  219       end;
  220  
  221     CheckOkT oSave(Send er);
  222   end;
  223  
  224   procedure  TfrmWVPreg LacStatusU pdate.Preg nantYesNoU nsure(Send er: TObjec t);
  225   begin
  226     if Sende r = ckbxPr egnantYes  then
  227       if ckb xPregnantY es.Checked  then
  228         begi n
  229           ck bxPregnant No.Checked  := False;
  230           ck bxPregnant Unsure.Che cked := Fa lse;
  231           st xtLastMens trualPerio d.Enabled  := True;
  232           dt pLastMenst rualPeriod .Enabled : = True;
  233           dt pLastMenst rualPeriod .DateTime  := Now;
  234           dt pLastMenst rualPeriod .Format :=  ' ';
  235           lb lEDDMethod .Enabled : = True;
  236         end
  237       else
  238         begi n
  239           st xtLastMens trualPerio d.Enabled  := False;
  240           dt pLastMenst rualPeriod .Enabled : = False;
  241           dt pLastMenst rualPeriod .Format :=  ' ';
  242           lb lEDDMethod .Enabled : = False;
  243         end;
  244  
  245     if Sende r = ckbxPr egnantNo t hen
  246       if ckb xPregnantN o.Checked  then
  247         begi n
  248           ck bxPregnant Yes.Checke d := False ;
  249           ck bxPregnant Unsure.Che cked := Fa lse;
  250         end;
  251  
  252     if Sende r = ckbxPr egnantUnsu re then
  253       if ckb xPregnantU nsure.Chec ked then
  254         begi n
  255           ck bxPregnant Yes.Checke d := False ;
  256           ck bxPregnant No.Checked  := False;
  257         end;
  258  
  259     CheckOkT oSave(Send er);
  260   end;
  261  
  262   function T frmWVPregL acStatusUp date.Execu te: Boolea n;
  263   begin
  264     Result : = (ShowMod al = mrOk) ;
  265   end;
  266  
  267   function T frmWVPregL acStatusUp date.GetDa ta(aList:  TStringLis t): Boolea n;
  268   var
  269     aDateTim e: TDateTi me;
  270     y, m, d:  Word;
  271     aStr: st ring;
  272  
  273     procedur e AddReaso n(var aStr : string;  aValue: st ring);
  274     begin
  275       if aSt r <> '' th en
  276         begi n
  277           //  Remove an y previous  'and's
  278           if  Pos(' and  ', aStr)  > 0 then
  279              aStr := St ringReplac e(aStr, '  and ', ',  ', [rfRepl aceAll]);
  280           //  Append on  this valu e with a g ramaticall y correct  'and'
  281           aS tr := Form at('%s and  %s', [aSt r, aValue] );
  282           //  Set capit ialization  to gramat ically cor rect first  char only
  283           aS tr := Uppe rCase(Copy (aStr, 1,  1)) + Lowe rCase(Copy (aStr, 2,  Length(aSt r)));
  284         end
  285       else
  286         aStr  := aValue ;
  287     end;
  288  
  289   begin
  290     aList.Cl ear;
  291     try
  292       aList. Values[SUB _PATIENT]  := fDFN;
  293  
  294       if ckb xAbleToCon ceiveYes.C hecked the n
  295         begi n
  296           aL ist.Values [SUB_ABLE_ TO_CONCEIV E] := 'Yes ';
  297  
  298           if  ckbxPregn antYes.Che cked then
  299              begin
  300                aList.Va lues[SUB_P REGNANCY_S TATUS] :=  'Yes';
  301  
  302                if dtpLa stMenstrua lPeriod.Fo rmat = ''  then
  303                  begin
  304                    aDat eTime := d tpLastMens trualPerio d.DateTime ;
  305                    Deco deDate(aDa teTime, y,  m, d);
  306                    aLis t.Values[S UB_LAST_ME NSTRUAL_PE RIOD] := I ntToStr((( y - 1700)  * 10000) +  (m * 100)  + d);
  307                  end
  308              end
  309           el se if ckbx PregnantNo .Checked t hen
  310              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'N o'
  311           el se if ckbx PregnantUn sure.Check ed then
  312              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'U nsure'
  313           el se
  314              aList.Valu es[SUB_PRE GNANCY_STA TUS] := 'U nknown';
  315         end
  316       else i f ckbxAble ToConceive No.Checked  then
  317         begi n
  318           aL ist.Values [SUB_ABLE_ TO_CONCEIV E] := 'No' ;
  319           aS tr := '';
  320  
  321           if  ckbxHyste rectomy.Ch ecked then
  322              AddReason( aStr, ckbx Hysterecto my.Caption );
  323  
  324           if  ckbxMenop ause.Check ed then
  325              AddReason( aStr, ckbx Menopause. Caption);
  326  
  327           if  ckbxPerma nent.Check ed then
  328              AddReason( aStr, ckbx Permanent. Caption);
  329  
  330           aL ist.Values [SUB_MEDIC AL_REASON]  := aStr;
  331         end;
  332  
  333       if ckb xLactating Yes.Checke d then
  334         aLis t.Values[S UB_LACTATI ON_STATUS]  := 'Yes'
  335       else i f ckbxLact atingNo.Ch ecked then
  336         aLis t.Values[S UB_LACTATI ON_STATUS]  := 'No';
  337  
  338       Result  := True;
  339     except
  340       on e:  Exception  do
  341         begi n
  342           aL ist.Clear;
  343           aL ist.Add('- 1^' + e.Me ssage);
  344           Re sult := Fa lse;
  345         end;
  346     end;
  347   end;
  348  
  349   end.