Changeset 1679 for cprs/trunk/CPRS-Chart/fCover.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fCover.pas
r830 r1679 58 58 lst_3: TORListBox; 59 59 sptFlag: TSplitter; 60 VA508ComponentAccessibility1: TVA508ComponentAccessibility; 60 61 procedure CoverItemClick(Sender: TObject); 61 62 procedure timPollTimer(Sender: TObject); … … 136 137 RemID = '50'; 137 138 138 TX_INACTIVE_ CODE = 'This problem references an ICDcode that is not currently active.' + #13#10 +139 TX_INACTIVE_ICODE = 'This problem references an ICD-9-CM code that is not currently active.' + #13#10 + 139 140 'Please correct this code using the ''Problems'' tab.'; 140 TC_INACTIVE_CODE = 'Inactive ICD code'; 141 TC_INACTIVE_ICODE = 'Inactive ICD-9-CM code'; 142 TX_INACTIVE_SCODE = 'This problem references an SNOMED CT code that is not currently active.' + #13#10 + 143 'Please correct this code using the ''Problems'' tab.'; 144 TC_INACTIVE_SCODE = 'Inactive SNOMED CT code'; 141 145 142 146 var … … 412 416 i := ItemIndex; 413 417 if Piece(Items[ItemIndex], U, 13) = '#' then 414 InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK); 418 InfoBox(TX_INACTIVE_ICODE, TC_INACTIVE_ICODE, MB_ICONWARNING or MB_OK) 419 else if Piece(Items[ItemIndex], U, 13) = '$' then 420 InfoBox(TX_INACTIVE_SCODE, TC_INACTIVE_SCODE, MB_ICONWARNING or MB_OK); 415 421 ItemIndex := i; 416 422 ReportBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True); 423 lst_1.SetFocus; 417 424 end; 418 425 TAG_ALLG: … … 421 428 begin 422 429 if ARTPatchInstalled then 423 AllergyBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True, ItemIEN) 430 begin 431 AllergyBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True, ItemIEN); 432 lst_2.SetFocus; 433 //TDP - Fixed allergy form focus problem 434 if (frmARTAllergy <> nil) and frmARTAllergy.Showing then frmARTAllergy.SetFocus; 435 end 424 436 else 437 begin 425 438 ReportBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True); 439 lst_2.SetFocus; 440 end; 426 441 end; 427 442 TAG_POST: 428 443 if DisplayText[ItemIndex] = 'Allergies' then 429 ReportBox(DetailPosting('A'), DisplayText[ItemIndex], True) 444 begin 445 ReportBox(DetailPosting('A'), DisplayText[ItemIndex], True); 446 lst_3.SetFocus; 447 end 430 448 else if ItemID <> '' then 431 449 begin 432 450 NotifyOtherApps(NAE_REPORT, 'TIU^' + ItemID); 433 451 ReportBox(DetailPosting(ItemID), DisplayText[ItemIndex], True); 452 lst_3.SetFocus; 434 453 end; 435 454 TAG_MEDS: 436 455 if (ItemID <> '') and (ItemID <> '0') then 456 begin 437 457 ReportBox(DetailMed(ItemID), DisplayText[ItemIndex], True); 458 lst_4.SetFocus; 459 end; 438 460 TAG_RMND: 439 461 if ItemIEN > 0 then 462 begin 440 463 ReportBox(DetailReminder(ItemIEN), ClinMaintText + ': ' + DisplayText[ItemIndex], True); 464 lst_5.SetFocus; 465 end; 441 466 TAG_LABS: 442 467 if (ItemID <> '') and (Piece(ItemID,';',1) <> '0') and (not ContainsAlpha(Piece(ItemID,';',1))) then 468 begin 443 469 ReportBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True); 470 lst_6.SetFocus; 471 end; 444 472 TAG_VITL: 445 473 if ItemID <> '' then 446 474 begin 447 // frmFrame.DLLActive := True; 475 //agp prevent double clicking on Vitals which can cause CPRS to shut down when exiting vitals 476 TORListBox(Sender).Enabled := false; 448 477 SelectVitals(Piece(DisplayText[ItemIndex],Char(9),1)); //Char(9) = Tab Character 449 // frmFrame.DLLActive := False;450 478 ClearPtData; 479 //agp set InitialRemindersLoaded to False only if reminders are still evaluating. This prevent 480 //a problem with reminders not finishing the evaluation if the Vital DLL is launch and it prevent 481 //an automatic re-evaluation of reminders if reminders are done evaluating. 482 if RemindersEvaluatingInBackground = true then InitialRemindersLoaded := False; 451 483 DisplayPage; 484 TORListBox(Sender).Enabled := True; 485 lst_7.SetFocus; 452 486 end; 453 487 454 488 TAG_VSIT: 455 489 if (ItemID <> '') and (ItemID <> '0') then 490 begin 456 491 ReportBox(DetailGeneric(ItemIEN, ItemID, aDetail), DisplayText[ItemIndex], True); 492 lst_8.SetFocus; 493 end 457 494 else 458 495 //don't try to display a detail report … … 643 680 if(RemindersEvaluatingInBackground) then 644 681 lb.Items.Insert(0,'0^Evaluating Reminders...') 645 else 646 if(lb.Items.Count = 0) and (RemindersStarted) then 647 lb.Items.Add(NoDataText(TRUE)); 682 //AGP added code below to change the reminder panel picture if the clock has not stop by this point. CQ 683 else if(lb.Items.Count = 0) and (RemindersStarted) then 684 begin 685 lb.Items.Add(NoDataText(TRUE)); 686 if frmFrame.anmtRemSearch.Visible = true then 687 begin 688 frmFrame.anmtRemSearch.Visible := FALSE; 689 frmFrame.imgReminder.Visible := TRUE; 690 frmFrame.imgReminder.Picture.Bitmap.LoadFromResourceName(hInstance, 'BMP_REMINDERS_APPLICABLE'); 691 frmFrame.anmtRemSearch.Active := FALSE; 692 end; 693 end 694 else if (lb.Items.Count > 0) and (RemindersStarted) and (frmFrame.anmtRemSearch.Visible = true) then 695 begin 696 frmFrame.anmtRemSearch.Visible := FALSE; 697 frmFrame.imgReminder.Visible := TRUE; 698 frmFrame.imgReminder.Picture.Bitmap.LoadFromResourceName(hInstance, 'BMP_REMINDERS_DUE'); 699 frmFrame.anmtRemSearch.Active := FALSE; 700 end; 648 701 end; 649 702 end; … … 778 831 NEW_ALLERGY = True; 779 832 ENTERED_IN_ERROR = True; 780 var 781 Changed: boolean; 782 begin 783 inherited; 784 Changed := EnterEditAllergy(0, NEW_ALLERGY, not ENTERED_IN_ERROR); 785 if Changed then UpdateAllergiesList; 833 begin 834 inherited; 835 EnterEditAllergy(0, NEW_ALLERGY, not ENTERED_IN_ERROR); 786 836 end; 787 837 … … 805 855 806 856 procedure TfrmCover.popEnteredInErrorClick(Sender: TObject); 807 var 808 Changed: boolean; 809 begin 810 inherited; 811 Changed := MarkEnteredInError((popMenuAllergies.PopupComponent as TORListBox).ItemIEN); 812 if Changed then UpdateAllergiesList; 857 begin 858 inherited; 859 MarkEnteredInError((popMenuAllergies.PopupComponent as TORListBox).ItemIEN); 813 860 end; 814 861
Note:
See TracChangeset
for help on using the changeset viewer.