Procedure

TfrmSkinTests.FormCreate

Module

fSkinTest

Last Modified

7/15/2014 3:26:36 PM

Comments

Var
  DtGiven: TFMDateTime;
  ASkinTest: TPCESkin;
begin
  inherited;
  if lstSkinSelect.ItemIndex < 0 then Exit;

  with lstSkinSelect do ASkinTest := TPCESkin(Items.Objects[ItemIndex]);
  DtGiven := StrToFMDateTime(edtDTGiven.text);
  with lstSkinSelect do if (ItemIndex > -1) then
  begin
    ASkinTest.DTGiven := DTGIven;
    Items[ItemIndex] := ASkinTest.ItemStr;
  end;
end;


procedure TfrmSkinTests.CheckSkinRules;
begin
  //Results must be between 0 and 40
  if StrToInt(EdtReading.Text) < 0 then EdtReading.text := '0';
  if StrToInt(EdtReading.Text) > 40 then EdtReading.text := '40';

(*  //if reading >10, result must be "positive"
  if (StrToInt(EdtReading.Text) > 9) and
    (CompareText(Piece(cboSkinResults.items[cboSkinResults.itemindex],U,1),'P') <> 0) then
    begin
      if (Piece(cboSkinResults.items[cboSkinResults.itemindex],U,1) = '@') then    // not selected
      begin
        cboSkinResults.SelectById('P');
      end
      else
      begin
        Show508Message('If the reading is over 9, the results are required to be positive.');
        cboSkinResults.SelectById('P');
       end;
    end;
end;

Visibility

Public/Published

Owner

TfrmSkinTests

Declaration

procedure FormCreate(Sender: TObject);

Calls Hierarchy


TfrmSkinTests.FormCreate
 ├ListSkinCodes
 └PCELoadORCombo
   └PCELoadORComboData
     ├GetPCECodes
     │ ├LoadHistLocations
     │ └CodeSetIndex
     │   ├LoadImmSeriesItems
     │   ├LoadImmReactionItems
     │   ├LoadSkResultsItems
     │   ├LoadPEDLevelItems
     │   ├LoadHFLevelItems
     │   └LoadXAMResultsItems
     └GetComboBoxMinMax

Calls

Name Declaration Comments
ListSkinCodes procedure ListSkinCodes(Dest: TStrings; SectionIndex: Integer); -
PCELoadORCombo procedure PCELoadORCombo(dest: TORComboBox); overload; -


Source

146   procedure TfrmSkinTests.FormCreate(Sender: TObject);
147   begin
148     inherited;
149     FTabName := CT_SkinNm;
150     FPCEListCodesProc := ListSkinCodes;
151     FPCEItemClass := TPCESkin;
152     FPCECode := 'SK';
153     PCELoadORCombo(cboSkinResults);
154   end;