Procedure

TfrmBALocalDiagnoses.AddToPersonalDxList

Module

fBALocalDiagnoses

Last Modified

7/15/2014 3:26:34 PM

Visibility

Private

Owner

TfrmBALocalDiagnoses

Declaration

procedure AddToPersonalDxList;

Calls Hierarchy


TfrmBALocalDiagnoses.AddToPersonalDxList
 └rpcAddToPersonalDxList

Called-By Hierarchy


TfrmBALocalDiagnoses.AddToPersonalDxList
TfrmBALocalDiagnoses.ProcessAddToItems┘ 
      TfrmBALocalDiagnoses.buOKClick┘   

Calls

Name Declaration Comments
rpcAddToPersonalDxList function rpcAddToPersonalDxList(UserDUZ:int64; DxCodes:TStringList):boolean; -

Called-By

Name Declaration Comments
TfrmBALocalDiagnoses.ProcessAddToItems procedure ProcessAddToItems; -


Source

749   procedure TfrmBALocalDiagnoses.AddToPersonalDxList;
750   var
751    i,j: integer;
752    tempcode,thisCode : string;
753    tempList, addToPDList: TStringList;
754   begin
755       templist := TStringList.Create;
756       addToPDList := TStringList.Create;
757       tempList.Clear;
758       addTOPDList.Clear;
759       with lvDxGrid do
760       begin
761          for i := 0 to Items.Count-1 do
762          begin
763             if StrPos(PChar(LvDxGrid.Items[i].Caption),PChar(ADD_TO_PERSONAL_DX_LIST)) <> nil then
764             begin
765                tempCode := lvDxGrid.Items[i].Subitems[1];
766                tempCode := Piece(tempCode, ':', 2);
767                tempList.Add(tempCode);
768             end;
769          end;
770       end;
771   
772       //** add Lexicon IEN to list (if any)
773       for i := 0 to tempList.Count -1 do
774       begin
775          thisCode := tempList.Strings[i];
776          if lexIENHoldList.Count > 0 then  //HDS6393
777          begin
778             for j := 0 to lexIENHoldList.Count-1 do
779             begin
780                if thisCode = Piece(lexIENHoldList.Strings[j],U,1) then
781                   AddToPDList.Add(thisCode + U + Piece(lexIENHoldList.Strings[j],U,2) )  // code was selected from Lexicon
782                else
783                   AddToPDList.Add(thisCode);
784             end;
785          end
786          else  //HDS6393
787             AddToPDList.Add(thisCode); // code was not selected from the Lexicon.  //HDS6393
788       end;
789       if AddToPDList.Count > 0 then
790          rpcAddToPersonalDxList(User.DUZ,AddToPDList);
791   end;