Function

TfrmODMeds.ValueOfResponse

Module

fODMeds

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmODMeds

Declaration

function ValueOfResponse(FieldID: Integer; AnInstance: Integer = 1): string;

Calls Hierarchy


TfrmODMeds.ValueOfResponse
 └TResponses.IValueFor

Called-By Hierarchy


         TfrmODMeds.ValueOfResponse
           TfrmODMeds.SetupDialog┤ 
                 ValidateSchedule┤ 
            TfrmODMeds.Validate┘ │ 
              TfrmODMeds.Validate┤ 
       TfrmODMeds.SetOnQuickOrder┤ 
         TfrmODMeds.SetupDialog┤ │ 
      TfrmODMeds.btnSelectClick┘ │ 
      TfrmODMeds.UMDelayClick┘   │ 
  TfrmODMeds.timCheckChangesTimer┘ 
       TfrmODMeds.UpdateRelated┘   
       TfrmODMeds.SetupDialog┤     
 TfrmODMeds.btnSelectClick...┤     
    TfrmODMeds.cboDosageClick┤     
  TfrmODMeds.cboDosageKeyUp┘ │     
   TfrmODMeds.cboDosageChange┤     
     TfrmODMeds.cboDosageExit┤     
  TfrmODMeds.cboScheduleClick┤     
  TfrmODMeds.cmdAcceptClick┤ │     
     TfrmODMeds.chkPRNClick┤ │     
     TfrmODMeds.txtNSSClick┤ │     
TfrmODMeds.cboScheduleEnter┤ │     
TfrmODMeds.UMShowNSSBuilder┘ │     
 TfrmODMeds.cboScheduleChange┤     
   TfrmODMeds.txtSupplyChange┤     
 TfrmODMeds.txtQuantityChange┤     
      TfrmODMeds.grdDosesExit┤     
  TfrmODMeds.cboXDosageChange┤     
   TfrmODMeds.cboXDosageClick┤     
  TfrmODMeds.cboXDosageExit┤ │     
 TfrmODMeds.cboXDosageKeyUp┘ │     
    TfrmODMeds.cboXDosageExit┤     
TfrmODMeds.cboXScheduleChange┤     
     TfrmODMeds.txtNSSClick┘ │     
 TfrmODMeds.cboXScheduleClick┤     
    TfrmODMeds.chkXPRNClick┤ │     
TfrmODMeds.pnlXScheduleExit┘ │     
  TfrmODMeds.pnlXScheduleExit┤     
TfrmODMeds.txtXDurationChange┤     
TfrmODMeds.popDurationClick┘ │     
  TfrmODMeds.pnlXDurationExit┤     
       TfrmODMeds.chkPRNClick┤     
   TfrmODMeds.cboScheduleExit┤     
    TfrmODMeds.cboDosageKeyUp┤     
   TfrmODMeds.cboXDosageKeyUp┘     

Calls

Name Declaration Comments
TResponses.IValueFor function IValueFor(const APromptID: string; AnInstance: Integer): string; -

Called-By

Name Declaration Comments
TfrmODMeds.SetOnQuickOrder procedure SetOnQuickOrder; -
TfrmODMeds.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -
TfrmODMeds.timCheckChangesTimer procedure timCheckChangesTimer(Sender: TObject); -
TfrmODMeds.Validate procedure Validate(var AnErrMsg: string); override; -
ValidateSchedule procedure ValidateSchedule(const x: string; AnInstance: Integer); -


Source

4289  function TfrmODMeds.ValueOfResponse(FieldID: Integer; AnInstance: Integer = 1): string;
4290  var
4291    x, LocPosDos: string;
4292  begin
4293    LocPosDos := '';
4294    case FieldID of
4295    FLD_SCHEDULE  : Result := Responses.IValueFor('SCHEDULE', AnInstance);
4296    FLD_UNITNOUN  : begin
4297                      x := Responses.IValueFor('DOSE',   AnInstance);
4298                      Result := Piece(x, '&', 3) + ' ' + Piece(x, '&', 4);
4299                    end;
4300    FLD_DOSEUNIT  : begin
4301                      x := Responses.IValueFor('DOSE',   AnInstance);
4302                      Result := Piece(x, '&', 3);
4303                    end;
4304    FLD_DOSEUNIT_LOCAL  : begin
4305                            x := Responses.IValueFor('DOSE',   AnInstance);
4306                            LocPosDos := Piece(x, '&', 5);
4307                            if (Piece(x, '&', 1)='') and AnsiContainsStr(LocPosDos, ' ') then Result := Piece(LocPosDos, ' ', 1)
4308                            else Result := '';
4309                          end;
4310    FLD_DRUG_ID   : Result := Responses.IValueFor('DRUG',     AnInstance);
4311    FLD_INSTRUCT  : Result := Responses.IValueFor('INSTR',    AnInstance);
4312    FLD_SUPPLY    : Result := Responses.IValueFor('SUPPLY',   AnInstance);
4313    FLD_QUANTITY  : Result := Responses.IValueFor('QTY',      AnInstance);
4314    FLD_ROUTE_ID  : Result := Responses.IValueFor('ROUTE',    AnInstance);
4315    FLD_EXPIRE    : Result := Responses.IValueFor('DAYS',     AnInstance);
4316    FLD_ANDTHEN   : Result := Responses.IValueFor('CONJ',     AnInstance);
4317    end;
4318  end;