Procedure

TfrmODMedIV.chkDoseNowClick

Module

fODMedIV

Last Modified

7/15/2014 3:26:42 PM

Comments

SchID: integer;

Visibility

Public/Published

Owner

TfrmODMedIV

Declaration

procedure chkDoseNowClick(Sender: TObject);

Calls Hierarchy


TfrmODMedIV.chkDoseNowClick
 └TfrmODMedIV.ControlChange
   ├TfrmODMedIV.loadExpectFirstDose
   │ ├TfrmODMedIV.DisplayDoseNow
   │ ├LoadAdminInfo
   │ └FMToday
   │   └FMNow
   ├TResponses.FindResponseByName
   ├TResponses.Clear
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   ├IsNumericRate
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Calls

Name Declaration Comments
TfrmODMedIV.ControlChange procedure ControlChange(Sender: TObject); -


Source

1249  procedure TfrmODMedIV.chkDoseNowClick(Sender: TObject);
1250  Const
1251    T  = '"';
1252    T1 = 'By checking the "Give additional dose now" box, you have actually entered two orders for the same medication.';
1253    T2 = #13#13'The first order''s administrative schedule is "';
1254    T3 = #13'The second order''s administrative schedule is "';
1255    T4 = #13#13'Do you want to continue?';    
1256    T5 = '" and a priority of "';
1257    T1A = 'By checking the "Give additional dose now" box, you have actually entered a new order with the schedule "NOW"';
1258    T2A = ' in addition to the one you are placing for the same medication.';
1259  var
1260    medNm: string;
1261    theSch: string;
1262    ordPriority: string;
1263    //SchID: integer;
1264  begin
1265    inherited;
1266    if (chkDoseNow.Checked) then
1267    begin
1268      medNm := 'Test';
1269      //SchID := cboSchedule.ItemIndex;
1270      theSch := cboSchedule.Text;
1271      ordPriority := cboPriority.SelText;
1272      if length(theSch)>0 then
1273      begin
1274        //if (InfoBox(T1+medNm+T+T2+theSch+T+T3+'NOW"'+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL)then
1275        //if (InfoBox(T1+T2+theSch+T+T3+'NOW"'+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL)then
1276        if (InfoBox(T1+T2+'NOW'+T5+ordPriority+T+T3+theSch+T5+ordPriority+T+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL)then
1277        begin
1278          chkDoseNow.Checked := False;
1279          Exit;
1280        end;
1281      end else
1282      begin
1283        //if InfoBox(T1A+T2A+medNm+T+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL then
1284        if InfoBox(T1A+T2A+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL then
1285        begin
1286          chkDoseNow.Checked := False;
1287          Exit;
1288        end;
1289      end;
1290    end;
1291    ControlChange(self);
1292  end;