Produced by Araxis Merge on 1/9/2019 7:03:18 AM Central Standard 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | OR_30_405V55_SRC.zip\OR_30_405V55_SRC\Cover Sheet | mCoverSheetDisplayPanel_CPRS_WH.pas | Wed Sep 26 18:05:24 2018 UTC |
| 2 | OR_30_405V55_SRC.zip\OR_30_405V55_SRC\Cover Sheet | mCoverSheetDisplayPanel_CPRS_WH.pas | Tue Jan 8 17:51:36 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 608 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | unit mCove rSheetDisp layPanel_C PRS_WH; | |
| 2 | { | |
| 3 | ======== ========== ========== ========== ========== ========== ========== ========== == | |
| 4 | * | |
| 5 | * Applicatio n: CPRS - CoverShee t | |
| 6 | * Developer: PII | |
| 7 | * Site: Salt L ake City I SC | |
| 8 | * Date: 2015-1 2-04 | |
| 9 | * | |
| 10 | * Descriptio n: Inheri ted from T fraCoverSh eetDisplay Panel_CPRS . This | |
| 11 | * displa y panel ad ds the twe eks for pr operly dis playing | |
| 12 | * Womens Health da ta in the CPRS Cover Sheet. | |
| 13 | * | |
| 14 | * Notes: | |
| 15 | * | |
| 16 | ======== ========== ========== ========== ========== ========== ========== ========== == | |
| 17 | } | |
| 18 | ||
| 19 | interface | |
| 20 | ||
| 21 | uses | |
| 22 | Winapi.W indows, | |
| 23 | Winapi.M essages, | |
| 24 | System.S ysUtils, | |
| 25 | System.V ariants, | |
| 26 | System.C lasses, | |
| 27 | System.U ITypes, | |
| 28 | System.S trUtils, | |
| 29 | System.T ypes, | |
| 30 | System.I mageList, | |
| 31 | Vcl.Grap hics, | |
| 32 | Vcl.Cont rols, | |
| 33 | Vcl.Form s, | |
| 34 | Vcl.Dial ogs, | |
| 35 | Vcl.Menu s, | |
| 36 | Vcl.ImgL ist, | |
| 37 | Vcl.ComC trls, | |
| 38 | Vcl.StdC trls, | |
| 39 | Vcl.Butt ons, | |
| 40 | Vcl.ExtC trls, | |
| 41 | mCoverSh eetDisplay Panel_CPRS , | |
| 42 | iCoverSh eetIntf, | |
| 43 | oDelimit edString; | |
| 44 | ||
| 45 | type | |
| 46 | TfraCove rSheetDisp layPanel_C PRS_WH = c lass(TfraC overSheetD isplayPane l_CPRS) | |
| 47 | private | |
| 48 | fValid Data: bool ean; | |
| 49 | ||
| 50 | fSepar ator: TMen uItem; | |
| 51 | fUpdat eData: TMe nuItem; | |
| 52 | fMarkA sEnteredIn Error: TMe nuItem; | |
| 53 | fWebSi tesRoot: T MenuItem; | |
| 54 | protecte d | |
| 55 | { Inhe rited even ts - TfraG ridPanel } | |
| 56 | proced ure OnPopu pMenu(Send er: TObjec t); overri de; | |
| 57 | proced ure OnPopu pMenuFree( Sender: TO bject); ov erride; | |
| 58 | proced ure OnPopu pMenuInit( Sender: TO bject); ov erride; | |
| 59 | ||
| 60 | { Inhe rited even ts - TfraC overSheetD isplayPane l_CPRS } | |
| 61 | proced ure OnAddI tems(aList : TStrings ); overrid e; | |
| 62 | proced ure OnGetD etail(aRec : TDelimit edString; aResult: T Strings); override; | |
| 63 | proced ure OnBegi nUpdate(Se nder: TObj ect); over ride; | |
| 64 | proced ure OnEndU pdate(Send er: TObjec t); overri de; | |
| 65 | ||
| 66 | { Intr oduced eve nts } | |
| 67 | proced ure OnEnte redInError (Sender: T Object); | |
| 68 | proced ure OnUpda teData(Sen der: TObje ct); | |
| 69 | proced ure OnSele ctWebSite( Sender: TO bject); | |
| 70 | public | |
| 71 | constr uctor Crea te(aOwner: TComponen t); overri de; | |
| 72 | destru ctor Destr oy; overri de; | |
| 73 | end; | |
| 74 | ||
| 75 | var | |
| 76 | fraCover SheetDispl ayPanel_CP RS_WH: Tfr aCoverShee tDisplayPa nel_CPRS_W H; | |
| 77 | serverPa ram1: stri ng; | |
| 78 | ||
| 79 | implementa tion | |
| 80 | ||
| 81 | uses | |
| 82 | uCore, | |
| 83 | iWVInter face, | |
| 84 | ORNet, | |
| 85 | VAUtils; | |
| 86 | ||
| 87 | {$R *.dfm} | |
| 88 | ||
| 89 | { TfraCove rSheetDisp layPanel_C PRS_WH } | |
| 90 | ||
| 91 | constructo r TfraCove rSheetDisp layPanel_C PRS_WH.Cre ate(aOwner : TCompone nt); | |
| 92 | begin | |
| 93 | inherite d; | |
| 94 | fValidDa ta := Fals e; | |
| 95 | end; | |
| 96 | ||
| 97 | destructor TfraCover SheetDispl ayPanel_CP RS_WH.Dest roy; | |
| 98 | begin | |
| 99 | inherite d; | |
| 100 | end; | |
| 101 | ||
| 102 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnAdd Items(aLis t: TString s); | |
| 103 | var | |
| 104 | aRec: TD elimitedSt ring; | |
| 105 | aStr: st ring; | |
| 106 | begin | |
| 107 | { This i s special because I have to de lete [0] b efore load ing } | |
| 108 | if aList .Count > 0 then | |
| 109 | begin | |
| 110 | fVal idData := StrToIntDe f(Copy(aLi st[0], 1, 1), 0) > 0 ; | |
| 111 | aLis t.Delete(0 ); | |
| 112 | end; | |
| 113 | ||
| 114 | { Now lo ad piece 1 and 2 as the Captio n } | |
| 115 | if aList .Count = 0 then | |
| 116 | with l vData.Item s.Add do | |
| 117 | begi n | |
| 118 | Ca ption := ' Not Applic able.'; | |
| 119 | Da ta := TDel imitedStri ng.Create( '^Not Appl icable'); | |
| 120 | end | |
| 121 | else | |
| 122 | for aS tr in aLis t do | |
| 123 | with lvData.It ems.Add do | |
| 124 | be gin | |
| 125 | aRec := TD elimitedSt ring.Creat e(aStr); | |
| 126 | Caption := Format('% s %s', [aR ec.GetPiec e(2), aRec .GetPiece( 3)]); | |
| 127 | Data := aR ec; | |
| 128 | en d; | |
| 129 | end; | |
| 130 | ||
| 131 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnGet Detail(aRe c: TDelimi tedString; aResult: TStrings); | |
| 132 | begin | |
| 133 | CallVist A(CPRSPara ms.DetailR PC, [aRec. GetPiece(1 ), ScreenR eaderActiv e], aResul t); | |
| 134 | end; | |
| 135 | ||
| 136 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnBeg inUpdate(S ender: TOb ject); | |
| 137 | var | |
| 138 | paramete r: TDelimi tedString; | |
| 139 | begin | |
| 140 | paramete r := TDeli mitedStrin g.Create(C PRSParams. Param1); | |
| 141 | if Sende r.ClassTyp e = TSpeed Button the n | |
| 142 | begin | |
| 143 | server Param1 := parameter. GetPiece(1 ); | |
| 144 | parame ter.SetPie ce(1,'1'); | |
| 145 | end; | |
| 146 | if Scree nReaderAct ive then | |
| 147 | begin | |
| 148 | parame ter.SetPie ce(2,'1'); | |
| 149 | end; | |
| 150 | if param eter.Count > 1 then | |
| 151 | begin | |
| 152 | CPRSP arams.Para m1 := para meter.GetD elimitedSt ring; | |
| 153 | end | |
| 154 | else | |
| 155 | begin | |
| 156 | CPRSPa rams.Param 1 := param eter.GetPi ece(1); | |
| 157 | end; | |
| 158 | ||
| 159 | inherite d; | |
| 160 | end; | |
| 161 | ||
| 162 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnEnd Update(Sen der: TObje ct); | |
| 163 | var | |
| 164 | paramete r: TDelimi tedString; | |
| 165 | begin | |
| 166 | paramete r := TDeli mitedStrin g.Create(C PRSParams. Param1); | |
| 167 | if Scree nReaderAct ive then | |
| 168 | begin | |
| 169 | parame ter.SetPie ce(2,''); | |
| 170 | end; | |
| 171 | if Sende r.ClassTyp e = TSpeed Button the n | |
| 172 | begin | |
| 173 | parame ter.SetPie ce(1, serv erParam1); | |
| 174 | end; | |
| 175 | if param eter.Count > 1 then | |
| 176 | begin | |
| 177 | CPRSP arams.Para m1 := para meter.GetD elimitedSt ring; | |
| 178 | end | |
| 179 | else | |
| 180 | begin | |
| 181 | CPRSPa rams.Param 1 := param eter.GetPi ece(1); | |
| 182 | end; | |
| 183 | ||
| 184 | ||
| 185 | inherite d; | |
| 186 | end; | |
| 187 | ||
| 188 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnPop upMenu(Sen der: TObje ct); | |
| 189 | var | |
| 190 | aRec: TD elimitedSt ring; | |
| 191 | begin | |
| 192 | inherite d; | |
| 193 | ||
| 194 | fUpdateD ata.Enable d := fVali dData; | |
| 195 | ||
| 196 | fMarkAsE nteredInEr ror.Enable d := False ; | |
| 197 | fMarkAsE nteredInEr ror.Captio n := 'Noth ing select ed to Mark as entere d in error .'; | |
| 198 | ||
| 199 | if lvDat a.Selected <> nil th en | |
| 200 | if lvD ata.Select ed.Data <> nil then | |
| 201 | begi n | |
| 202 | aR ec := TDel imitedStri ng(lvData. Selected.D ata); | |
| 203 | if StrToIntD ef(SplitSt ring(aRec[ 1], ';,^') [1], 0) > 0 then | |
| 204 | begin | |
| 205 | fMarkAsE nteredInEr ror.Enable d := True; | |
| 206 | fMarkAsE nteredInEr ror.Captio n := 'Mark ''' + lvD ata.Select ed.Caption + ''' as entered in error ... '; | |
| 207 | end; | |
| 208 | ||
| 209 | { -Changed f rom | |
| 210 | 4;1,61,^La ctating:^N ot Applica ble | |
| 211 | ^ Piece on e is alway s Type of data (4=pr egnancy, 5 = lactatin g);iens | |
| 212 | ^ Piece tw o is alway s Caption | |
| 213 | ^ Piece th ree is alw ays Value | |
| 214 | ||
| 215 | if primary ien of ie ns string (AKA DA) = zero do N OT enable EnteredInE rror menu! | |
| 216 | ||
| 217 | if aRec.Ge tPieceIsNo tNull(1) t hen | |
| 218 | begin | |
| 219 | fMarkAsEnt eredInErro r.Enabled := True; | |
| 220 | fMarkAsEnt eredInErro r.Caption := 'Mark ' '' + lvDat a.Selected .Caption + ''' as en tered in e rror ...'; | |
| 221 | end; | |
| 222 | } | |
| 223 | end; | |
| 224 | end; | |
| 225 | ||
| 226 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnPop upMenuFree (Sender: T Object); | |
| 227 | var | |
| 228 | aSubMenu : TMenuIte m; | |
| 229 | begin | |
| 230 | FreeAndN il(fSepara tor); | |
| 231 | FreeAndN il(fUpdate Data); | |
| 232 | FreeAndN il(fMarkAs EnteredInE rror); | |
| 233 | for aSub Menu in fW ebSitesRoo t do | |
| 234 | aSubMe nu.Free; | |
| 235 | fWebSite sRoot.Clea r; | |
| 236 | FreeAndN il(fWebSit esRoot); | |
| 237 | inherite d; | |
| 238 | end; | |
| 239 | ||
| 240 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnPop upMenuInit (Sender: T Object); | |
| 241 | var | |
| 242 | aSubMenu : TMenuIte m; | |
| 243 | i: integ er; | |
| 244 | begin | |
| 245 | inherite d; | |
| 246 | ||
| 247 | fSeparat or := NewL ine; | |
| 248 | fUpdateD ata := New Item('Add New Data . ..', 0, Fa lse, False , OnUpdate Data, 0, ' pmnWH_Upda teData'); | |
| 249 | fMarkAsE nteredInEr ror := New Item('Mark as Entere d In Error ...', 0, False, Fal se, OnEnte redInError , 0, 'pmnW H_EnteredI nError'); | |
| 250 | fWebSite sRoot := N ewSubMenu( WomensHeal th.WebSite ListName, 0, 'pmnWH_ WebSites', [], (Wome nsHealth.W ebSiteCoun t > 0)); | |
| 251 | ||
| 252 | for i := 0 to Wome nsHealth.W ebSiteCoun t - 1 do | |
| 253 | begin | |
| 254 | aSub Menu := Ne wItem(Wome nsHealth.W ebSite[i]. Name, 0, F alse, True , OnSelect WebSite, 0 , Format(' pmnWebSite _%d', [i]) ); | |
| 255 | aSub Menu.Tag : = i; | |
| 256 | fWeb SitesRoot. Add(aSubMe nu); | |
| 257 | end; | |
| 258 | ||
| 259 | pmn.Item s.Add(fSep arator); | |
| 260 | pmn.Item s.Add(fUpd ateData); | |
| 261 | pmn.Item s.Add(fMar kAsEntered InError); | |
| 262 | pmn.Item s.Add(fWeb SitesRoot) ; | |
| 263 | end; | |
| 264 | ||
| 265 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnSel ectWebSite (Sender: T Object); | |
| 266 | var | |
| 267 | aWebSite : IWVWebSi te; | |
| 268 | begin | |
| 269 | WomensHe alth.WebSi te[TMenuIt em(Sender) .Tag].Quer yInterface (IWVWebSit e, aWebSit e); | |
| 270 | if aWebS ite = nil then | |
| 271 | Messag eDlg('Unab le to get WebSite in formation' , mtError, [mbOk], 0 ) | |
| 272 | else if not Womens Health.Ope nExternalW ebsite(aWe bSite) the n | |
| 273 | Messag eDlg(Forma t('Error: ', [Womens Health.Get LastError] ), mtError , [mbOk], 0); | |
| 274 | end; | |
| 275 | ||
| 276 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnEnt eredInErro r(Sender: TObject); | |
| 277 | begin | |
| 278 | if lvDat a.Selected <> nil th en | |
| 279 | if lvD ata.Select ed.Data <> nil then | |
| 280 | with TDelimite dString(lv Data.Selec ted.Data) do | |
| 281 | if WomensHea lth.MarkAs EnteredInE rror(GetPi ece(1)) th en | |
| 282 | begin | |
| 283 | CoverShe et.OnRefre shPanel(Se lf, CV_CPR S_WVHT); / / This is me, just l etting the CoverShee t do it's thing! | |
| 284 | CoverShe et.OnRefre shPanel(Se lf, CV_CPR S_POST); | |
| 285 | CoverShe et.OnRefre shPanel(Se lf, CV_CPR S_RMND); | |
| 286 | CoverShe et.OnRefre shCWAD(Sel f); | |
| 287 | end | |
| 288 | el se | |
| 289 | MessageDlg (WomensHea lth.GetLas tError, mt Error, [mb Ok], 0); | |
| 290 | end; | |
| 291 | ||
| 292 | procedure TfraCoverS heetDispla yPanel_CPR S_WH.OnUpd ateData(Se nder: TObj ect); | |
| 293 | begin | |
| 294 | if Women sHealth.Ed itPregLacD ata(Patien t.DFN) the n | |
| 295 | begin | |
| 296 | Cove rSheet.OnR efreshPane l(Self, CV _CPRS_WVHT ); // This is me, ju st letting the Cover Sheet do i t's thing! | |
| 297 | Cove rSheet.OnR efreshPane l(Self, CV _CPRS_POST ); | |
| 298 | Cove rSheet.OnR efreshPane l(Self, CV _CPRS_RMND ); | |
| 299 | Cove rSheet.OnR efreshCWAD (Self); | |
| 300 | end | |
| 301 | else | |
| 302 | Messag eDlg(Women sHealth.Ge tLastError , mtError, [mbOk], 0 ); | |
| 303 | end; | |
| 304 | ||
| 305 | end. |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.