Procedure

SelectFormularyAlt

Module

fODMedFA

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

procedure SelectFormularyAlt(AnIEN: Integer; var ADrug, AnOI: Integer;
  var ADrugName, AnOIName: string; PSType: Char);

Calls Hierarchy


SelectFormularyAlt
 ├LoadFormularyAlt
 └TfrmBase508Form.Create
   ├TfrmBase508Form.UpdateAccessibilityActions
   ├UnfocusableControlEnter
   └AdjustControls
     ├TfrmBase508Form.ModifyUnfocusableControl
     └..(rec)..

Called-By Hierarchy


                    SelectFormularyAlt
            TfrmODMedIn.CheckFormAlt┤ 
       TfrmODMedIn.cboDispenseExit┤ │ 
 TfrmODMedIn.cboDispenseMouseClick┘ │ 
 TfrmODMedIn.cboMedicationSelect┘   │ 
   TfrmODMedIn.CheckFormAlt...┘     │ 
           TfrmODMedOut.CheckFormAlt┘ 
      TfrmODMedOut.cboDispenseExit┤   
TfrmODMedOut.cboDispenseMouseClick┘   
TfrmODMedOut.cboMedicationSelect┘     
  TfrmODMedOut.CheckFormAlt...┘       

Calls

Name Declaration Comments
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -
LoadFormularyAlt procedure LoadFormularyAlt(AList: TStringList; AnIEN: Integer; PSType: Char); -

Called-By

Name Declaration Comments
TfrmODMedIn.CheckFormAlt procedure CheckFormAlt; -
TfrmODMedOut.CheckFormAlt procedure CheckFormAlt; -


Source

42    procedure SelectFormularyAlt(AnIEN: Integer; var ADrug, AnOI: Integer;
43      var ADrugName, AnOIName: string; PSType: Char);
44    var
45      frmODMedFA: TfrmODMedFA;
46      FormAltList: TStringList;
47    begin
48      ADrug := 0;
49      AnOI  := 0;
50      ADrugName := '';
51      AnOIName  := '';
52      FormAltList := TStringList.Create;
53      try
54        LoadFormularyAlt(FormAltList, AnIEN, PSType);
55        if FormAltList.Count > 0 then
56        begin
57          frmODMedFA := TfrmODMedFA.Create(Application);
58          try
59            ResizeFormToFont(TForm(frmODMedFA));
60            with frmODMedFA do
61            begin
62              FastAssign(FormAltList, lstFormAlt.Items);
63              ShowModal;
64              if Length(FSelected) > 0 then
65              begin
66                ADrug := StrToIntDef(Piece(FSelected, U, 1), 0);
67                AnOI  := StrToIntDef(Piece(FSelected, U, 4), 0);
68                ADrugName := Piece(FSelected, U, 2);
69                AnOIName  := Piece(FSelected, U, 5);
70              end;
71            end;
72          finally
73            frmODMedFA.Release;
74          end; {frmODMedFA}
75        end
76        else InfoBox(TX_NO_FORM_ALT, TC_NO_FORM_ALT, MB_OK);
77      finally
78        FormAltList.Free;
79      end; {FormAltList}
80    end;