Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.pas

    r459 r460  
    8585    procedure btnDiagnosisClick(Sender: TObject);
    8686    procedure cmdQuitClick(Sender: TObject);
     87    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    8788
    8889  private
     
    9798    procedure SetupReasonForRequest(OrderAction: integer);
    9899    procedure GetProvDxandValidateCode(AResponses: TResponses);
    99     function  ShowPrerequisites: boolean;
     100    function ShowPrerequisites: boolean;
    100101    procedure DoSetFontSize(FontSize: integer);
    101102    procedure SetUpQuickOrderDX;
     
    106107    procedure Validate(var AnErrMsg: string); override;
    107108    function DefaultReasonForRequest(Service: string; Resolve: Boolean): TStrings;
     109   
    108110  public
    109111    procedure SetupDialog(OrderAction: Integer; const ID: string); override;
     
    123125uses
    124126    rODBase, rConsults, uCore, uConsults, rCore, fConsults, fPCELex, rPCE, fPreReq,
    125     ORClasses, clipbrd, uTemplates;
     127    ORClasses, clipbrd, uTemplates, fFrame, uODBase;
    126128
    127129var
     
    131133  BADxUpdated: boolean;
    132134  quickCode: string;
    133  
     135
    134136
    135137
     
    153155procedure TfrmODCslt.FormCreate(Sender: TObject);
    154156begin
     157  frmFrame.pnlVisit.Enabled := false;
    155158  AutoSizeDisabled := True;
    156159  inherited;
     
    223226  cboService.Enabled := True;
    224227  cboService.Font.Color := clWindowText;
     228  cboService.Height := 25 + (7 * cboService.ItemHeight);
    225229  btnServiceTree.Enabled := True;
     230  pnlServiceTreeButton.Enabled := True;
    226231  ActiveControl := cboService;
    227232  SetProvDiagPromptingMode;
     
    271276      cboService.Font.Color := clGrayText;
    272277      btnServiceTree.Enabled := False;
     278      pnlServiceTreeButton.Enabled := False;
    273279      if (OrderAction in [ORDER_COPY, ORDER_QUICK]) and (not ShowPrerequisites) then
    274280        begin
     
    286292    begin
    287293      if QuickList.Count > 0 then BuildQuickTree(QuickList, '0', nil) ;
    288       //SvcList.Assign(LoadServiceList(CN_SVC_LIST_ORD))   ;
    289294      SvcList.Assign(LoadServiceListWithSynonyms(CN_SVC_LIST_ORD));           {RV}
    290295      AList.Assign(SvcList);
     
    512517        cboService.Font.Color := clGrayText;
    513518        btnServiceTree.Enabled := False;
     519        pnlServiceTreeButton.Enabled := False;
    514520        Changing := False;
    515521      end;
     
    645651 begin
    646652 inherited;
    647 
    648  //if NOT BILLING_AWARE then
    649     if treService.Selected <> nil then
    650        LastNode := treService.Selected.AbsoluteIndex;
     653 if treService.Selected <> nil then
     654    LastNode := treService.Selected.AbsoluteIndex;
    651655
    652656 if  BILLING_AWARE and CIDCOkToSave  then
     
    657661       begin
    658662          uBACore.CompleteConsultOrderRec(uBAGlobals.BAOrderID,UBAGlobals.BAConsultDxList);
    659        //   if ProvDx.Reqd = 'R' then UBAGlobals.BAConsultOrdersRequireDx.Add(uBAGlobals.BAOrderID); //allow special handling of non cidc consults that require dx .
    660663          uBAGlobals.BAConsultDxList.Clear;
    661664       end;
     
    743746          Font.Color := clGrayText;
    744747          btnServiceTree.Enabled := False;
     748          pnlServiceTreeButton.Enabled := False;
    745749          Changing := False;
    746750          with Responses do if QuickOrder > 0 then
     
    945949  with ProvDx do if (Reqd = '') or (PromptMode = '') then Exit;
    946950  if ProvDx.Reqd = 'R' then
    947     lblProvDiag.Caption := TX_PROVDX_REQD
     951  begin
     952    lblProvDiag.Caption := TX_PROVDX_REQD;
     953    if (BILLING_AWARE)  and (ProvDx.PromptMode[1] = '') then btnDiagnosis.Enabled := True;
     954  end
    948955  else
    949956    lblProvDiag.Caption := TX_PROVDX_OPT;
     
    10661073                  Result := False;
    10671074                  AbortOrder := True;
    1068                   //cmdQuitClick(Self);
    1069                 end
     1075               end
    10701076              else Result := True;
    10711077            end;
     
    10761082end;
    10771083
    1078 ////////// NOTE THIS FUNCTION IS NO LONGER ASSIGNED TO OnExit EVENT
    1079 ///////// Calling this with enter making a selection had serious errors
    1080 ///////// No ill effect can be seen for not calling it.
    10811084procedure TfrmODCslt.cboServiceExit(Sender: TObject);
    10821085begin
     
    10861089  if cboService.ItemID = FLastServiceID then Exit;
    10871090  cboServiceSelect(cboService);
    1088   cboService.SetFocus;
     1091  // CQ #7490, following line commented out v26.24 (RV)
     1092  // CQ #9610 and 10074 - uncommented and "if" added v26.54 (RV)
     1093  if cboService.Enabled then cboService.SetFocus;
    10891094  PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
    10901095end;
     
    11411146  TmpSL: TStringList;
    11421147  DocInfo: string;
    1143 
    1144 begin
     1148  x: string;
     1149  HasObjects: boolean;
     1150begin
     1151  Resolve := FALSE ;  // override value passed in - resolve on client - PSI-05-093
    11451152  DocInfo := '';
    11461153  TmpSL := TStringList.Create;
     
    11481155    Result := GetDefaultReasonForRequest(Service + CSLT_PTR, Resolve);
    11491156    TmpSL.Assign(Result);
     1157    x := TmpSL.Text;
     1158    ExpandOrderObjects(x, HasObjects);
     1159    TmpSL.Text := x;
     1160    Responses.OrderContainsObjects := HasObjects;
    11501161    ExecuteTemplateOrBoilerPlate(TmpSL, cboService.ItemIEN , ltConsult, nil, 'Reason for Request: ' + cboService.DisplayText[cboService.ItemIndex], DocInfo);
     1162    if TmpSL.Text <> x then Responses.OrderContainsObjects := False;
    11511163    Result.Assign(TmpSL);
    11521164  finally
     
    12841296  //Except when Enter or Space is pressed. VK_LBUTTON activates OnClick in TORComboBoxes
    12851297  FcboServiceKeyDownStopClick := false;
    1286   if (Key <> VK_RETURN) and (Key <> VK_SPACE) and (Key <> VK_LBUTTON) then
     1298  if (Key <> VK_RETURN) {and (Key <> VK_SPACE)} and (Key <> VK_LBUTTON) then  //comment on this line is fix for CQ6789
    12871299    FcboServiceKeyDownStopClick := True
    12881300  else
     
    13331345     end;
    13341346  end;
     1347
    13351348  ProvDx.CodeInactive := False;
    13361349end;
     
    13871400end;
    13881401
     1402procedure TfrmODCslt.FormClose(Sender: TObject; var Action: TCloseAction);
     1403begin
     1404  inherited;
     1405  frmFrame.pnlVisit.Enabled := true;
     1406end;
     1407
    13891408end.
    13901409
Note: See TracChangeset for help on using the changeset viewer.