Procedure

SetMedFields

Module

rMeds

Last Modified

7/15/2014 3:26:44 PM

Scope

Global

Declaration

procedure SetMedFields(AMed: TMedListRec; const x, y: string);

Called-By Hierarchy


                                                                SetMedFields
                                                        LoadActiveMedLists┘ 
                                                TfrmMeds.RefreshMedLists┘   
                                                  TfrmMeds.DisplayPage┤     
                                                  TfrmMeds.NotifyOrder┤     
                                                TfrmFrame.UMNewOrder┘ │     
                                                  TfrmMeds.SetFontSize┤     
                                                TfrmFrame.ChangeFont┘ │     
                                        TfrmFrame.LoadSizesForUser┤   │     
                                   TfrmFrame.LoadUserPreferences┘ │   │     
                                          TfrmFrame.UMInitiate┘   │   │     
                                        TfrmFrame.mnuFontSizeClick┘   │     
                               TfrmMeds.SortbyStatusthenLocation1Click┤     
                TfrmMeds.SortbyClinicOrderthenStatusthenStopDate1Click┤     
TfrmMeds.SortbyDrugalphabeticallystatusactivestatusrecentexpired1Click┤     
                                           TfrmOptionsOther.btnOKClick┘     

Called-By

Name Declaration Comments
LoadActiveMedLists procedure LoadActiveMedLists(InPtMeds, OutPtMeds, NonVAMeds: TList; var view: integer; var DateRange: string); -


Source

80    procedure SetMedFields(AMed: TMedListRec; const x, y: string);
81    {          1     2      3     4       5     6       7       8        9      10     11
82    { Pieces: Typ^PharmID^Drug^InfRate^StopDt^RefRem^TotDose^UnitDose^OrderID^Status^LastFill  }
83    begin
84      with AMed do
85      begin
86        PharmID   := Piece(x, U, 2);
87        OrderID   := Piece(x, U, 9);
88        Instruct  := TrimRight(y);
89        StopDate  := MakeFMDateTime(Piece(x, U, 5));
90        Status    := MixedCase(Piece(x, U, 10));
91        Refills   := Piece(x, U, 6);
92       if ( Piece(Piece(x, U, 2), ';', 2) = 'I' )
93           or (Piece(Piece(x, U, 2), ';', 2) = 'C') then
94             Inpatient := True
95         else
96           Inpatient := False;
97        NonVAMed  := Piece(x, U, 1) = '~NV';
98        if NonVAMed then
99            Instruct := 'Non-VA  ' + Instruct;
100       IVFluid   := Piece(x, U, 1) = '~IV';
101       SrvSeq    := 0;
102       LastFill  := MakeFMDateTime(Piece(x, U, 11));
103       Location  := Piece(Piece(x,U,1),':',2);
104       //LocationID := StrToIntDef(Piece(Piece(x,U,1),':',3),0);
105     end;
106   end;