Procedure

TfrmODCslt.cboServiceSelect

Module

fODConsult

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmODCslt

Declaration

procedure cboServiceSelect(Sender: TObject);

Calls Hierarchy


TfrmODCslt.cboServiceSelect
 ├TfrmODCslt.setup508Label
 ├TResponses.Update
 │ ├TResponses.FindResponseByName
 │ └TResponses.IENForPrompt
 ├TfrmODBase.OrderMessage
 │ └TfrmODBase.ShowOrderMessage
 ├TResponses.SetQuickOrder
 │ ├TResponses.Clear
 │ └LoadResponses
 │   └ExtractToResponses
 │     └ExpandOrderObjects
 │       ├TdmodShared.BoilerplateOK
 │       │ ├ErrCount
 │       │ ├AddErr
 │       │ └TdmodShared.LoadTIUObjects
 │       │   └GetObjectList
 │       └GetTemplateText
 │         └TEncounter.GetVisitStr
 │           └TEncounter.GetVisitCategory
 ├TResponses.FindResponseByName
 ├TfrmODCslt.GetItemIndex
 ├TfrmODCslt.ShowPrerequisites
 │ ├GetServicePrerequisites
 │ └DisplayPrerequisites
 │   └CreateReportBox
 │     └TfrmBase508Form.Create
 │       ├TfrmBase508Form.UpdateAccessibilityActions
 │       ├UnfocusableControlEnter
 │       └AdjustControls
 │         ├TfrmBase508Form.ModifyUnfocusableControl
 │         └..(rec)..
 ├TResponses.SetControl
 │ ├TResponses.FindResponseByName
 │ └AssignBPText
 │   ├DisplayGroupToLinkType
 │   │ └DisplayGroupByName
 │   ├TResponses.EValueFor
 │   ├GetServiceIEN
 │   ├TResponses.IValueFor
 │   ├GetProcedureIEN
 │   ├ExpandOrderObjects...
 │   ├SetTemplateDialogCanceled
 │   ├CheckBoilerplate4Fields
 │   ├ExecuteTemplateOrBoilerPlate
 │   └WasTemplateDialogCanceled
 ├SetTemplateDialogCanceled
 ├WasTemplateDialogCanceled
 ├TfrmODCslt.SetupReasonForRequest
 │ ├TfrmODCslt.DefaultReasonForRequest
 │ │ ├GetDefaultReasonForRequest
 │ │ ├ExpandOrderObjects...
 │ │ ├WasTemplateDialogCanceled
 │ │ ├TemplateBPHasObjects
 │ │ └FastAssignWith508Msg
 │ │   └SpeakTextInserted
 │ ├ReasonForRequestEditable
 │ ├EnableReason
 │ └DisableReason
 ├TfrmODCslt.GetProvDxandValidateCode
 │ ├TResponses.FindResponseByName
 │ ├IsActiveICDCode
 │ │ └IsActiveCode
 │ └TfrmODCslt.SetUpCopyConsultDiagnoses
 │   ├IsOrderBillable
 │   │ └PrepOrderID
 │   └rpcRetrieveSelectedOrderInfo
 ├TfrmODCslt.DefaultReasonForRequest...
 ├TfrmODCslt.SetProvDiagPromptingMode
 │ ├GetProvDxMode
 │ └TfrmODCslt.ControlChange
 │   ├TResponses.Update...
 │   └TResponses.GetOrderText
 │     ├TResponses.NextInstance
 │     ├TResponses.FindResponseByName
 │     ├TResponses.FormatResponse
 │     │ └TResponses.FindResponseByIEN
 │     └TResponses.AppendChildren
 │       ├TResponses.FindPromptByIEN
 │       ├TResponses.FindResponseByIEN
 │       └TResponses.FormatResponse...
 ├ConsultMessage
 ├TfrmODCslt.ControlChange...
 └TfrmODCslt.SetUpEarliestDate
   ├IsProstheticsService
   └TResponses.Update...

Called-By Hierarchy


TfrmODCslt.cboServiceSelect
TfrmODCslt.cboServiceExit┘ 

Calls

Name Declaration Comments
ConsultMessage function ConsultMessage(AnIEN: Integer): string; -
TfrmODCslt.ControlChange procedure ControlChange(Sender: TObject); -
TfrmODCslt.DefaultReasonForRequest function DefaultReasonForRequest(Service: string; Resolve: Boolean): TStrings; -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -
TfrmODCslt.GetItemIndex function GetItemIndex(Service: String; Index: integer): integer; -
TfrmODCslt.GetProvDxandValidateCode procedure GetProvDxandValidateCode(AResponses: TResponses); -
TfrmODBase.OrderMessage procedure OrderMessage(const AMessage: string); -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -
TfrmODCslt.SetProvDiagPromptingMode procedure SetProvDiagPromptingMode; -
TResponses.SetQuickOrder procedure SetQuickOrder(AnIEN: Integer); -
SetTemplateDialogCanceled procedure SetTemplateDialogCanceled(value: Boolean); -
TfrmODCslt.setup508Label procedure setup508Label(lbl: TVA508StaticText; ctrl: TORComboBox); -
TfrmODCslt.SetUpEarliestDate procedure SetUpEarliestDate; -
TfrmODCslt.SetupReasonForRequest procedure SetupReasonForRequest(OrderAction: integer); -
TfrmODCslt.ShowPrerequisites function ShowPrerequisites: boolean; -
TResponses.Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); -
WasTemplateDialogCanceled function WasTemplateDialogCanceled: Boolean; -

Called-By

Name Declaration Comments
TfrmODCslt.cboServiceExit procedure cboServiceExit(Sender: TObject); -


Source

823   procedure TfrmODCslt.cboServiceSelect(Sender: TObject);
824   var
825     tmpSvc: string;
826   begin
827     if FcboServiceKeyDownStopClick then
828     begin
829       Exit; //This fixes clearquest: HDS00001418
830       FcboServiceKeyDownStopClick := false;
831     end;
832     memReason.Clear;
833     with cboService do
834       begin
835         setup508Label(servicelbl508, cboService);
836         if (ItemIndex < 0) or (ItemID = '') then
837           begin
838             Responses.Update('ORDERABLE', 1, '', '');
839             memOrder.Clear;
840             FLastServiceID := '';
841             exit;
842           end;
843         if Piece(Items[ItemIndex],U,5) = '1' then
844           begin
845             Responses.Update('ORDERABLE', 1, '', '');
846             memOrder.Clear;
847             FLastServiceID := '';
848             pnlMessage.TabOrder := cboService.TabOrder + 1;
849             OrderMessage(TX_GROUPER);
850             Exit;
851           end;
852         FLastServiceID := ItemID;
853         if CharAt(ItemID, 1) = 'Q' then
854           begin
855             Changing := True;
856             Responses.QuickOrder := ExtractInteger(ItemID);
857             consultQuickOrder := True;
858             tmpSvc := TResponse(Responses.FindResponseByName('ORDERABLE',1)).EValue;
859             ItemIndex := Items.IndexOf(Trim(tmpSvc));
860             If ItemIndex < LLS_LINE_INDEX then       {TP - HDS00015782: Check if index is of a QO}
861               ItemIndex := GetItemIndex(tmpSvc,ItemIndex);
862   (*          tmpSvc := TResponse(Responses.FindResponseByName('ORDERABLE',1)).IValue;
863             for i := 0 to Items.Count-1 do
864               begin
865                 if Piece(Items[i],U,6) = tmpSvc then
866                   begin
867                     ItemIndex := i;
868                     break;
869                   end;
870               end;*)
871             FLastServiceID := ItemID;
872             Enabled := False;
873             setup508Label(servicelbl508, cboService);
874             Font.Color := clGrayText;
875             btnServiceTree.Enabled := False;
876             pnlServiceTreeButton.Enabled := False;
877             Changing := False;
878             with Responses do if QuickOrder > 0 then
879               begin
880                 Changing := True;
881                 if not ShowPrerequisites then
882                   begin
883                     Close;
884                     Exit;
885                   end;
886                 SetControl(cboCategory,   'CLASS',      1);
887                 if cboCategory.ItemID = 'I' then radInpatient.Checked := True
888                 else radOutpatient.Checked := True ;
889                 SetControl(cboUrgency,    'URGENCY',     1);
890                 SetControl(cboPlace,      'PLACE',     1);
891                 SetControl(txtAttn,       'PROVIDER',  1);
892                 SetControl(calEarliest,   'EARLIEST',  1);
893                 SetTemplateDialogCanceled(FALSE);
894                 SetControl(memReason,     'COMMENT',   1);
895                 if WasTemplateDialogCanceled and OrderContainsObjects then
896                 begin
897                   AbortOrder := TRUE;
898   				SetTemplateDialogCanceled(FALSE);
899                   Close;
900                   Exit;
901                 end;
902   //              if ((cboService.ItemIEN > 0) and (Length(memReason.Text) = 0)) then
903   //                QuickCopy(DefaultReasonForRequest(cboService.ItemID, True), memReason);
904                 SetupReasonForRequest(ORDER_QUICK);
905                 GetProvDxandValidateCode(Responses);
906                 Changing := False;
907               end
908             else
909               begin
910                 if cboService.ItemIEN > 0 then
911                   begin
912                     Changing := True;
913                     if not ShowPrerequisites then
914                       begin
915                         Close;
916                         Exit;
917                       end;
918                     QuickCopy(DefaultReasonForRequest(cboService.ItemID, True), memReason);
919                     SetupReasonForRequest(ORDER_NEW);
920                     Changing := False;
921                   end;
922               end;
923           end
924         else
925           begin
926             Changing := True;
927             if not ShowPrerequisites then
928               begin
929                 Close;
930                 Exit;
931               end;
932             QuickCopy(DefaultReasonForRequest(cboService.ItemID, True), memReason);
933             SetupReasonForRequest(ORDER_NEW);
934             Changing := False;
935           end;
936         end;
937     treService.Visible := False;
938     SetProvDiagPromptingMode;
939     tmpSvc := Piece(cboService.Items[cboService.ItemIndex], U, 6);
940     pnlMessage.TabOrder := cboService.TabOrder + 1;
941     OrderMessage(ConsultMessage(StrToIntDef(tmpSvc, 0)));
942     //OrderMessage(ConsultMessage(cboService.ItemIEN));
943     ControlChange(Self) ;
944     SetUpEarliestDate;    //wat v28
945     setup508Label(servicelbl508, cboService);
946   end;