Procedure

TfrmODMedNVA.SetOnMedSelect

Module

fODMedNVA

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmODMedNVA

Declaration

procedure SetOnMedSelect;

Calls Hierarchy


TfrmODMedNVA.SetOnMedSelect
 ├GetPKISite
 ├TCtrlInits.LoadOrderItem
 │ ├TCtrlInits.ClearOI
 │ └TCtrlInits.ExtractInits
 │   └TCtrlInit.Create
 ├OIForNVA
 ├TCtrlInits.SetControl
 │ ├ClearControl
 │ └TCtrlInits.FindInitByName
 ├TfrmODMedNVA.cboRouteChange
 │ └TfrmODMedNVA.ControlChange
 │   ├TResponses.Clear
 │   ├TResponses.Update
 │   │ ├TResponses.FindResponseByName
 │   │ └TResponses.IENForPrompt
 │   ├TfrmODMedNVA.FindCommonDrug
 │   │ ├TfrmODMedNVA.FindDoseFields
 │   │ ├SaveDrug
 │   │ └KillDrug
 │   ├TfrmODMedNVA.ConstructedDoseFields
 │   ├TfrmODMedNVA.ValueOf
 │   │ ├GetSchedule
 │   │ └GetScheduleEX
 │   ├TfrmODMedNVA.OutpatientSig
 │   │ ├TfrmODMedNVA.ValueOf...
 │   │ └TfrmODMedNVA.CheckDecimal
 │   └TResponses.GetOrderText
 │     ├TResponses.NextInstance
 │     ├TResponses.FindResponseByName
 │     ├TResponses.FormatResponse
 │     │ └TResponses.FindResponseByIEN
 │     └TResponses.AppendChildren
 │       ├TResponses.FindPromptByIEN
 │       ├TResponses.FindResponseByIEN
 │       └TResponses.FormatResponse...
 ├TCtrlInits.DefaultText
 │ └TCtrlInits.FindInitByName
 ├TfrmODMedNVA.ValueOf...
 └TCtrlInits.TextOf
   └TCtrlInits.FindInitByName

Called-By Hierarchy


     TfrmODMedNVA.SetOnMedSelect
      TfrmODMedNVA.SetupDialog┤ 
   TfrmODMedNVA.btnSelectClick┤ 
   TfrmODMedNVA.UMDelayClick┘ │ 
 TfrmODMedNVA.CheckFormAltDose┘ 
 TfrmODMedNVA.cboDosageClick┘   
TfrmODMedNVA.cboDosageExit┘     

Calls

Name Declaration Comments
TfrmODMedNVA.cboRouteChange procedure cboRouteChange(Sender: TObject); -
TCtrlInits.DefaultText function DefaultText(const ASection: string): string; -
GetPKISite function GetPKISite: Boolean; -
TCtrlInits.LoadOrderItem procedure LoadOrderItem(Src: TStrings); -
OIForNVA function OIForNVA(AnIEN: Integer; ForNonVAMed: Boolean; HavePI: boolean = True; PKIActive: Boolean = False): TStrings; -
TCtrlInits.SetControl procedure SetControl(AControl: TControl; const ASection: string); -
TCtrlInits.TextOf function TextOf(const ASection: string): string; -
TfrmODMedNVA.ValueOf function ValueOf(FieldID: Integer; ARow: Integer = -1): string; -

Called-By

Name Declaration Comments
TfrmODMedNVA.btnSelectClick procedure btnSelectClick(Sender: TObject); -
TfrmODMedNVA.CheckFormAltDose procedure CheckFormAltDose(DispDrug: Integer); -
TfrmODMedNVA.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -


Source

934   procedure TfrmODMedNVA.SetOnMedSelect;
935   var
936     i,j: Integer;
937     temp,x: string;
938     QOPiUnChk: boolean;
939     PKIEnviron: boolean;
940   begin
941     // clear controls?
942     cboDosage.Tag := -1;
943     QOPiUnChk := False;
944     PKIEnviron := False;
945     if GetPKISite then PKIEnviron := True;
946     with CtrlInits do
947     begin
948       // set up CtrlInits for orderable item
949       LoadOrderItem(OIForNVA(txtMed.Tag, FNonVADlg, IncludeOIPI, PKIEnviron));
950       // set up lists & initial values based on orderable item
951       SetControl(txtMed,       'Medication');
952       if (self.MedName <> '') then
953          begin
954            if (txtMed.Text <> self.MedName) then
955              begin
956                temp := self.MedName;
957                self.MedName := txtMed.Text;
958                txtMed.Text := temp;
959              end
960            else MedName := '';
961          end;
962       SetControl(cboDosage,    'Dosage');
963       SetControl(cboRoute,     'Route');
964       SetControl(calStart,     'START');   //cla 7-17-03
965       if cboRoute.Items.Count = 1 then cboRoute.ItemIndex := 0;
966       cboRouteChange(Self);
967       x := DefaultText('Schedule');
968       if x <> '' then
969       begin
970         cboSchedule.SelectByID(x);
971         cboSchedule.Text := x;
972       end;
973       if Length(ValueOf(FLD_QTYDISP))>10 then
974       begin
975       end;
976       FAllDoses.Text := TextOf('AllDoses');
977       FAllDrugs.Text := TextOf('Dispense');
978       FGuideline.Text := TextOf('Guideline');
979       case FGuideline.Count of
980       0: lblGuideline.Visible := False;
981       1:   begin
982              lblGuideline.Caption := FGuideline[0];
983              lblGuideline.Visible := TRUE;
984            end;
985       else begin
986              lblGuideline.Caption := 'Display Restrictions/Guidelines';
987              lblGuideline.Visible := TRUE;
988            end;
989       end;
990   
991         DEASig := '';
992         if GetPKISite then DEASig := DefaultText('DEASchedule');
993         FSIGVerb := DefaultText('Verb');
994         if Length(FSIGVerb) = 0 then FSIGVerb := TX_TAKE;
995         FSIGPrep := DefaultText('Preposition');
996         for j := 0 to Responses.TheList.Count - 1 do
997         begin
998           if (TResponse(Responses.theList[j]).PromptID = 'PI') and (TResponse(Responses.theList[j]).EValue = ' ') then
999             QOPiUnChk := True;
1000        end;
1001        FPtInstruct := TextOf('PtInstr');
1002        for i := 1 to Length(FPtInstruct) do if Ord(FPtInstruct[i]) < 32 then FPtInstruct[i] := ' ';
1003        FPtInstruct := TrimRight(FPtInstruct);
1004        if Length(FPtInstruct) > 0 then
1005        begin
1006          if FShrinked then
1007          begin
1008             FShrinked := False;
1009          end;
1010          if QOPiUnChk then
1011         end else
1012        begin
1013          if not FShrinked then
1014          begin
1015             FShrinked := True;
1016          end;
1017        end;
1018   //   end;
1019      pnlMessage.TabOrder := cboDosage.TabOrder + 1;
1020  
1021   //   DispOrderMessage(TextOf('Message'));
1022    end;
1023  end;