Function

TfrmConsults.LacksRequiredForCreate

Module

fConsults

Last Modified

7/15/2014 3:26:34 PM

Comments

Determines if the fields required to create the note are present

Visibility

Private

Owner

TfrmConsults

Declaration

function LacksRequiredForCreate: Boolean;

Calls Hierarchy


TfrmConsults.LacksRequiredForCreate
 ├IsClinProcTitle
 ├IsConsultTitle
 ├AskCosignerForDocument
 │ └TIUPatch175Installed
 │   └ServerHasPatch
 └AskCosignerForTitle
   └TIUPatch175Installed...

Called-By Hierarchy


     TfrmConsults.LacksRequiredForCreate
          TfrmConsults.CompleteConsult┤ 
    TfrmConsults.mnuActCompleteClick┤ │ 
  TfrmConsults.mnuActAddIDEntryClick┘ │ 
           TfrmConsults.InsertAddendum┘ 
TfrmConsults.mnuActMakeAddendumClick┘   

Calls

Name Declaration Comments
AskCosignerForDocument function AskCosignerForDocument(ADocument: Integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; -
AskCosignerForTitle function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; -
IsClinProcTitle function IsClinProcTitle(TitleIEN: Integer): Boolean; -
IsConsultTitle function IsConsultTitle(TitleIEN: Integer): Boolean; -

Called-By

Name Declaration Comments
TfrmConsults.CompleteConsult procedure CompleteConsult(IsIDChild: boolean; AnIDParent: integer; UseClinProcTitles: boolean); -
TfrmConsults.InsertAddendum procedure InsertAddendum; -


Source

3729  function TfrmConsults.LacksRequiredForCreate: Boolean;
3730  { determines if the fields required to create the note are present }
3731  var
3732    CurTitle: Integer;
3733  begin
3734    Result := False;
3735    with FEditNote do
3736    begin
3737      if Title <= 0    then Result := True;
3738      if Author <= 0   then Result := True;
3739      if DateTime <= 0 then Result := True;
3740      if MenuAccessRec.IsClinicalProcedure then
3741        begin
3742          if (IsClinProcTitle(Title) and (PkgIEN = 0)) then Result := True;
3743          //if (IsClinProcTitle(Title) and (Consult = 0)) then Result := True;
3744        end
3745      else
3746        if (IsConsultTitle(Title) and (PkgIEN = 0)) then Result := True;
3747        //if (IsConsultTitle(Title) and (Consult = 0)) then Result := True;
3748      if (DocType = TYP_ADDENDUM) then
3749      begin
3750        if AskCosignerForDocument(Addend, Author, DateTime) and (Cosigner <= 0) then Result := True;
3751      end else
3752      begin
3753        if Title > 0 then CurTitle := Title else CurTitle := DocType;
3754        if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True;
3755      end;
3756    end;
3757  end;