Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.pas
r459 r460 162 162 popNoteMemoInsTemplate: TMenuItem; 163 163 popNoteMemoEncounter: TMenuItem; 164 mnuViewInformation: TMenuItem; 165 mnuViewDemo: TMenuItem; 166 mnuViewVisits: TMenuItem; 167 mnuViewPrimaryCare: TMenuItem; 168 mnuViewMyHealtheVet: TMenuItem; 169 mnuInsurance: TMenuItem; 170 mnuViewFlags: TMenuItem; 171 mnuViewReminders: TMenuItem; 172 mnuViewRemoteData: TMenuItem; 173 mnuViewPostings: TMenuItem; 164 174 procedure mnuChartTabClick(Sender: TObject); 165 175 procedure lstConsultsClick(Sender: TObject); … … 267 277 procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, 268 278 Y: Integer); 279 procedure ViewInfo(Sender: TObject); 280 procedure mnuViewInformationClick(Sender: TObject); 269 281 private 270 282 FEditingIndex: Integer; // TIU index of document being currently edited … … 296 308 procedure frmDrawerPnlEncounterButtonExit(Sender: TObject); 297 309 procedure frmDrawerEdtSearchExit(Sender: TObject); 298 procedure DoAutoSave ;310 procedure DoAutoSave(Suppress: integer = 1); 299 311 function GetTitleText(AnIndex: Integer): string; 300 312 //function MakeTitleText(IsAddendum: Boolean = False): string; … … 870 882 lstNotesClick(Self); // will make pnlWrite visible 871 883 if timAutoSave.Interval <> 0 then EnableAutosave := TRUE; 872 873 if txtSubject.Visible then 874 txtSubject.SetFocus 875 else 876 memResults.SetFocus; 884 if txtSubject.Visible then txtSubject.SetFocus else memResults.SetFocus; 877 885 end 878 886 else // CreatedNote.ErrorText <> '' … … 947 955 else HaveRequired := True; 948 956 // lock the consult request if there is a consult 949 if FEditNote.PkgIEN > 0 then HaveRequired := LockConsultRequest(FEditNote.PkgIEN); 957 if HaveRequired and (FEditNote.PkgIEN > 0) then 958 HaveRequired := LockConsultRequest(FEditNote.PkgIEN); 950 959 if HaveRequired then 951 960 begin … … 1529 1538 CompleteConsult(IS_ID_CHILD, 0, UseClinProcTitles); 1530 1539 end 1531 else if NoteIEN = -1 then Exit ;1540 else if NoteIEN = -1 then Exit 1532 1541 end; 1533 1542 … … 2003 2012 procedure TfrmConsults.SaveSignItem(const ItemID, ESCode: string); 2004 2013 { saves and optionally signs a progress note or addendum } 2014 const 2015 SIG_COSIGN = 'COSIGNATURE'; 2016 SIG_SIGN = 'SIGNATURE'; 2005 2017 var 2006 2018 AnIndex, IEN, i: Integer; 2007 2019 Saved, ContinueSign: Boolean; {*RAB* 8/26/99} 2008 SignSts: TActionRec;2020 ActionSts, SignSts: TActionRec; 2009 2021 APCEObject: TPCEData; 2010 2022 OK: boolean; … … 2012 2024 tmpNode: TORTreeNode; 2013 2025 ErrMsg: string; 2026 ActionType, SignTitle: string; 2014 2027 begin 2015 2028 AnIndex := -1; … … 2039 2052 if Length(ESCode) > 0 then 2040 2053 begin 2041 (* if LacksClinProcFieldsForSignature(IEN, ErrMsg) then 2042 begin 2043 InfoBox(ErrMsg, TC_CLIN_PROC, MB_OK); 2044 ContinueSign := False; 2045 end 2046 else ContinueSign := True; 2047 if not LastSaveClean(IEN) and 2048 (InfoBox(TX_ABSAVE, TC_ABSAVE, MB_YESNO or MB_DEFBUTTON2) <> IDYES) 2049 then ContinueSign := False; 2050 //else ContinueSign := True;*) 2051 if LacksClinProcFieldsForSignature(IEN, ErrMsg) then 2054 if CosignDocument(IEN) then 2055 begin 2056 SignTitle := TX_COSIGN; 2057 ActionType := SIG_COSIGN; 2058 end else 2059 begin 2060 SignTitle := TX_SIGN; 2061 ActionType := SIG_SIGN; 2062 end; 2063 ActOnDocument(ActionSts, IEN, ActionType); 2064 if not ActionSts.Success then 2065 begin 2066 InfoBox(ActionSts.Reason, TX_IN_AUTH, MB_OK); 2067 ContinueSign := False; 2068 end 2069 else if LacksClinProcFieldsForSignature(IEN, ErrMsg) then 2052 2070 begin 2053 2071 InfoBox(ErrMsg, TC_CLIN_PROC, MB_OK); … … 2063 2081 then ContinueSign := False 2064 2082 else ContinueSign := True; 2065 2066 2083 if ContinueSign then 2067 2084 begin … … 2753 2770 begin 2754 2771 inherited; 2755 DoAutoSave ;2772 DoAutoSave(0); 2756 2773 timAutoSave.Enabled := False; 2757 2774 try 2758 2775 SpellCheckForControl(memResults); 2759 2776 finally 2777 FChanged := True; 2778 DoAutoSave(0); 2760 2779 timAutoSave.Enabled := True; 2761 2780 end; … … 2765 2784 begin 2766 2785 inherited; 2767 DoAutoSave ;2786 DoAutoSave(0); 2768 2787 timAutoSave.Enabled := False; 2769 2788 try 2770 2789 GrammarCheckForControl(memResults); 2771 2790 finally 2791 FChanged := True; 2792 DoAutoSave(0); 2772 2793 timAutoSave.Enabled := True; 2773 2794 end; … … 2985 3006 SigAction: integer; 2986 3007 SavedDocID, SavedCsltID: string; 3008 ARefDate: TFMDateTime; 2987 3009 begin 2988 3010 inherited; … … 3017 3039 end; 3018 3040 3019 if not LockConsultRequestAndNote(lstNotes.ItemIEN) then Exit; 3020 Exclusions := GetCurrentSigners(lstNotes.ItemIEN); 3021 SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_CONSULTS); 3041 with lstNotes do 3042 begin 3043 if not LockConsultRequestAndNote(ItemIEN) then Exit; 3044 Exclusions := GetCurrentSigners(ItemIEN); 3045 ARefDate := StrToFloat(Piece(Items[ItemIndex], U, 3)); 3046 SelectAdditionalSigners(Font.Size, ItemIEN, SigAction, Exclusions, SignerList, CT_CONSULTS, ARefDate); 3047 end; 3022 3048 with SignerList do 3023 3049 begin … … 3556 3582 begin 3557 3583 if Title > 0 then CurTitle := Title else CurTitle := DocType; 3558 if AskCosignerForTitle(CurTitle, Author ) and (Cosigner <= 0) then Result := True;3584 if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True; 3559 3585 end; 3560 3586 end; … … 3572 3598 ErrMsg := TX_NO_AUTHOR; 3573 3599 end; 3574 if AskCosignerForTitle(Title, Author ) and (Cosigner = 0) then3600 if AskCosignerForTitle(Title, Author, DateTime) and (Cosigner = 0) then 3575 3601 begin 3576 3602 Result := True; … … 3665 3691 end; 3666 3692 3667 procedure TfrmConsults.DoAutoSave ;3693 procedure TfrmConsults.DoAutoSave(Suppress: integer = 1); 3668 3694 var 3669 3695 ErrMsg: string; … … 3672 3698 begin 3673 3699 StatusText('Autosaving note...'); 3674 //PutTextOnly(ErrMsg, mem NewNote.Lines, lstNotes.GetIEN(EditingIndex));3700 //PutTextOnly(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex)); 3675 3701 timAutoSave.Enabled := False; 3676 3702 try 3677 SetText(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex), 1);3703 SetText(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex), Suppress); 3678 3704 finally 3679 3705 timAutoSave.Enabled := True; … … 4682 4708 (Screen.ActiveControl = txtSubject) or 4683 4709 (Screen.ActiveControl = memResults) then 4684 //frmFrame.pnlPatient.SetFocus //COMMENTED OUT FOR CQ6498 4685 memResults.SetFocus //ADDED THIS LINE FOR CQ6498 4710 begin 4711 //frmFrame.pnlPatient.SetFocus //COMMENTED OUT FOR CQ6498 4712 if memResults.CanFocus then 4713 memResults.SetFocus //ADDED THIS LINE FOR CQ6498 4714 else 4715 memConsult.SetFocus; 4716 end 4686 4717 else 4687 4718 if (Screen.ActiveControl = tvConsults) then … … 4729 4760 {Below is a fix for ClearQuest Defect HDS0000948, Kind of Kloogy I looked 4730 4761 and looked for side effects and a better solution and this was the best!} 4731 frmDrawers.Hide; 4762 if (EditingIndex = -1) or (lstNotes.ItemIndex <> EditingIndex) then 4763 frmDrawers.Hide; 4732 4764 {This TStaticText I am looking for doesn't have a Name! So 4733 4765 I have to loop through the panel's controls and disable the TStaticText.} … … 4768 4800 end; 4769 4801 4802 procedure TfrmConsults.ViewInfo(Sender: TObject); 4803 begin 4804 inherited; 4805 frmFrame.ViewInfo(Sender); 4806 end; 4807 4808 procedure TfrmConsults.mnuViewInformationClick(Sender: TObject); 4809 begin 4810 inherited; 4811 mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled; 4812 mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled; 4813 mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled; 4814 mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No'); 4815 mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No'); 4816 mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled; 4817 mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled; 4818 mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled; 4819 mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled; 4820 end; 4821 4770 4822 initialization 4771 4823 uPCEEdit := TPCEData.Create;
Note:
See TracChangeset
for help on using the changeset viewer.