Changeset 1679 for cprs/trunk/CPRS-Chart/fFrame.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fFrame.pas
r830 r1679 5 5 {$OPTIMIZATION OFF} // REMOVE AFTER UNIT IS DEBUGGED 6 6 {$WARN SYMBOL_PLATFORM OFF} 7 {$DEFINE CCOWBROKER} 8 7 {$DEFINE CCOWBROKER} 8 9 9 {.$define debug} 10 10 … … 15 15 ExtCtrls, Menus, StdCtrls, Buttons, ORFn, fPage, uConst, ORCtrls, Trpcb, 16 16 OleCtrls, VERGENCECONTEXTORLib_TLB, ComObj, AppEvnts, fBase508Form, 17 VA508AccessibilityManager 18 { TODO -oRV -cWVEHR Long Age : Changed to use long age } 19 , rWVEHR; 17 VA508AccessibilityManager, RichEdit; 20 18 21 19 type … … 109 107 pnlPatientSelected: TPanel; 110 108 pnlNoPatientSelected: TPanel; 111 pnlFlag: TKeyClickPanel;112 lblFlag: TLabel;113 109 pnlPostings: TKeyClickPanel; 114 110 lblPtPostings: TStaticText; … … 132 128 mnuViewRemoteData: TMenuItem; 133 129 compAccessTabPage: TVA508ComponentAccessibility; 130 pnlCVnFlag: TPanel; 131 btnCombatVet: TButton; 132 pnlFlag: TKeyClickPanel; 133 lblFlag: TLabel; 134 134 pnlRemoteData: TKeyClickPanel; 135 135 pnlVistaWeb: TKeyClickPanel; … … 137 137 pnlCIRN: TKeyClickPanel; 138 138 lblCIRN: TLabel; 139 mnuEditRedo: TMenuItem; 139 140 procedure tabPageChange(Sender: TObject); 140 141 procedure FormCreate(Sender: TObject); … … 143 144 Shift: TShiftState; X, Y: Integer); 144 145 procedure pnlPatientMouseUp(Sender: TObject; Button: TMouseButton; 146 Shift: TShiftState; X, Y: Integer); 147 procedure pnlVisitMouseDown(Sender: TObject; Button: TMouseButton; 148 Shift: TShiftState; X, Y: Integer); 149 procedure pnlVisitMouseUp(Sender: TObject; Button: TMouseButton; 145 150 Shift: TShiftState; X, Y: Integer); 146 151 procedure mnuFileExitClick(Sender: TObject); … … 225 230 procedure ScreenActiveFormChange(Sender: TObject); 226 231 procedure AppEventsShortCut(var Msg: TWMKey; var Handled: Boolean); 227 procedure mnuToolsClick(Sender: TObject);228 232 procedure mnuToolsGraphingClick(Sender: TObject); 229 233 procedure pnlCIRNMouseDown(Sender: TObject; Button: TMouseButton; … … 237 241 procedure compAccessTabPageCaptionQuery(Sender: TObject; 238 242 var Text: string); 243 procedure btnCombatVetClick(Sender: TObject); 239 244 procedure pnlVistaWebClick(Sender: TObject); 245 procedure pnlVistaWebMouseUp(Sender: TObject; Button: TMouseButton; 246 Shift: TShiftState; X, Y: Integer); 240 247 procedure pnlVistaWebMouseDown(Sender: TObject; Button: TMouseButton; 241 248 Shift: TShiftState; X, Y: Integer); 242 procedure pnlVistaWebMouseUp(Sender: TObject; Button: TMouseButton; 249 procedure mnuEditRedoClick(Sender: TObject); 250 procedure tabPageMouseDown(Sender: TObject; Button: TMouseButton; 243 251 Shift: TShiftState; X, Y: Integer); 244 252 private … … 334 342 Shift: TShiftState; X, Y: Integer); 335 343 public 336 EnduringPtSelSplitterPos, frmFrameHeight, pnlPatientSelectedHeight: integer; 344 EnduringPtSelSplitterPos, frmFrameHeight, pnlPatientSelectedHeight: integer; 345 EnduringPtSelColumns: string; 337 346 procedure SetBADxList; 338 347 procedure SetActiveTab(PageID: Integer); … … 363 372 frmFrame: TfrmFrame; 364 373 uTabList: TStringList; 365 uRemoteType : string;374 uRemoteType, uReportID, uLabRepID : string; 366 375 FlaggedPTList: TStringList; 367 376 ctxContextor : TContextorControl; 368 NextTab, LastTab: Integer; 369 uToolsMaxed, uToolsWarned, uUseVistaWeb: boolean; 377 NextTab, LastTab, ChangingTab: Integer; 378 uUseVistaWeb: boolean; 379 PTSwitchRefresh: boolean = FALSE; //flag for patient refresh or switch of patients 380 ProbTabClicked: boolean = FALSE; 381 TabCtrlClicked: Boolean = FALSE; 370 382 371 383 const … … 390 402 {$ENDIF} 391 403 , VA508AccessibilityRouter, fOtherSchedule, VAUtils, uVA508CPRSCompatibility, fIVRoutes, 392 fPrintLocation, fTemplateEditor ;404 fPrintLocation, fTemplateEditor, fTemplateDialog, fCombatVet; 393 405 394 406 var // RV 05/11/04 … … 421 433 FCP_FINISH = 99; // form create finished successfully 422 434 423 TX_IN_USE = 'VistA CPRS in use by: '; 435 TX_IN_USE = 'VistA CPRS in use by: '; // use same as with CPRSInstances in fTimeout 424 436 TX_OPTION = 'OR CPRS GUI CHART'; 425 437 TX_ECSOPT = 'EC GUI CONTEXT'; … … 532 544 else Application.ShowException(E); 533 545 Application.RestoreTopMosts; 546 end; 547 548 procedure TfrmFrame.btnCombatVetClick(Sender: TObject); 549 begin 550 inherited; 551 frmCombatVet := TfrmCombatVet.Create(frmFrame); 552 frmCombatVet.ShowModal; 553 frmCombatVet.Free; 534 554 end; 535 555 … … 617 637 Changes.Clear; 618 638 lstCIRNLocations.Clear; 619 uRemoteType := '';620 639 ClearFlag; 621 640 if Assigned(FlagList) then FlagList.Clear; … … 633 652 if frmFrame.TimedOut then 634 653 begin 635 infoBox('CPRS has encountered a serious problem and is unable to display the selected patient''s data. This is a known issue documented in PSPO 1089.'654 infoBox('CPRS has encountered a serious problem and is unable to display the selected patient''s data. ' 636 655 + 'To prevent patient safety issues, CPRS is shutting down. Shutting down and then restarting CPRS will correct the problem, and you may continue working in CPRS.' 637 656 + CRLF + CRLF + 'Please report all occurrences of this problem by contacting your CPRS Help Desk.', 'CPRS Error', MB_OK); … … 664 683 { Form Events (Create, Destroy) ----------------------------------------------------------- } 665 684 685 666 686 procedure TfrmFrame.RefreshFixedStatusWidth; 667 687 begin … … 675 695 ClientVer, ServerVer, ServerReq: string; 676 696 begin 677 FProccessingNextClick := false;678 697 FJustEnteredApp := false; 679 698 SizeHolder := TSizeHolder.Create; … … 862 881 GraphDataOnUser; 863 882 uRemoteType := ''; 883 uReportID := ''; 884 uLabRepID := ''; 864 885 FPrevPtID := ''; 865 886 SetUserTools; 866 887 EnduringPtSelSplitterPos := 0; 888 EnduringPtSelColumns := ''; 867 889 if User.IsReportsOnly then // Reports Only tab. 868 890 ReportsOnlyDisplay; // Calls procedure to hide all components/menus not needed. … … 986 1008 procedure TfrmFrame.SetUserTools; 987 1009 var 988 ToolItems: TToolItemList; 989 i: Integer; 1010 item, parent: TToolMenuItem; 1011 ok: boolean; 1012 index, i, idx, count: Integer; 990 1013 UserTool: TMenuItem; 991 M axedOut: boolean;1014 Menus: TStringList; 992 1015 // OptionsClick: TNotifyEvent; 993 1016 begin … … 1011 1034 //exit; 1012 1035 end; 1013 GetToolMenu(ToolItems, MaxedOut); // For all other users, proceed normally with creation of Tools menu: 1014 for i := Low(ToolItems) to High(ToolItems) do 1015 begin 1016 if (AnsiCompareText(ToolItems[i].Caption, 'Event Capture Interface') = 0 ) and 1036 GetToolMenu; // For all other users, proceed normally with creation of Tools menu: 1037 for i := uToolMenuItems.Count-1 downto 0 do 1038 begin 1039 item := TToolMenuItem(uToolMenuItems[i]); 1040 if (AnsiCompareText(item.Caption, 'Event Capture Interface') = 0 ) and 1017 1041 (not uECSReport.ECSPermit) then 1018 1042 begin 1019 ToolItems[i].Caption := ''; 1020 ToolItems[i].Action := ''; 1043 uToolMenuItems.Delete(i); 1021 1044 Break; 1022 1045 end; 1023 1046 end; 1024 if MaxedOut then 1025 begin 1026 uToolsMaxed := True; 1027 uToolsWarned := False; 1028 end; 1029 for i := 0 to MAX_TOOLITEMS do with ToolItems[i] do if Length(Caption) > 0 then 1030 begin 1031 UserTool := TMenuItem.Create(Self); 1032 UserTool.Caption := Caption; 1033 UserTool.Hint := Action; 1034 UserTool.OnClick := ToolClick; 1035 mnuTools.Insert(i, UserTool); 1036 end; 1037 end; 1038 1039 procedure TfrmFrame.mnuToolsClick(Sender: TObject); 1040 const 1041 TX_TOO_MANY_TOOLS = 'Some defined items may not be shown'; 1042 TC_TOO_MANY_TOOLS = 'Tool Menu Limit Exceeded'; 1043 begin 1044 if uToolsMaxed and (not uToolsWarned) then 1045 begin 1046 InfoBox(TX_TOO_MANY_TOOLS, TC_TOO_MANY_TOOLS, MB_ICONWARNING or MB_OK); 1047 uToolsWarned := True; 1048 end; 1047 Menus := TStringList.Create; 1048 try 1049 count := 0; 1050 idx := 0; 1051 index := 0; 1052 while count < uToolMenuItems.Count do 1053 begin 1054 for I := 0 to uToolMenuItems.Count - 1 do 1055 begin 1056 item := TToolMenuItem(uToolMenuItems[i]); 1057 if assigned(item.MenuItem) then continue; 1058 if item.SubMenuID = '' then 1059 ok := True 1060 else 1061 begin 1062 idx := Menus.IndexOf(item.SubMenuID); 1063 ok := (idx >= 0); 1064 end; 1065 if ok then 1066 begin 1067 inc(count); 1068 UserTool := TMenuItem.Create(Self); 1069 UserTool.Caption := Item.Caption; 1070 if Item.Action <> '' then 1071 begin 1072 UserTool.Hint := Item.Action; 1073 UserTool.OnClick := ToolClick; 1074 end; 1075 Item.MenuItem := UserTool; 1076 if item.SubMenuID = '' then 1077 begin 1078 mnuTools.Insert(Index,UserTool); 1079 inc(Index); 1080 end 1081 else 1082 begin 1083 parent := TToolMenuItem(Menus.Objects[idx]); 1084 parent.MenuItem.Add(UserTool); 1085 end; 1086 if item.MenuID <> '' then 1087 Menus.AddObject(item.MenuID, item); 1088 end; 1089 end; 1090 end; 1091 finally 1092 Menus.Free; 1093 end; 1094 FreeAndNil(uToolMenuItems); 1049 1095 end; 1050 1096 … … 1168 1214 IsProgrammer: Boolean; 1169 1215 begin 1170 IsProgrammer := User.HasKey('XUPROGMODE') ;1216 IsProgrammer := User.HasKey('XUPROGMODE') or (ShowRPCList = True); 1171 1217 mnuHelpBroker.Visible := IsProgrammer; 1172 1218 mnuHelpLists.Visible := IsProgrammer; … … 1236 1282 if FLastPage = NewForm then 1237 1283 begin 1238 if Notifications.Active then PostMessage(Handle, UM_SHOWPAGE, 0, 0);1284 if Notifications.Active and Assigned(NewForm) then PostMessage(Handle, UM_SHOWPAGE, 0, 0); 1239 1285 Exit; 1240 1286 end; … … 1319 1365 if ScreenReaderSystemActive and FCtrlTabUsed then 1320 1366 SpeakPatient; 1367 ChangingTab := PageID; 1321 1368 end; 1322 1369 … … 1377 1424 begin 1378 1425 ClearPatient; // must be called to avoid leaving previous patient's information visible! 1426 btnCombatVet.Caption := 'CV '+ CombatVet.ExpirationDate; 1427 btnCombatVet.Visible := Patient.CombatVet.IsEligible; 1379 1428 Visible := True; 1380 1429 Application.ProcessMessages; 1381 lblPtName.Caption := Name ;1430 lblPtName.Caption := Name + Status; //CQ #17491: Allow for the display of the patient status indicator in header bar. 1382 1431 lblPtSSN.Caption := SSN; 1383 // 1384 { TODO -oRV -cWVEHR Long Age : Change for long patient age. } 1385 lblPtAge.Caption := FormatFMDateTime('mmm dd,yyyy', DOB) + ' (' + GetPatientBriefAge(Patient.DFN) + ')'; 1386 //lblPtAge.Caption := FormatFMDateTime('mmm dd,yyyy', DOB) + ' (' + IntToStr(Age) + ')'; 1387 // 1432 lblPtAge.Caption := FormatFMDateTime('mmm dd,yyyy', DOB) + ' (' + IntToStr(Age) + ')'; 1388 1433 pnlPatient.Caption := lblPtName.Caption + ' ' + lblPtSSN.Caption + ' ' + lblPtAge.Caption; 1389 1434 if Length(CWAD) > 0 … … 1396 1441 if Length(Attending) > 0 then lblPtAttending.Caption := 'Attending: ' + MixedCase(Attending); 1397 1442 pnlPrimaryCare.Caption := lblPtCare.Caption + ' ' + lblPtAttending.Caption; 1443 if Length(Associate) > 0 then lblPtAttending.Caption := lblPtAttending.Caption + ' - Associate: ' + MixedCase(Associate); 1444 pnlPrimaryCare.Caption := lblPtCare.Caption + ' ' + lblPtAttending.Caption ; 1398 1445 SetUpCIRN; 1399 1446 DisplayEncounterText; … … 1451 1498 begin 1452 1499 DoNotChangeEncWindow := False; 1500 OrderPrintForm := False; 1453 1501 mnuFile.Tag := 0; 1454 1502 SaveDFN := Patient.DFN; … … 1651 1699 CCOWResponse: UserResponse; 1652 1700 begin 1701 pnlPatient.Enabled := false; 1702 if (Sender = mnuFileOpen) or (FRefreshing) then PTSwitchRefresh := True 1703 else PTSwitchRefresh := False; //part of a change to CQ #11529 1653 1704 PtSelCancelled := FALSE; 1654 1705 if not FRefreshing then mnuFile.Tag := 0 … … 1670 1721 PtEvtCompleted(TheCurrentView.EventDelay.PtEventIFN, TheCurrentView.EventDelay.EventName); 1671 1722 end;*) 1672 //if Sender <> mnuFileNext then //CQ 16273 & 16419 - Missing Review/Sign changes dialog when clicking 'Next' button 1673 if not AllowContextChangeAll(Reason) then Exit; 1674 1723 //if Sender <> mnuFileNext then //CQ 16273 & 16419 - Missing Review/Sign Changes dialog when clicking 'Next' button. 1724 if not AllowContextChangeAll(Reason) then 1725 begin 1726 pnlPatient.Enabled := True; 1727 Exit; 1728 end; 1675 1729 // update status text here 1676 1730 stsArea.Panels.Items[1].Text := ''; … … 1685 1739 begin 1686 1740 Notifications.Prior; 1741 pnlPatient.Enabled := True; 1687 1742 Exit; 1688 1743 end; … … 1728 1783 if (Patient.DFN = '') or (Sender = mnuFileOpen) or (Sender = mnuFileNext) or (Sender = mnuViewDemo) then 1729 1784 SelectPatient(SHOW_NOTIFICATIONS, Font.Size, PtSelCancelled); 1730 if PtSelCancelled then exit; 1785 if PtSelCancelled then 1786 begin 1787 pnlPatient.Enabled := True; 1788 exit; 1789 end; 1731 1790 ShowEverything; 1732 1791 //HideEverything('Retrieving information - please wait....'); //v27 (pending) RV … … 1811 1870 {End BillingAware} 1812 1871 //ShowEverything; //v27 (pending) RV 1813 if not FRefreshing then DoNotChangeEncWindow := false; 1872 if not FRefreshing then 1873 begin 1874 DoNotChangeEncWindow := false; 1875 OrderPrintForm := false; 1876 uCore.TempEncounterLoc := 0; 1877 uCore.TempEncounterLocName := ''; 1878 end; 1879 pnlPatient.Enabled := True; 1814 1880 //frmCover.UpdateVAAButton; //VAA CQ7525 CQ#7933 - moved to SetupPatient, before event hook execution (RV) 1815 1881 end; … … 1856 1922 EventChanges := False; 1857 1923 NameNeedLook := ''; 1858 UpdatePtInfoOnRefresh;1924 //UpdatePtInfoOnRefresh; 1859 1925 if Changes.Count > 0 then 1860 1926 begin … … 1872 1938 end 1873 1939 else InfoBox('No new changes to review/sign.', 'Review Changes', MB_OK); 1940 //CQ #17491: Moved UpdatePtInfoOnRefresh here to allow for the updating of the patient status indicator 1941 //in the header bar (after the Review Changes dialog closes) if the patient becomes admitted/discharged. 1942 UpdatePtInfoOnRefresh; 1874 1943 FOrderPrintForm := false; 1875 1944 FReviewClick := false; … … 2144 2213 end; 2145 2214 2215 procedure TfrmFrame.pnlVisitMouseDown(Sender: TObject; Button: TMouseButton; 2216 Shift: TShiftState; X, Y: Integer); 2217 { emulate a button press in the encounter panel } 2218 begin 2219 if User.IsReportsOnly then 2220 exit; 2221 if pnlVisit.BevelOuter = bvLowered then exit; 2222 pnlVisit.BevelOuter := bvLowered; 2223 //with lblStLocation do SetBounds(Left+2, Top+2, Width, Height); 2224 with lblPtLocation do SetBounds(Left+2, Top+2, Width, Height); 2225 with lblPtProvider do SetBounds(Left+2, Top+2, Width, Height); 2226 end; 2227 2228 procedure TfrmFrame.pnlVisitMouseUp(Sender: TObject; Button: TMouseButton; 2229 Shift: TShiftState; X, Y: Integer); 2230 { emulate a button raising in the encounter panel and call Update Provider/Location } 2231 begin 2232 if User.IsReportsOnly then 2233 exit; 2234 if pnlVisit.BevelOuter = bvRaised then exit; 2235 pnlVisit.BevelOuter := bvRaised; 2236 //with lblStLocation do SetBounds(Left-2, Top-2, Width, Height); 2237 with lblPtLocation do SetBounds(Left-2, Top-2, Width, Height); 2238 with lblPtProvider do SetBounds(Left-2, Top-2, Width, Height); 2239 end; 2240 2241 procedure TfrmFrame.pnlVistaWebClick(Sender: TObject); 2242 begin 2243 inherited; 2244 uUseVistaWeb := true; 2245 pnlVistaWeb.BevelOuter := bvLowered; 2246 pnlCIRNClick(self); 2247 uUseVistaWeb := false; 2248 end; 2249 2250 procedure TfrmFrame.pnlVistaWebMouseDown(Sender: TObject; Button: TMouseButton; 2251 Shift: TShiftState; X, Y: Integer); 2252 begin 2253 inherited; 2254 pnlVistaWeb.BevelOuter := bvLowered; 2255 end; 2256 2257 procedure TfrmFrame.pnlVistaWebMouseUp(Sender: TObject; Button: TMouseButton; 2258 Shift: TShiftState; X, Y: Integer); 2259 begin 2260 inherited; 2261 pnlVistaWeb.BevelOuter := bvRaised; 2262 end; 2263 2146 2264 procedure TfrmFrame.pnlPrimaryCareMouseDown(Sender: TObject; 2147 2265 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 2148 2266 begin 2267 if pnlPrimaryCare.BevelOuter = bvLowered then exit; 2149 2268 pnlPrimaryCare.BevelOuter := bvLowered; 2150 2269 with lblPtCare do SetBounds(Left+2, Top+2, Width, Height); … … 2155 2274 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 2156 2275 begin 2276 if pnlPrimaryCare.BevelOuter = bvRaised then exit; 2157 2277 pnlPrimaryCare.BevelOuter := bvRaised; 2158 2278 with lblPtCare do SetBounds(Left-2, Top-2, Width, Height); … … 2164 2284 { emulate a button press in the postings panel } 2165 2285 begin 2286 if pnlPostings.BevelOuter = bvLowered then exit; 2166 2287 pnlPostings.BevelOuter := bvLowered; 2167 2288 with lblPtPostings do SetBounds(Left+2, Top+2, Width, Height); … … 2173 2294 { emulate a button raising in the posting panel and call Postings } 2174 2295 begin 2296 if pnlPostings.BevelOuter = bvRaised then exit; 2175 2297 pnlPostings.BevelOuter := bvRaised; 2176 2298 with lblPtPostings do SetBounds(Left-2, Top-2, Width, Height); … … 2200 2322 SetUserColumns(TControl(frmMeds.hdrMedsIn)); // still need conversion 2201 2323 SetUserColumns(TControl(frmMeds.hdrMedsOut)); 2324 SetUserString('frmPtSel.lstvAlerts',EnduringPtSelColumns); 2325 SetUserString(SpellCheckerSettingName, SpellCheckerSettings); 2202 2326 SetUserBounds2(TemplateEditorSplitters, tmplEditorSplitterMiddle, 2203 2327 tmplEditorSplitterProperties, tmplEditorSplitterMain, tmplEditorSplitterBoil); … … 2212 2336 frmDCSumm.Drawers.LastOpenSize := s3; 2213 2337 2214 with frmMeds do 2338 with frmMeds do 2215 2339 begin 2216 2340 SetUserBounds2(frmMeds.Name+'Split', panelBottom, panelMedIn, Dummy, Dummy); … … 2272 2396 Add(StrUserColumns(frmMeds.hdrMedsIn)); 2273 2397 Add(StrUserColumns(frmMeds.hdrMedsOut)); 2398 Add(StrUserString(SpellCheckerSettingName, SpellCheckerSettings)); 2274 2399 Add(StrUserBounds2(TemplateEditorSplitters, tmplEditorSplitterMiddle, 2275 2400 tmplEditorSplitterProperties, tmplEditorSplitterMain, tmplEditorSplitterBoil)); … … 2308 2433 if EnduringPtSelSplitterPos <> 0 then 2309 2434 Add(StrUserBounds2('frmPtSel.sptVert', EnduringPtSelSplitterPos, 0, 0, 0)); 2435 if EnduringPtSelColumns <> '' then 2436 Add('C^frmPtSel.lstvAlerts^' + EnduringPtSelColumns); 2310 2437 end; 2311 2438 //Add sizes for forms that used SaveUserBounds() to save thier positions … … 2381 2508 with lblCIRN do Font.Size := NewFontSize; 2382 2509 with lblVistaWeb do Font.Size := NewFontSize; 2383 with lstCIRNLocations do Font.Size := NewFontSize; 2510 with lstCIRNLocations do 2511 begin 2512 Font.Size := NewFontSize; 2513 ItemHeight := NewFontSize + 6; 2514 end; 2384 2515 with tabPage do Font.Size := NewFontSize; 2385 2516 with laMHV do Font.Size := NewFontSize; //VAA … … 2445 2576 { resizes and repositions the panels & labels used in the toolbar } 2446 2577 const 2447 { TODO -oRV -cWVEHR Long Age : Change to 40, to fit long age } 2448 //PATIENT_WIDTH = 29; 2449 PATIENT_WIDTH = 40; 2450 {} 2578 PATIENT_WIDTH = 29; 2451 2579 VISIT_WIDTH = 36; 2452 2580 POSTING_WIDTH = 11.5; 2453 2581 FLAG_WIDTH = 5; 2582 CV_WIDTH = 15; //14; WAT 2454 2583 CIRN_WIDTH = 11; 2455 2584 MHV_WIDTH = 6; 2456 { TODO -oRV -cWVEHR Long Age : Change to 3 lines high, to fit long age } 2457 //LINES_HIGH = 2; 2458 LINES_HIGH = 3; 2459 {} 2585 LINES_HIGH = 2; 2460 2586 M_HORIZ = 4; 2461 2587 M_MIDDLE = 2; … … 2466 2592 //WidthNeeded: integer; 2467 2593 begin 2468 // 2469 { TODO -oRV -cWVEHR Long Age : Changed to fit long age } 2470 pnlToolbar.Height := (LINES_HIGH * lblPtName.Height) + M_HORIZ + M_MIDDLE + M_HORIZ + M_HORIZ; 2471 //pnlToolbar.Height := (LINES_HIGH * lblPtName.Height) + M_HORIZ + M_MIDDLE + M_HORIZ; 2472 // 2594 pnlToolbar.Height := (LINES_HIGH * lblPtName.Height) + M_HORIZ + M_MIDDLE + M_HORIZ; 2473 2595 pnlPatient.Width := HigherOf(PATIENT_WIDTH * MainFontWidth, lblPtName.Width + (M_WVERT * 2)); 2474 2596 lblPtSSN.Top := M_HORIZ + lblPtName.Height + M_MIDDLE; 2475 // 2476 { TODO -oRV -cWVEHR Long Age : Changed to fit long age } 2477 lblPtAge.Top := lblPtSSN.Top + lblPtSSN.Height + M_MIDDLE; 2478 lblPtAge.Left := lblPtSSN.Left; 2479 //lblPtAge.Top := lblPtSSN.Top; 2480 //lblPtAge.Left := pnlPatient.Width - lblPtAge.Width - M_WVERT; 2481 // 2597 lblPtAge.Top := lblPtSSN.Top; 2598 lblPtAge.Left := pnlPatient.Width - lblPtAge.Width - M_WVERT; 2482 2599 pnlVisit.Width := HigherOf(LowerOf(VISIT_WIDTH * MainFontWidth, 2483 2600 HigherOf(lblPtProvider.Width + (M_WVERT * 2), … … 2487 2604 lblPtAttending.Top := lblPtSSN.Top; 2488 2605 pnlPostings.Width := Round(POSTING_WIDTH * MainFontWidth); 2489 pnlFlag.Width := Round(FLAG_WIDTH * MainFontWidth); 2490 pnlFlag.Width := Round(FLAG_WIDTH * MainFontWidth); 2606 if btnCombatVet.Visible then 2607 begin 2608 pnlCVnFlag.Width := Round(CV_WIDTH * MainFontWidth); 2609 pnlFlag.Width := Round(CV_WIDTH * MainFontWidth); 2610 btnCombatVet.Height := Round(pnlCVnFlag.Height div 2); 2611 end 2612 else 2613 begin 2614 pnlCVnFlag.Width := Round(FLAG_WIDTH * MainFontWidth); 2615 pnlFlag.Width := Round(FLAG_WIDTH * MainFontWidth); 2616 end; 2491 2617 pnlRemoteData.Width := Round(CIRN_WIDTH * MainFontWidth) + M_WVERT; 2492 2618 pnlVistaWeb.Height := pnlRemoteData.Height div 2; … … 2561 2687 else if FEditCtrl is TRichEdit then IsReadOnly := TRichEdit(FEditCtrl).ReadOnly 2562 2688 else IsReadOnly := True; 2563 mnuEditUndo.Enabled := FEditCtrl.Perform(EM_CANUNDO, 0, 0) <> 0; 2689 2690 mnuEditRedo.Enabled := FEditCtrl.Perform(EM_CANREDO, 0, 0) <> 0; 2691 mnuEditUndo.Enabled := (FEditCtrl.Perform(EM_CANUNDO, 0, 0) <> 0) and (FEditCtrl.Perform(EM_CANREDO, 0, 0) = 0); 2692 2564 2693 mnuEditCut.Enabled := FEditCtrl.SelLength > 0; 2565 2694 mnuEditCopy.Enabled := mnuEditCut.Enabled; … … 2578 2707 FEditCtrl.Perform(EM_UNDO, 0, 0); 2579 2708 end; 2709 2710 procedure TfrmFrame.mnuEditRedoClick(Sender: TObject); 2711 begin 2712 FEditCtrl.Perform(EM_REDO, 0, 0); 2713 end; 2714 2580 2715 2581 2716 procedure TfrmFrame.mnuEditCutClick(Sender: TObject); … … 2779 2914 lblCIRN.Caption := ' Remote Data'; 2780 2915 lblCIRN.Alignment := taCenter; 2916 pnlVistaWeb.BevelOuter := bvRaised; 2781 2917 if RemoteDataExists and (RemoteSites.Count > 0) then 2782 2918 begin … … 2787 2923 lblCIRN.Caption := 'Remote Data'; 2788 2924 pnlCIRN.Hint := 'Click to display other facilities having data for this patient.'; 2925 lblVistaWeb.Font.Color := Get508CompliantColor(clBlue); 2926 pnlVistaWeb.Hint := 'Click to go to VistaWeb to see data from other facilities for this patient.'; 2789 2927 if RemoteSites.Count > 0 then 2790 2928 lstCIRNLocations.Items.Add('0' + U + 'All Available Sites'); … … 2799 2937 begin 2800 2938 lblCIRN.Font.Color := clWindowText; 2939 lblVistaWeb.Font.Color := clWindowText; 2801 2940 lblCIRN.Enabled := False; 2802 2941 pnlCIRN.TabStop := False; … … 3028 3167 TRemoteSite(Items[j])); 3029 3168 end; 3030 3031 if frmReports.tvReports.SelectionCount > 0 then frmReports.tvReportsClick(self); 3032 if frmLabs.tvReports.SelectionCount > 0 then frmLabs.tvReportsClick(self); 3169 //uReportID, uLabRepID = Report ID's set when report is selected (from file 101.24) 3170 if not(Piece(uReportID,':',1) = 'OR_VWAL') 3171 and not(Piece(uReportID,':',1) = 'OR_VWRX') 3172 and not(Piece(uReportID,':',1) = 'OR_VWVS') 3173 and (frmReports.tvReports.SelectionCount > 0) then frmReports.tvReportsClick(self); 3174 if not(uLabRepID = '6:GRAPH') and not(uLabRepID = '5:WORKSHEET') 3175 and not(uLabRepID = '4:SELECTED TESTS BY DATE') 3176 and (frmLabs.tvReports.SelectionCount > 0) then frmLabs.tvReportsClick(self); 3033 3177 //if frmLabs.lstReports.ItemIndex > -1 then frmLabs.ExtlstReportsClick(self, true); 3034 3178 StatusText(''); … … 3062 3206 CurrPrt: string; 3063 3207 begin 3064 CurrPrt := SelectDevice(Self, Encounter.Location, True, '');3208 CurrPrt := SelectDevice(Self, Encounter.Location, True, 'Print Device Selection'); 3065 3209 User.CurrentPrinter := Piece(CurrPrt, U, 1); 3066 3210 end; … … 3068 3212 procedure TfrmFrame.lstCIRNLocationsChange(Sender: TObject); 3069 3213 begin 3070 if lstCIRNLocations.ItemIndex > 0 then3214 {if lstCIRNLocations.ItemIndex > 0 then 3071 3215 if (lstCIRNLocations.Selected[lstCIRNLocations.ItemIndex] = true) and (uUpdateStat = false) then 3072 3216 if not (piece(lstCIRNLocations.Items[1],'^',1) = '0') then 3073 3217 lstCIRNLocations.OnClick(nil); 3218 // Causing Access Violations} 3074 3219 end; 3075 3220 … … 3158 3303 begin 3159 3304 FRefreshing := TRUE; 3160 3161 3305 try 3162 3306 mnuFileOpenClick(Self); 3163 3307 finally 3164 3308 FRefreshing := FALSE; 3309 OrderPrintForm := FALSE; 3165 3310 end; 3166 3311 end; … … 3171 3316 FOldActivate(Sender); 3172 3317 SetActiveWindow(Application.Handle); 3173 if ScreenReaderSystemActive and assigned(Patient) and (Patient.Name <> '') then3318 if ScreenReaderSystemActive and assigned(Patient) and (Patient.Name <> '') and (Patient.Status <> '') then 3174 3319 SpeakTabAndPatient; 3175 3320 end; … … 3327 3472 uCore.TempEncounterDateTime := 0; 3328 3473 uCore.TempEncounterVistCat := #0; 3329 //ucore.TempOutEncounterLoc := 0;3330 //uCore.TempOutEncounterLocName := '';3331 3474 if (not FRefreshing) and (FReviewClick = false) then DoNotChangeEncWindow := false; 3332 3475 if (FPrevInPatient and Patient.Inpatient) then //transfering inside hospital 3333 3476 begin 3334 // if DoNotChangeEncWindow = false then3335 // begin3336 3477 if FReviewClick = True then 3337 3478 begin … … 3354 3495 Exit; 3355 3496 end; 3356 3357 //end; 3358 Encounter.Location := Patient.Location; 3359 // end; 3497 if orderprintform = false then Encounter.Location := Patient.Location; 3360 3498 end 3361 3499 else if (FPrevInPatient and (not Patient.Inpatient)) then //patient was discharged … … 3364 3502 Encounter.Location := 0; 3365 3503 FPrevInPatient := False; 3504 lblPtName.Caption := ''; 3505 lblPtName.Caption := Patient.Name + Patient.Status; //CQ #17491: Refresh patient status indicator in header bar on discharge. 3366 3506 end 3367 3507 else if ((not FPrevInPatient) and Patient.Inpatient) then //patient was admitted … … 3373 3513 uCore.TempEncounterDateTime := Encounter.DateTime; 3374 3514 uCore.TempEncounterVistCat := Encounter.VisitCategory; 3375 if (FReviewClick = False) and (encounter.Location <> patient.Location) then 3376 frmPrintLocation.SwitchEncounterLoction(Encounter.Location, Encounter.locationName, Encounter.LocationText, 3377 Encounter.DateTime, Encounter.VisitCategory) 3515 lblPtName.Caption := ''; 3516 lblPtName.Caption := Patient.Name + Patient.Status; //CQ #17491: Refresh patient status indicator in header bar on admission. 3517 if (FReviewClick = False) and (encounter.Location <> patient.Location) and (OrderPrintForm = false) then 3518 begin 3519 frmPrintLocation.SwitchEncounterLoction(Encounter.Location, Encounter.locationName, Encounter.LocationText, 3520 Encounter.DateTime, Encounter.VisitCategory); 3521 //agp values are reset depending on the user process 3522 uCore.TempEncounterLoc := 0; //hds7591 Clinic/Ward movement. 3523 uCore.TempEncounterLocName := ''; //hds7591 Clinic/Ward movement. 3524 uCore.TempEncounterText := ''; 3525 uCore.TempEncounterDateTime := 0; 3526 uCore.TempEncounterVistCat := #0; 3527 end 3378 3528 else 3379 //if DoNotChangeEncWindow= false then3529 if OrderPrintForm = false then 3380 3530 begin 3381 3531 Encounter.Location := Patient.Location; … … 3463 3613 procedure TfrmFrame.pnlPatientClick(Sender: TObject); 3464 3614 begin 3615 Screen.Cursor := crHourglass; //wat cq 18425 added hourglass and disabled mnuFileOpen 3616 mnuFileOpen.Enabled := False; 3617 try 3465 3618 pnlPatient.Enabled := false; 3466 3619 ViewInfo(mnuViewDemo); 3467 3620 pnlPatient.Enabled := true; 3621 finally 3622 Screen.Cursor := crDefault; 3623 mnuFileOpen.Enabled := True; 3624 end; 3468 3625 end; 3469 3626 3470 3627 procedure TfrmFrame.pnlVisitClick(Sender: TObject); 3471 3628 begin 3472 pnlVisit.Enabled := false; 3473 pnlVisit.BevelOuter := bvLowered; 3474 with lblPtLocation do SetBounds(Left+2, Top+2, Width, Height); 3475 with lblPtProvider do SetBounds(Left+2, Top+2, Width, Height); 3476 3629 //if (not User.IsReportsOnly) then // Reports Only tab. 3630 // mnuFileEncounterClick(Self); 3477 3631 ViewInfo(mnuViewVisits); 3478 3479 pnlVisit.BevelOuter := bvRaised;3480 with lblPtLocation do SetBounds(Left-2, Top-2, Width, Height);3481 with lblPtProvider do SetBounds(Left-2, Top-2, Width, Height);3482 pnlVisit.Enabled := true;3483 end;3484 3485 procedure TfrmFrame.pnlVistaWebClick(Sender: TObject);3486 begin3487 inherited;3488 uUseVistaWeb := true;3489 pnlCIRNClick(self);3490 uUseVistaWeb := false;3491 end;3492 3493 procedure TfrmFrame.pnlVistaWebMouseDown(Sender: TObject; Button: TMouseButton;3494 Shift: TShiftState; X, Y: Integer);3495 begin3496 inherited;3497 pnlVistaWeb.BevelOuter := bvLowered;3498 end;3499 3500 procedure TfrmFrame.pnlVistaWebMouseUp(Sender: TObject; Button: TMouseButton;3501 Shift: TShiftState; X, Y: Integer);3502 begin3503 inherited;3504 pnlVistaWeb.BevelOuter := bvRaised;3505 3632 end; 3506 3633 … … 4179 4306 pnlFlag.BevelInner := bvRaised; 4180 4307 pnlFlag.BevelOuter := bvNone; 4181 pnlFlag.BevelWidth := 4;4308 pnlFlag.BevelWidth := 3; 4182 4309 end; 4183 4310 … … 4187 4314 pnlFlag.BevelInner := bvNone; 4188 4315 pnlFlag.BevelOuter := bvRaised; 4316 end; 4317 4318 procedure TfrmFrame.tabPageMouseDown(Sender: TObject; Button: TMouseButton; 4319 Shift: TShiftState; X, Y: Integer); 4320 begin 4321 inherited; 4322 TabCtrlClicked := True; 4189 4323 end; 4190 4324 … … 4356 4490 ReportString: TStringList; 4357 4491 aAddress: string; 4358 4359 4492 begin 4360 4493 case (Sender as TMenuItem).Tag of … … 4395 4528 if uUseVistaWeb = true then 4396 4529 begin 4397 pnlCIRN.BevelOuter := bvRaised;4398 4530 lblCIRN.Alignment := taCenter; 4399 4531 lstCIRNLocations.Visible := false; … … 4401 4533 aAddress := GetVistaWebAddress(Patient.DFN); 4402 4534 ShellExecute(pnlCirn.Handle, 'open', PChar(aAddress), PChar(''), '', SW_NORMAL); 4535 pnlCIRN.BevelOuter := bvRaised; 4403 4536 Exit; 4404 4537 end;
Note:
See TracChangeset
for help on using the changeset viewer.