Procedure

TfrmBALocalDiagnoses.AddDiagnosistoPersonalDiagnosesList1Click

Module

fBALocalDiagnoses

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmBALocalDiagnoses

Declaration

procedure AddDiagnosistoPersonalDiagnosesList1Click(Sender: TObject);

Calls Hierarchy


TfrmBALocalDiagnoses.AddDiagnosistoPersonalDiagnosesList1Click
 ├rpcAddToPersonalDxList
 └TfrmBALocalDiagnoses.LoadEncounterForm
   ├FMToday
   │ └FMNow
   ├TfrmBALocalDiagnoses.AddProbsToDiagnosis
   │ ├FMToday...
   │ └AttachPLTFactorsToDx
   │   └ProcessProblemTFactors
   ├TfrmBALocalDiagnoses.AddPersonalDxToDiagnosisList
   │ └rpcGetPersonalDxList
   └TfrmBALocalDiagnoses.AddPCEToDiagnosis

Calls

Name Declaration Comments
TfrmBALocalDiagnoses.LoadEncounterForm procedure LoadEncounterForm; -
rpcAddToPersonalDxList function rpcAddToPersonalDxList(UserDUZ:int64; DxCodes:TStringList):boolean; -


Source

1126  procedure TfrmBALocalDiagnoses.AddDiagnosistoPersonalDiagnosesList1Click(Sender: TObject);
1127  var
1128     i: integer;
1129     pCodeList: TStringList;
1130     selectedList: TStringList;
1131  begin
1132    inherited;
1133    pCodeList := TStringList.Create;
1134    selectedList := TStringList.Create;
1135  
1136    if Assigned(pCodeList) then pCodeList.Clear;
1137    if Assigned(selectedList) then selectedList.Clear;
1138  
1139    try
1140       for i := 0 to lbDiagnosis.Items.Count-1 do
1141          if(lbDiagnosis.Selected[i]) then
1142               selectedList.Add((Piece(lbDiagnosis.Items[i],U,2)) );
1143     except
1144        on EListError do
1145           begin
1146           {$ifdef debug}Show508Message('EListError in frmBALocalDiagnoses.AddDiagnosisToPersonalDiagnosesListClick()');{$endif}
1147           raise;
1148           end;
1149      end; //try
1150  
1151       if selectedList.Count > 0 then
1152         if UBACore.rpcAddToPersonalDxList(User.DUZ,selectedList) then
1153         begin
1154            ShowMsg(UBAMessages.BA_PERSONAL_LIST_UPDATED);
1155            LoadEncounterForm;
1156            Refresh;
1157         end;
1158  
1159  end;