Produced by Araxis Merge on 7/19/2017 12:49:47 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | OR_30_455V2_CIF_request.zip\OR_30_455V2_SRC.zip\Encounter | fEncounterFrame.pas | Wed Jun 21 16:49:50 2017 UTC |
| 2 | OR_30_455V2_CIF_request.zip\OR_30_455V2_SRC.zip\Encounter | fEncounterFrame.pas | Wed Jul 19 17:31:08 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 1530 |
| 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 fEnco unterFrame ; | |
| 2 | ||
| 3 | interface | |
| 4 | ||
| 5 | uses | |
| 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dia logs, | |
| 7 | Tabs, Co mCtrls, Ex tCtrls, Me nus, StdCt rls, Butto ns, fPCEBa se, | |
| 8 | fVisitTy pe | |
| 9 | , fDiagn oses | |
| 10 | , fProce dure, fImm unization, fSkinTest , fPatient Ed, | |
| 11 | fHealthF actor, fEx am, uPCE, rPCE, rTIU , ORCtrls, ORFn | |
| 12 | { $ IFDEF GROUPNOTES } | |
| 13 | { $ ELSE} | |
| 14 | // , fEnc Vitals, rv itals, uGN _Const | |
| 15 | { $ ENDIF} | |
| 16 | , fBase5 08Form, | |
| 17 | VA508Acc essibility Manager, u GN_Const; | |
| 18 | ||
| 19 | const | |
| 20 | //tab na mes | |
| 21 | CT_Visit Nm = '&Vis it Type'; | |
| 22 | CT_DiagN m = '&Dia gnoses'; | |
| 23 | CT_ProcN m = '&Pro cedures'; | |
| 24 | CT_ImmNm = '&Imm unizations '; | |
| 25 | CT_SkinN m = '&Ski n Tests'; | |
| 26 | CT_PedNm = 'Pati ent &Ed'; | |
| 27 | CT_HlthN m = '&Hea lth Factor s'; | |
| 28 | CT_XamNm = 'E&xa ms'; | |
| 29 | CT_VitNm = 'Vit& als'; | |
| 30 | CT_GAFNm = '&GAF '; | |
| 31 | ||
| 32 | NUM_TABS = 3 ; | |
| 33 | TAG_VTYP E = 1 0; | |
| 34 | TAG_DIAG = 2 0; | |
| 35 | TAG_PROC = 3 0; | |
| 36 | TAG_IMMU NIZ = 4 0; | |
| 37 | TAG_SKIN = 5 0; | |
| 38 | TAG_PED = 6 0; | |
| 39 | TAG_HF = 7 0; | |
| 40 | TAG_XAM = 8 0; | |
| 41 | TAG_TRT = 9 0; | |
| 42 | ||
| 43 | TX_NOSEC TION = '-1 ^No sectio ns found'; | |
| 44 | TX_PROV_ REQ = 'A p rimary enc ounter pro vider must be select ed ' + CRL F + | |
| 45 | 'bef ore encoun ter data c an be save d.' + CRLF + CRLF + | |
| 46 | 'Sel ect the Pr imary Enco unter Prov ider on th e VISIT TY PE tab.' + CRLF + | |
| 47 | 'Oth erwise, pr ess <Cance l> to quit without s aving data .'; | |
| 48 | ||
| 49 | TC_PROV_ REQ = 'Mis sing Prima ry Provide r for Enco unter'; | |
| 50 | ||
| 51 | type | |
| 52 | TfrmEnco unterFrame = class(T frmBase508 Form) | |
| 53 | Status Bar1: TSta tusBar; | |
| 54 | pnlPag e: TPanel; | |
| 55 | Bevel1 : TBevel; | |
| 56 | TabCon trol: TTab Control; | |
| 57 | mmLog: TMemo; | |
| 58 | ckbDeb ugInfo: TC heckBox; | |
| 59 | ||
| 60 | proced ure tabPag eChange(Se nder: TObj ect; NewTa b: Integer ; | |
| 61 | var AllowChang e: Boolean ); | |
| 62 | proced ure FormRe size(Sende r: TObject ); | |
| 63 | proced ure Sectio nClick(Sen der: TObje ct); | |
| 64 | proced ure FormDe stroy(Send er: TObjec t); | |
| 65 | proced ure FormCr eate(Sende r: TObject ); | |
| 66 | proced ure FormCl oseQuery(S ender: TOb ject; var CanClose: Boolean); | |
| 67 | proced ure TabCon trolChange (Sender: T Object); | |
| 68 | proced ure TabCon trolChangi ng(Sender: TObject; | |
| 69 | var AllowChang e: Boolean ); | |
| 70 | proced ure FormKe yDown(Send er: TObjec t; var Key : Word; | |
| 71 | Shif t: TShiftS tate); | |
| 72 | proced ure FormCl ose(Sender : TObject; var Actio n: TCloseA ction); | |
| 73 | proced ure FormCa nResize(Se nder: TObj ect; var N ewWidth, | |
| 74 | NewH eight: Int eger; var Resize: Bo olean); | |
| 75 | proced ure FormSh ow(Sender: TObject); | |
| 76 | proced ure TabCon trolEnter( Sender: TO bject); | |
| 77 | proced ure ckbDeb ugInfoClic k(Sender: TObject); | |
| 78 | ||
| 79 | private | |
| 80 | { $ IFDEF DEBUG} | |
| 81 | fDebug PCE: TPCED ata; | |
| 82 | { $ ENDIF} | |
| 83 | FAutoS ave: boole an; | |
| 84 | FSaveN eeded: boo lean; | |
| 85 | FChang eSource: I nteger; | |
| 86 | FCance l: Boolea n; //Indic ates the c ancel butt on has bee n pressed; | |
| 87 | FAbort : boolean; // indica tes that n either OK or Cancel has been p ressed | |
| 88 | FormLi st: TStrin gList; // Holds the types of a ny forms t hat will b e used | |
| 89 | // in the fra me. They must be av ailable at compile t ime | |
| 90 | FLastP age: TfrmP CEBase; | |
| 91 | FGiveM ultiTabMes sage: bool ean; | |
| 92 | proced ure SynchP CEData; | |
| 93 | proced ure Switch ToPage(New Form: Tfrm PCEBase); //was tf rmPage | |
| 94 | ||
| 95 | functi on FormLis tContains( item: stri ng): Boole an; | |
| 96 | proced ure SendDa ta; | |
| 97 | proced ure Update Encounter( PCE: TPCED ata); | |
| 98 | proced ure SetFor mFonts; | |
| 99 | ||
| 100 | proced ure doCrea teForms(aL ocation: I nteger); | |
| 101 | functi on pageByN ame(aName: String): T frmPCEBase ; | |
| 102 | ||
| 103 | public | |
| 104 | proced ure Select Tab(NewTab Name: stri ng); | |
| 105 | proper ty ChangeS ource: Integer re ad FChange Source; | |
| 106 | proper ty Forms: tstringlis t read For mList; | |
| 107 | proper ty Cancel: Boolean re ad FCancel write FCa ncel; | |
| 108 | proper ty Abort: B oolean rea d FAbort w rite FAbor t; | |
| 109 | ||
| 110 | proced ure _UM_GN _ENCUPDATE (var Messa ge: TMessa ge); messa ge UM_GN_E NCUPDATE; | |
| 111 | ||
| 112 | end; | |
| 113 | ||
| 114 | var | |
| 115 | frmEncou nterFrame: TfrmEncou nterFrame; | |
| 116 | uSCCond: TSCCon ditions; | |
| 117 | uVisitTy pe: TPCEPr oc; // contain s info for visit typ e page | |
| 118 | uEncPCED ata: TPCED ata; | |
| 119 | uProvide rs: TPCEPr oviderList ; | |
| 120 | ||
| 121 | // Returns true if P CE data st ill needs to be save d - vitals /gaf are a lways save d | |
| 122 | function U pdatePCE(P CEData: TP CEData; Sa veOnExit: boolean = TRUE): boo lean; | |
| 123 | ||
| 124 | implementa tion | |
| 125 | ||
| 126 | uses | |
| 127 | uCore, | |
| 128 | // fGAF, | |
| 129 | uConst, | |
| 130 | rCore, f PCEProvide r, rMisc, VA508Acces sibilityRo uter, VAUt ils, fEncV itals, | |
| 131 | fGAF; | |
| 132 | ||
| 133 | {$R *.DFM} | |
| 134 | ||
| 135 | procedure TfrmEncoun terFrame.c kbDebugInf oClick(Sen der: TObje ct); | |
| 136 | begin | |
| 137 | inherite d; | |
| 138 | // ckbDeb ugInfo.Che cked := no t ckbDebug Info.Check ed; | |
| 139 | mmLog.Vi sible := c kbDebugInf o.Checked; | |
| 140 | end; | |
| 141 | ||
| 142 | procedure TfrmEncoun terFrame.d oCreateFor ms(aLocati on: Intege r); | |
| 143 | var | |
| 144 | j: Integ er; | |
| 145 | s: strin g; | |
| 146 | begin | |
| 147 | FormList .Clear; | |
| 148 | ||
| 149 | frmVisit Type := T frmVisitTy pe.CreateL inked(pnlP age); | |
| 150 | frmDiagn oses := T frmDiagnos es.CreateL inked(pnlP age); | |
| 151 | frmProce dures := T frmProcedu res.Create Linked(pnl Page); | |
| 152 | if not G roupEdit t hen | |
| 153 | frmEnc Vitals := TfrmEncVit als.Create Linked(pnl Page); | |
| 154 | frmImmun izations : = TfrmImmu nizations. CreateLink ed(pnlPage ); | |
| 155 | if not G roupEdit t hen | |
| 156 | frmSki nTests := TfrmSkinTe sts.Create Linked(pnl Page); | |
| 157 | frmPatie ntEd := Tf rmPatientE d.CreateLi nked(pnlPa ge); | |
| 158 | frmHealt hFactors : = TfrmHEal thFactors. CreateLink ed(pnlPage ); | |
| 159 | if not G roupEdit t hen | |
| 160 | frmExa ms := Tfrm Exams.Crea teLinked(p nlPage); | |
| 161 | if not G roupEdit t hen | |
| 162 | ||
| 163 | {$IFDEF DE BUG_AA} // testing a ppearance of the GAF form rega rdless of Location | |
| 164 | {$ELSE} | |
| 165 | if MHC linic(aLoc ation) the n | |
| 166 | {$ENDIF} | |
| 167 | frmG AF := Tfrm GAF.Create Linked(pnl Page); | |
| 168 | ||
| 169 | FormList .AddObject (CT_VisitN m,frmVisit Type); | |
| 170 | FormList .AddObject (CT_DiagNm ,frmDiagno ses); | |
| 171 | FormList .AddObject (CT_ProcNm ,frmProced ures); | |
| 172 | if not G roupEdit t hen | |
| 173 | FormLi st.AddObje ct(CT_VitN m,frmEncVi tals); | |
| 174 | ||
| 175 | FormList .AddObject (CT_ImmNm, frmImmuniz ations); | |
| 176 | if not G roupEdit t hen | |
| 177 | FormLi st.AddObje ct(CT_Skin Nm,frmSkin Tests); | |
| 178 | FormList .AddObject (CT_PedNm, frmPatient Ed); | |
| 179 | FormList .AddObject (CT_HlthNm ,frmHealth Factors); | |
| 180 | if not G roupEdit t hen | |
| 181 | FormLi st.AddObje ct(CT_XamN m,frmExams ); | |
| 182 | if not G roupEdit t hen | |
| 183 | {$IFDEF DE BUG_AA} // testing a ppearance of the GAF form rega rdless of Location | |
| 184 | {$ELSE} | |
| 185 | if MHC linic(aLoc ation) the n | |
| 186 | {$ENDIF} | |
| 187 | Form List.AddOb ject(CT_GA FNm,frmGAF ); | |
| 188 | ||
| 189 | frmVisit Type.Visib le := True ; | |
| 190 | for j : = 1 to For mList.Coun t - 1 do | |
| 191 | TForm( FormList.O bjects[j]) .Visible : = False; | |
| 192 | ||
| 193 | for s in FormList do | |
| 194 | tabCon trol.Tabs. Add(s); | |
| 195 | end; | |
| 196 | ||
| 197 | function T frmEncount erFrame.pa geByName(a Name:Strin g): TfrmPC EBase; | |
| 198 | var | |
| 199 | i: integ er; | |
| 200 | begin | |
| 201 | Result : = nil; | |
| 202 | i := For mList.Inde xOf(aName) ; | |
| 203 | if i >=0 then | |
| 204 | Result := TfrmPC EBase(Form List.Objec ts[i]); | |
| 205 | end; | |
| 206 | ||
| 207 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 208 | //Name: fu nction Tfr mEncounter Frame.Form ListContai ns(item: s tring): Bo olean; | |
| 209 | //Created: 12/06/98 | |
| 210 | //By: Robe rt Bott | |
| 211 | //Location : ISL | |
| 212 | //Descript ion: Retur ns a boole an value i ndicating if a given string ex ists in | |
| 213 | // the for mlist. | |
| 214 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 215 | function T frmEncount erFrame.Fo rmListCont ains(item: string): Boolean; | |
| 216 | begin | |
| 217 | result : = false; | |
| 218 | if (Form List.Index Of(item) < > -1 ) the n | |
| 219 | result := true; | |
| 220 | end; | |
| 221 | ||
| 222 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 223 | //Name: Tf rmEncounte rFrame.Swi tchToPage( NewForm: t frmPCEBase ); | |
| 224 | //Created: Jan 1999 | |
| 225 | //By: Robe rt Bott | |
| 226 | //Location : ISL | |
| 227 | //Descript ion: Bring s the sele cted page to the fro nt for dis play. | |
| 228 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 229 | procedure TfrmEncoun terFrame.S witchToPag e(NewForm: tfrmPCEBa se);// was TfrmPage) ; | |
| 230 | { unmerge/ merge menu s, bring p age to top of z-orde r, call fo rm-specifi c OnDispla y code } | |
| 231 | begin | |
| 232 | if (NewF orm = nil) or (FLast Page = New Form) then Exit; | |
| 233 | if Assig ned(FLastP age) then | |
| 234 | FLastP age.Hide; | |
| 235 | FLastPag e := NewFo rm; | |
| 236 | // KeyPre view := (N ewForm = f rmEncVital s); | |
| 237 | NewForm. DisplayPag e; // thi s calls Br ingToFront for the f orm | |
| 238 | { $ IFDEF GROUPNOTES } | |
| 239 | NewForm. Show; | |
| 240 | { $ ENDIF} | |
| 241 | end; | |
| 242 | ||
| 243 | procedure TfrmEncoun terFrame.t abPageChan ge(Sender: TObject; NewTab: In teger; var AllowChan ge: Boolea n); | |
| 244 | { switches to form l inked to N ewTab } | |
| 245 | begin | |
| 246 | SwitchTo Page(pageB yName(TabC ontrol.Tab s[NewTab]) ); | |
| 247 | end; | |
| 248 | ||
| 249 | { Resize a nd Font-Ch ange proce dures ---- ---------- ---------- ---------- ---------- ---------- --- } | |
| 250 | ||
| 251 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 252 | //Name: pr ocedure Tf rmEncounte rFrame.For mResize(Se nder: TObj ect); | |
| 253 | //Created: Jan 1999 | |
| 254 | //By: Robe rt Bott | |
| 255 | //Location : ISL | |
| 256 | //Descript ion: Resiz es all win dows when parent cha nges. | |
| 257 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 258 | procedure TfrmEncoun terFrame.F ormResize( Sender: TO bject); | |
| 259 | begin | |
| 260 | self.rep aint; | |
| 261 | end; | |
| 262 | ||
| 263 | ||
| 264 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 265 | //Name: pr ocedure Up datePCE(PC EData: TPC EData); | |
| 266 | //Created: Jan 1999 | |
| 267 | //By: Robe rt Bott | |
| 268 | //Location : ISL | |
| 269 | //Descript ion: The m ain call t o open the encounter frame and capture e ncounter | |
| 270 | // informa tion. | |
| 271 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 272 | function U pdatePCE(P CEData: TP CEData; Sa veOnExit: boolean = TRUE): boo lean; | |
| 273 | var | |
| 274 | // FontHe ight, | |
| 275 | // FontWi dth: Integ er; | |
| 276 | AUser: s tring; | |
| 277 | ||
| 278 | begin | |
| 279 | frmEncou nterFrame := TfrmEnc ounterFram e.Create(A pplication ); | |
| 280 | try | |
| 281 | frmEnc ounterFram e.FAutoSav e := SaveO nExit; | |
| 282 | ||
| 283 | uEncPC EData := P CEData; | |
| 284 | if(uEn cPCEData.E mpty and ( (uEncPCEDa ta.Locatio n = 0) or (uEncPCEDa ta.VisitDa teTime = 0 )) and | |
| 285 | (not Encounter .NeedVisit )) then | |
| 286 | uEnc PCEData.Us eEncounter := TRUE; | |
| 287 | frmEnc ounterFram e.Caption := 'Encoun ter Form f or ' + Ext ernalName( uEncPCEDat a.Location , 44) + | |
| 288 | ' (' + FormatFM DateTime(' mmm dd,yyy y@hh:nn', uEncPCEDat a.VisitDat eTime) + ' )'; | |
| 289 | ||
| 290 | uProvi ders.Assig n(uEncPCED ata.Provid ers); | |
| 291 | SetDef aultProvid er(uProvid ers, uEncP CEData); | |
| 292 | AUser := IntToSt r(uProvide rs.Pending IEN(FALSE) ); | |
| 293 | if(AUs er <> '0') and (uPro viders.Ind exOfProvid er(AUser) < 0) and | |
| 294 | Aut oCheckout( uEncPCEDat a.Location ) then | |
| 295 | uPro viders.Add Provider(A User, uPro viders.Pen dingName(F ALSE), FAL SE); | |
| 296 | ||
| 297 | { $ IFDEF GROUPNOTES } | |
| 298 | frmEnc ounterFram e.doCreate Forms(PCED ata.Locati on); | |
| 299 | { $ ELSE} | |
| 300 | // frmE ncounterFr ame.Create ChildForms (frmEncoun terFrame, PCEData.Lo cation); | |
| 301 | { $ ENDIF} | |
| 302 | SetFor mPosition( frmEncount erFrame); | |
| 303 | Resize AnchoredFo rmToFont(f rmEncounte rFrame); | |
| 304 | //SetF ormPositio n(frmEncou nterFrame) ; | |
| 305 | ||
| 306 | with f rmEncounte rFrame do | |
| 307 | begin | |
| 308 | SetR PCEncLocat ion(PCEDat a.Location ); | |
| 309 | Sync hPCEData; | |
| 310 | TabC ontrol.Tab index := 0 ; | |
| 311 | TabC ontrolChan ge(TabCont rol); | |
| 312 | ||
| 313 | Show Modal; | |
| 314 | Resu lt := FSav eNeeded; | |
| 315 | end; | |
| 316 | finally | |
| 317 | // frm EncounterF rame.Free; v22.11 (JD and SM ) | |
| 318 | frmEnc ounterFram e.Release; | |
| 319 | //frmE ncounterFr ame := nil ; access violation source? r emoved 7/2 8/03 RV | |
| 320 | end; | |
| 321 | end; | |
| 322 | ||
| 323 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 324 | //Name: Tf rmEncounte rFrame.Sec tionClick( Sender: TO bject); | |
| 325 | //Created: Jan 1999 | |
| 326 | //By: Robe rt Bott | |
| 327 | //Location : ISL | |
| 328 | //Descript ion: Call the proced ure apropr iate for t he selecte d tab | |
| 329 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 330 | procedure TfrmEncoun terFrame.S ectionClic k(Sender: TObject); | |
| 331 | begin | |
| 332 | with Sen der as TLi stBox do c ase Tag of | |
| 333 | TAG_VTYP E: if Fo rmListCont ains(CT_Vi sitNm) the n | |
| 334 | begin | |
| 335 | wit h frmVisit Type do | |
| 336 | l stVTypeSec tionClick( Sender); | |
| 337 | end; | |
| 338 | end; | |
| 339 | end; | |
| 340 | ||
| 341 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 342 | //Name: pr ocedure Tf rmEncounte rFrame.Syn chPCEData; | |
| 343 | //Created: Jan 1999 | |
| 344 | //By: Robe rt Bott | |
| 345 | //Location : ISL | |
| 346 | //Descript ion: Synch ronize any existing PCE data w ith what i s displaye d in the f orm. | |
| 347 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 348 | procedure TfrmEncoun terFrame.S ynchPCEDat a; | |
| 349 | ||
| 350 | procedur e InitList (AListBox: TORListBo x); | |
| 351 | var | |
| 352 | DoClic k: Boolean ; | |
| 353 | ||
| 354 | begin | |
| 355 | with A ListBox do | |
| 356 | begin | |
| 357 | DoCl ick := TRU E; | |
| 358 | case Tag of | |
| 359 | TA G_VTYPE: | |
| 360 | begin | |
| 361 | if FormL istContain s(CT_Visit Nm) then | |
| 362 | ListVi sitTypeSec tions(Item s); | |
| 363 | DoClick := AutoSel ectVisit(P CERPCEncLo cation); | |
| 364 | end; | |
| 365 | end; | |
| 366 | if I tems.Count > 0 then | |
| 367 | begi n | |
| 368 | if DoClick t hen | |
| 369 | be gin | |
| 370 | ItemIndex := 0; | |
| 371 | SectionCli ck(AListBo x); | |
| 372 | en d; | |
| 373 | end | |
| 374 | else | |
| 375 | It ems.Add(TX _NOSECTION ); | |
| 376 | end; | |
| 377 | end; | |
| 378 | ||
| 379 | begin | |
| 380 | if FormL istContain s(CT_Visit Nm) then | |
| 381 | with frm VisitType do | |
| 382 | begin | |
| 383 | Init List(frmVi sitType.ls tVTypeSect ion); // s et up Visi t Type pag e | |
| 384 | List SCDisabili ties(memSC Display.Li nes); | |
| 385 | uSCC ond := Eli gbleCondit ions; | |
| 386 | frmV isitType.f raVisitRel ated.InitA llow(uSCCo nd); | |
| 387 | end; | |
| 388 | with uEn cPCEData d o // load any existi ng data fr om PCEData | |
| 389 | begin | |
| 390 | if For mListConta ins(CT_Vis itNm) then | |
| 391 | frmV isitType.f raVisitRel ated.InitR elated(uEn cPCEData); | |
| 392 | if For mListConta ins(CT_Dia gNm) then | |
| 393 | frmD iagnoses.I nitTab(Cop yDiagnoses , ListDiag nosisSecti ons); | |
| 394 | if For mListConta ins(CT_Pro cNm) then | |
| 395 | frmP rocedures. InitTab(Co pyProcedur es, ListPr ocedureSec tions); | |
| 396 | if For mListConta ins(CT_Imm Nm) then | |
| 397 | frmI mmunizatio ns.InitTab (CopyImmun izations,L istImmuniz Sections); | |
| 398 | if For mListConta ins(CT_Ski nNm) then | |
| 399 | frmS kinTests.I nitTab(Cop ySkinTests , ListSkin Sections); | |
| 400 | if For mListConta ins(CT_Ped Nm) then | |
| 401 | frmP atientEd.I nitTab(Cop yPatientEd s, ListPat ientSectio ns); | |
| 402 | if For mListConta ins(CT_Hlt hNm) then | |
| 403 | frmH ealthFacto rs.InitTab (CopyHealt hFactors, ListHealth Sections); | |
| 404 | if For mListConta ins(CT_Xam Nm) then | |
| 405 | frmE xams.InitT ab(CopyExa ms, ListEx amsSection s); | |
| 406 | uVisit Type.Assig n(VisitTyp e); | |
| 407 | if For mListConta ins(CT_Vis itNm) then | |
| 408 | with f rmVisitTyp e do | |
| 409 | begin | |
| 410 | Matc hVType; | |
| 411 | end; | |
| 412 | end; | |
| 413 | end; | |
| 414 | ||
| 415 | ||
| 416 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 417 | //Name: pr ocedure Tf rmEncounte rFrame.For mDestroy(S ender: TOb ject); | |
| 418 | //Created: Jan 1999 | |
| 419 | //By: Robe rt Bott | |
| 420 | //Location : ISL | |
| 421 | //Descript ion: Free up objects in memory when dest roying for m. | |
| 422 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 423 | procedure TfrmEncoun terFrame.F ormDestroy (Sender: T Object); | |
| 424 | var | |
| 425 | i: integ er; | |
| 426 | ||
| 427 | begin | |
| 428 | inherite d; | |
| 429 | for i := Component Count-1 do wnto 0 do | |
| 430 | if(Com ponents[i] is TForm) then | |
| 431 | TFor m(Componen ts[i]).Fre e; | |
| 432 | ||
| 433 | formlist .clear; | |
| 434 | KillObj( @uProvider s); | |
| 435 | uVisitTy pe.Free; | |
| 436 | Formlist .free; | |
| 437 | { $ IFDEF DEBUG} | |
| 438 | fDebugPC E.Free; | |
| 439 | { $ ENDIF} | |
| 440 | end; | |
| 441 | ||
| 442 | ||
| 443 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 444 | //Name: pr ocedure Tf rmEncounte rFrame.For mCreate(Se nder: TObj ect); | |
| 445 | //Created: Jan 1999 | |
| 446 | //By: Robe rt Bott | |
| 447 | //Location : ISL | |
| 448 | //Descript ion: Creat e instance s of the o bjects nee ded. | |
| 449 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 450 | procedure TfrmEncoun terFrame.F ormCreate( Sender: TO bject); | |
| 451 | begin | |
| 452 | uProvide rs := TPCE ProviderLi st.Create; | |
| 453 | uVisitTy pe := TPCE Proc.creat e; | |
| 454 | //uVital Old := TS tringList. create; | |
| 455 | //uVital New := TS tringList. create; | |
| 456 | FormList := TStrin gList.crea te; | |
| 457 | fCancel := False; | |
| 458 | FAbort : = TRUE; | |
| 459 | SetFormF onts; | |
| 460 | FGiveMul tiTabMessa ge := Scre enReaderSy stemActive ; | |
| 461 | { $ IFDEF DEBUG} | |
| 462 | fDebugPC E := TPCED ata.Create ; | |
| 463 | { $ ENDIF} | |
| 464 | ckbDebug Info.Visib le := | |
| 465 | HasS ecurityKey (GN_GUI_SE CURITY_KEY ) | |
| 466 | {$IFDEF DE BUG} | |
| 467 | or T RUE | |
| 468 | {$ENDIF} | |
| 469 | ; | |
| 470 | end; | |
| 471 | ||
| 472 | procedure TfrmEncoun terFrame.U pdateEncou nter(PCE: TPCEData); | |
| 473 | begin | |
| 474 | with PCE do | |
| 475 | begin | |
| 476 | if For mListConta ins(CT_Vis itNm) then | |
| 477 | begin | |
| 478 | Visi tType := u VisitType; | |
| 479 | frmV isitType.f raVisitRel ated.GetRe lated(uEnc PCEData); | |
| 480 | Prov iders.Merg e(uProvide rs); | |
| 481 | end; | |
| 482 | // DN S BELLC | |
| 483 | if For mListConta ins(CT_Dia gNm) then | |
| 484 | SetD iagnoses(f rmDiagnose s.lstCapti onList.Ite msStrings) ; | |
| 485 | if For mListConta ins(CT_Pro cNm) then | |
| 486 | SetPr ocedures(f rmProcedur es.lstCapt ionList.It emsStrings ); | |
| 487 | if For mListConta ins(CT_Imm Nm) then | |
| 488 | Set Immunizati ons(frmImm unizations .lstCaptio nList.Item sStrings); | |
| 489 | if For mListConta ins(CT_Ski nNm) then | |
| 490 | Set SkinTests( frmSkinTes ts.lstCapt ionList.It emsStrings ); | |
| 491 | if For mListConta ins(CT_Ped Nm) then | |
| 492 | SetP atientEds( frmPatient Ed.lstCapt ionList.It emsStrings ); | |
| 493 | if For mListConta ins(CT_Hlt hNm) then | |
| 494 | SetH ealthFacto rs(frmHeal thFactors. lstCaption List.Items Strings); | |
| 495 | if For mListConta ins(CT_Xam Nm) then | |
| 496 | SetE xams(frmEx ams.lstCap tionList.I temsString s); | |
| 497 | ||
| 498 | if Gro upEdit the n | |
| 499 | Copy PCEData(Ba sePCE); | |
| 500 | end; | |
| 501 | end; | |
| 502 | ||
| 503 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 504 | //Name: pr ocedure Tf rmEncounte rFrame.Sen dData; | |
| 505 | //Created: Jan 1999 | |
| 506 | //By: Robe rt Bott | |
| 507 | //Location : ISL | |
| 508 | //Descript ion: Send Data back to the M s ide sor st oring. | |
| 509 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 510 | procedure TfrmEncoun terFrame.S endData; | |
| 511 | //send PCE data to t he RPC | |
| 512 | var | |
| 513 | { $ IFDEF GROUPNOTES } | |
| 514 | { $ ELSE} | |
| 515 | // StoreM essage: st ring; | |
| 516 | { $ ENDIF} | |
| 517 | GAFScore : integer; | |
| 518 | GAFDate: TFMDateTi me; | |
| 519 | GAFStaff : Int64; | |
| 520 | ||
| 521 | begin | |
| 522 | inherite d; | |
| 523 | // do va lidation f or vitals & anything else here | |
| 524 | { $ IFDEF GROUPNOTES } | |
| 525 | { $ ELSE} | |
| 526 | (* | |
| 527 | //proces s vitals | |
| 528 | if FormL istContain s(CT_VitNm ) then | |
| 529 | begin | |
| 530 | with f rmEncVital s do | |
| 531 | if Has Data then | |
| 532 | begin | |
| 533 | if A ssignVital s then | |
| 534 | begi n | |
| 535 | St oreMessage := ValAnd StoreVital s(frmEncVi tals.Vital New); | |
| 536 | if (Storemes sage <> 'T rue') then | |
| 537 | be gin | |
| 538 | ShowMsg(st oremessage ); | |
| 539 | // exit; | |
| 540 | en d; | |
| 541 | end; | |
| 542 | end; | |
| 543 | end; | |
| 544 | *) | |
| 545 | { $ ENDIF} | |
| 546 | ||
| 547 | if(FormL istContain s(CT_GAFNm )) then | |
| 548 | begin | |
| 549 | frmGAF .GetGAFSco re(GAFScor e, GAFDate , GAFStaff ); | |
| 550 | if(GAF Score > 0) then | |
| 551 | Save GAFScore(G AFScore, G AFDate, GA FStaff); | |
| 552 | end; | |
| 553 | ||
| 554 | //PCE | |
| 555 | UpdateEn counter(uE ncPCEData) ; | |
| 556 | with uEn cPCEData d o | |
| 557 | begin | |
| 558 | if FAu toSave the n | |
| 559 | Save | |
| 560 | else | |
| 561 | FSav eNeeded := TRUE; | |
| 562 | end; | |
| 563 | Close; | |
| 564 | end; | |
| 565 | ||
| 566 | {///////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// | |
| 567 | //Name: pr ocedure Tf rmEncounte rFrame.For mCloseQuer y(Sender: TObject; | |
| 568 | //Created: Jan 1999 | |
| 569 | //By: Robe rt Bott | |
| 570 | //Location : ISL | |
| 571 | //Descript ion: Check to see if the Cance l button w as pressed , if not, call | |
| 572 | // procedu re to send the data to the ser ver. | |
| 573 | ////////// ////////// ////////// ////////// ////////// ////////// ////////// /////////} | |
| 574 | procedure TfrmEncoun terFrame.F ormCloseQu ery(Sender : TObject; | |
| 575 | var CanC lose: Bool ean); | |
| 576 | ||
| 577 | const | |
| 578 | TXT_SAVE CHANGES = 'Save Chan ges?'; | |
| 579 | ||
| 580 | var | |
| 581 | TmpPCEDa ta: TPCEDa ta; | |
| 582 | ask, Cha ngeOK: boo lean; | |
| 583 | ||
| 584 | begin | |
| 585 | CanClose := True; | |
| 586 | if(FAbor t) then | |
| 587 | FCance l := (Info Box(TXT_SA VECHANGES, TXT_SAVEC HANGES, MB _YESNO) = ID_NO); | |
| 588 | if FCanc el then Ex it; //*KC M* | |
| 589 | ||
| 590 | if(uProv iders.Prim aryIdx >= 0) then | |
| 591 | ask := TRUE | |
| 592 | else | |
| 593 | begin | |
| 594 | TmpPCE Data := TP CEData.Cre ate; | |
| 595 | try | |
| 596 | uEnc PCEData.Co pyPCEData( TmpPCEData ); | |
| 597 | Upda teEncounte r(TmpPCEDa ta); | |
| 598 | ask := TmpPCED ata.NeedPr oviderInfo ; | |
| 599 | finall y | |
| 600 | TmpP CEData.Fre e; | |
| 601 | end; | |
| 602 | end; | |
| 603 | if ask a nd (NoPrim aryPCEProv ider(uProv iders, uEn cPCEData)) then | |
| 604 | begin | |
| 605 | InfoBo x(TX_PROV_ REQ, TC_PR OV_REQ, MB _OK or MB_ ICONWARNIN G); | |
| 606 | CanClo se := Fals e; | |
| 607 | Exit; | |
| 608 | end; | |
| 609 | ||
| 610 | uVisitTy pe.Provide r := uProv iders.Prim aryIEN; { RV - v20.1 } | |
| 611 | ||
| 612 | { $ IFDEF GROUPNOTES } | |
| 613 | { $ ELSE} | |
| 614 | // if For mListConta ins(CT_Vit Nm) then | |
| 615 | // CanC lose := fr mEncVitals .OK2SaveVi tals; | |
| 616 | { $ ENDIF} | |
| 617 | if CanCl ose and Fo rmListCont ains(CT_Pr ocNm) then | |
| 618 | begin | |
| 619 | CanC lose := fr mProcedure s.OK2SaveP rocedures; | |
| 620 | if n ot CanClos e then | |
| 621 | be gin | |
| 622 | tabPageCha nge(Self, FormList.I ndexOf(CT_ ProcNm), C hangeOK); | |
| 623 | { $ IFDEF GROUPNOTES } | |
| 624 | SwitchToPa ge(pageByN ame(CT_Pro cNm)); | |
| 625 | { $ ELSE} | |
| 626 | // SwitchTo Page(PageI DToForm(CT _PROCEDURE S)); | |
| 627 | { $ ENDIF} | |
| 628 | TabControl .TabIndex := FormLis t.IndexOf( CT_ProcNm) ; | |
| 629 | en d; | |
| 630 | end; | |
| 631 | ||
| 632 | if CanCl ose then S endData; //*KCM* | |
| 633 | ||
| 634 | end; | |
| 635 | ||
| 636 | procedure TfrmEncoun terFrame.T abControlC hange(Send er: TObjec t); | |
| 637 | begin | |
| 638 | //must swi tch based on caption , as all t abs may no t be prese nt. | |
| 639 | if (send er as tTab Control).t abindex = -1 then ex it; | |
| 640 | ||
| 641 | if TabCo ntrol.CanF ocus and A ssigned(FL astPage) a nd not Tab Control.Fo cused then | |
| 642 | TabCon trol.SetFo cus; //CQ : 14845 | |
| 643 | ||
| 644 | SwitchT oPage(page ByName(Tab Control.Ta bs[TabCont rol.TabInd ex])); | |
| 645 | end; | |
| 646 | ||
| 647 | procedure TfrmEncoun terFrame.T abControlC hanging(Se nder: TObj ect; | |
| 648 | var Allo wChange: B oolean); | |
| 649 | begin | |
| 650 | if(assig ned(FLastP age)) then | |
| 651 | FLastP age.AllowT abChange(A llowChange ); | |
| 652 | end; | |
| 653 | ||
| 654 | procedure TfrmEncoun terFrame.S electTab(N ewTabName: string); | |
| 655 | var | |
| 656 | AllowCha nge: boole an; | |
| 657 | begin | |
| 658 | AllowCha nge := Tru e; | |
| 659 | tabContr ol.TabInde x := FormL ist.IndexO f(NewTabNa me); | |
| 660 | tabPageC hange(Self , tabContr ol.TabInde x, AllowCh ange); | |
| 661 | end; | |
| 662 | ||
| 663 | procedure TfrmEncoun terFrame.T abControlE nter(Sende r: TObject ); | |
| 664 | begin | |
| 665 | if FGive MultiTabMe ssage then // CQ#154 83 | |
| 666 | begin | |
| 667 | FGiveM ultiTabMes sage := FA LSE; | |
| 668 | GetScr eenReader. Speak('Mul ti tab for m'); | |
| 669 | end; | |
| 670 | end; | |
| 671 | ||
| 672 | procedure TfrmEncoun terFrame.F ormKeyDown (Sender: T Object; va r Key: Wor d; | |
| 673 | Shift: T ShiftState ); | |
| 674 | var | |
| 675 | CanChang e: boolean ; | |
| 676 | begin | |
| 677 | inherite d; | |
| 678 | if (Key = VK_ESCAP E) then | |
| 679 | begin | |
| 680 | Key := 0; | |
| 681 | FLastP age.btnCan cel.Click; | |
| 682 | end | |
| 683 | else if Key = VK_T AB then | |
| 684 | begin | |
| 685 | if ssC trl in Shi ft then | |
| 686 | begin | |
| 687 | CanC hange := T rue; | |
| 688 | if A ssigned(Ta bControl.O nChanging) then | |
| 689 | Ta bControl.O nChanging( TabControl , CanChang e); | |
| 690 | if C anChange t hen | |
| 691 | begi n | |
| 692 | if ssShift i n Shift th en | |
| 693 | be gin | |
| 694 | if TabCont rol.TabInd ex < 1 the n | |
| 695 | TabContr ol.TabInde x := TabCo ntrol.Tabs .Count -1 | |
| 696 | else | |
| 697 | TabContr ol.TabInde x := TabCo ntrol.TabI ndex - 1; | |
| 698 | en d | |
| 699 | el se | |
| 700 | TabControl .TabIndex := (TabCon trol.TabIn dex + 1) m od TabCont rol.Tabs.C ount; | |
| 701 | if Assigned( TabControl .OnChange) then | |
| 702 | TabControl .OnChange( TabControl ); | |
| 703 | end; | |
| 704 | Key := 0; | |
| 705 | end; | |
| 706 | end; | |
| 707 | end; | |
| 708 | ||
| 709 | procedure TfrmEncoun terFrame.S etFormFont s; | |
| 710 | var | |
| 711 | i: Integ er; | |
| 712 | NewFontS ize: integ er; | |
| 713 | begin | |
| 714 | NewFontS ize := Mai nFontsize; | |
| 715 | for i : = 0 to For mList.Coun t - 1 do | |
| 716 | if ass igned(Form List.Objec ts[i]) and (FormList .Objects[i ] is TfrmP CEBase) th en | |
| 717 | Tfrm PCEBase(Fo rmList.Obj ects[i]).F ont.Size : = NewFontS ize; | |
| 718 | end; | |
| 719 | ||
| 720 | procedure TfrmEncoun terFrame.F ormClose(S ender: TOb ject; | |
| 721 | var Acti on: TClose Action); | |
| 722 | begin | |
| 723 | SaveUser Bounds(Sel f); | |
| 724 | end; | |
| 725 | ||
| 726 | procedure TfrmEncoun terFrame.F ormCanResi ze(Sender: TObject; | |
| 727 | var NewW idth, NewH eight: Int eger; var Resize: Bo olean); | |
| 728 | begin | |
| 729 | // CQ474 0 | |
| 730 | if NewWi dth < 200 then | |
| 731 | begin | |
| 732 | NewWid th := 200; | |
| 733 | Resize := False; | |
| 734 | end; | |
| 735 | end; | |
| 736 | ||
| 737 | procedure TfrmEncoun terFrame.F ormShow(Se nder: TObj ect); | |
| 738 | begin | |
| 739 | inherite d; | |
| 740 | if TabCo ntrol.CanF ocus then | |
| 741 | TabCon trol.SetFo cus; | |
| 742 | end; | |
| 743 | ||
| 744 | procedure TfrmEncoun terFrame._ UM_GN_ENCU PDATE(var Message: T Message); | |
| 745 | { $ IFDEF DEBUG} | |
| 746 | var | |
| 747 | i: integ er; | |
| 748 | begin; | |
| 749 | UpdateEn counter(fD ebugPCE); | |
| 750 | mmLog.Cl ear; | |
| 751 | mmLog.Li nes.Add(Fo rmatDateTi me('-- mm/ dd/yyyy hh :nn:ss --' , Now)); | |
| 752 | mmLog.Li nes.Add('- ---------- ---------- ----'); | |
| 753 | fDebugPC E.AddStrDa ta(mmLog.L ines); | |
| 754 | i := 1; | |
| 755 | while i <= mmLog.L ines.Count - 1 do | |
| 756 | if Tri m(mmLog.Li nes[i]) = '' then | |
| 757 | mmLo g.Lines.De lete(i) | |
| 758 | else | |
| 759 | inc( i); | |
| 760 | mmLog.Li nes.Add('- ---------- ---------- ----'); | |
| 761 | { $ ELSE} | |
| 762 | //begin | |
| 763 | { $ ENDIF} | |
| 764 | end; | |
| 765 | ||
| 766 | end. |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.