Function

ProcessProblemTFactors

Module

UBACore

Last Modified

7/15/2014 3:26:34 PM

Comments

Parse string return Treatment Factors when text inlcudes multiple "(())"
HDS8409

Scope

Interfaced

Declaration

function  ProcessProblemTFactors(pText:String):String;

Called-By Hierarchy


                                                ProcessProblemTFactors
                                                AttachPLTFactorsToDx┘ 
                          TfrmBALocalDiagnoses.AddProbsToDiagnosis┘   
                          TfrmBALocalDiagnoses.LoadEncounterForm┘     
                               TfrmBALocalDiagnoses.MainDriver┤       
                             TfrmBALocalDiagnoses.FormCreate┘ │       
TfrmBALocalDiagnoses.AddDiagnosistoPersonalDiagnosesList1Click┤       
TfrmBALocalDiagnoses.AddDiagnosistoPersonalDiagnosesList2Click┘       

Called-By

Name Declaration Comments
AttachPLTFactorsToDx procedure AttachPLTFactorsToDx(var Dest:String;ProblemRec:string); -


Source

1478  function  ProcessProblemTFactors(pText:String):String;
1479  var AText1,x: string;
1480      i,j: integer;
1481  begin
1482   if StrPos(PChar(pText),'(') = nil then exit;
1483   AText1 := Piece(pText,U,2);
1484   i := 1;
1485   j := 0;
1486   while j = 0 do
1487   begin
1488      x := Piece(AText1,'(',i);
1489      if Length(x) > 0 then
1490         inc(i)
1491      else
1492      begin
1493         x := Piece(AText1,'(',i-1);
1494         x := Piece(x,')',1);
1495         j := 1;
1496         Result := x;
1497      end;
1498    end;
1499  end;