Function

TfrmODBase.LESValidationCheck

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Visibility

Protected

Owner

TfrmODBase

Declaration

function LESValidationCheck: boolean;

Calls Hierarchy


TfrmODBase.LESValidationCheck
 ├GetDispGroupForLES
 ├TResponses.IValueFor
 └LESValidationForChangedLabOrder

Called-By Hierarchy


                               TfrmODBase.LESValidationCheck
                                      TfrmODBase.ValidSave┘ 
                               TfrmODBase.cmdAcceptClick┤   
                                   ActivateOrderDialog┘ │   
                           TfrmRemDlg.btnFinishClick┤   │   
           TfrmConsults.mnuActNewConsultRequestClick┤   │   
                   TfrmConsults.cmdNewConsultClick┘ │   │   
                TfrmConsults.mnuActNewProcedureClick┤   │   
                      TfrmConsults.cmdNewProcClick┘ │   │   
                                        ChangeOrders┤   │   
                      TfrmOrders.mnuActChangeClick┤ │   │   
                        TfrmMeds.mnuActChangeClick┘ │   │   
                                     ChangeOrdersEvt┤   │   
                                          CopyOrders┤   │   
                        TfrmOrders.mnuActCopyClick┤ │   │   
                          TfrmMeds.mnuActCopyClick┤ │   │   
                           TfrmODActive.btnOKClick┘ │   │   
                                      TransferOrders┤   │   
                        TfrmOrders.mnuActCopyClick┤ │   │   
                          TfrmMeds.mnuActCopyClick┤ │   │   
                           TfrmODActive.btnOKClick┘ │   │   
                            TfrmOrders.lstWriteClick┤   │   
               TfrmOrders.PlaceOrderForDefaultDialog┤   │   
                  TfrmOrders.DisplayDefaultDlgList┤ │   │   
                       TfrmOrders.ResetOrderPage┘ │ │   │   
               TfrmOrders.btnDelayedOrderClick┘   │ │   │   
                                 DisplayEvntDialog┤ │   │   
                             SetDelayEventForMed┘ │ │   │   
                      TfrmMeds.mnuActCopyClick┘   │ │   │   
                                 DisplayEvntDialog┤ │   │   
                                  SetViewForCopy┘ │ │   │   
                    TfrmOrders.mnuActCopyClick┘   │ │   │   
                                 DisplayEvntDialog┘ │   │   
                                ExecuteChangeEvt┘   │   │   
                 TfrmOrders.mnuActChgEvntClick┘     │   │   
                             TfrmMeds.mnuActNewClick┤   │   
                           TfrmOMNavA.ActivateDialog┤   │   
                         TfrmOMNavA.grdMenuKeyDown┤ │   │   
                         TfrmOMNavA.grdMenuMouseUp┘ │   │   
                                TfrmOMSet.DoNextItem┘   │   
                              TfrmOMSet.InsertList┤     │   
                               ActivateOrderList┘ │     │   
                     TfrmRemDlg.btnFinishClick┤   │     │   
                             ActivateOrderHTML┤   │     │   
                    TfrmOrders.lstWriteClick┤ │   │     │   
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │     │   
                              ActivateOrderSet┤   │     │   
                   TfrmRemDlg.btnFinishClick┤ │   │     │   
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │     │   
     TfrmConsults.mnuActNewProcedureClick...┤ │   │     │   
                    TfrmOrders.lstWriteClick┤ │   │     │   
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │     │   
                     TfrmMeds.mnuActNewClick┤ │   │     │   
                TfrmOMNavA.ActivateDialog...┤ │   │     │   
                     TfrmOMSet.DoNextItem...┘ │   │     │   
                       TfrmOMNavA.DoSelectList┘   │     │   
                     TfrmOMNavA.grdMenuKeyUp┤     │     │   
                   TfrmOMNavA.grdMenuMouseUp┘     │     │   
                                        SkipToNext┤     │   
                         TfrmOMSet.DoNextItem...┘ │     │   
                            TfrmOMSet.UMDelayEvent┘     │   
                               TfrmODBase.FormCloseQuery┤   
                                     TfrmODBase.TabClose┤   
                            TfrmODAllergy.cmdAcceptClick┘   

Calls

Name Declaration Comments
GetDispGroupForLES function GetDispGroupForLES: string; -
TResponses.IValueFor function IValueFor(const APromptID: string; AnInstance: Integer): string; -
LESValidationForChangedLabOrder procedure LESValidationForChangedLabOrder(var RejectedReason: TStringList; AnOrderInfo: string); -

Called-By

Name Declaration Comments
TfrmODBase.ValidSave function ValidSave: Boolean; -


Source

1846  function TfrmODBase.LESValidationCheck: boolean;
1847  var
1848    idx: integer;
1849    LESGrpList,LESRejectedReason: TStringList;
1850    IsLESOrder: boolean;
1851    TempMSG,LESODInfo: string;
1852  begin
1853    Result := True;
1854    if Length(Responses.EditOrder)>1 then
1855    begin
1856      LESGrpList := TStringList.Create;
1857      PiecesToList(GetDispGroupForLES,'^',LESGrpList);
1858      IsLESOrder := False;
1859      for idx:=0 to LESGrpList.Count - 1 do
1860        if StrToIntDef(LESGrpList[idx],0) = Responses.DisplayGroup then
1861        begin
1862          IsLESOrder := True;
1863          Break;
1864        end;
1865      if IsLESOrder then
1866      begin
1867        TempMSG := '';
1868        LESODInfo := Patient.DFN +
1869                    '^' + Responses.IValueFor('ORDERABLE',1) +
1870                    '^' + IntToStr(Encounter.Location) +
1871                    '^' + IntToStr(Encounter.Provider) +
1872                    '^' + Responses.IValueFor('START',1);
1873        LESRejectedReason := TStringList.Create;
1874        LESValidationForChangedLabOrder(LESRejectedReason,LESODInfo);
1875        if LESRejectedReason.Count > 0 then
1876        begin
1877          for idx := 0 to LESRejectedReason.Count - 1 do
1878          begin
1879            if Length(LESRejectedReason[idx])>0 then
1880              TempMSG := TempMSG + #13 + LESRejectedReason[idx];
1881          end;
1882          if Length(TempMSG)>0 then
1883          begin
1884            ShowMsg(TempMSG);
1885            Result := False;
1886          end;
1887        end;
1888      end;
1889    end;
1890  end;