Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/fProbs.pas

    r830 r1679  
    77  fHSplit, StdCtrls, ExtCtrls, Menus, ORCtrls, Buttons, uProbs,
    88  Grids, Vawrgrid, ORfn, uCore, fProbEdt, uConst, ComCtrls,
    9   VA508AccessibilityManager, fBase508Form;
     9  VA508AccessibilityManager, VAUtils, fBase508Form;
    1010
    1111type
     
    188188  TX_INVALID_PATIENT = 'Problem list is unavailable:  Patient DFN is undefined.';
    189189  TC_NO_PATIENT      = 'No patient is selected';
    190   TX_INACTIVE_CODE_V = 'references an inactive ICD code, and must be updated'  + #13#10 +
     190  TX_INACTIVE_CODE_V = 'references an inactive ICD-9-CM code, and must be updated'  + #13#10 +
    191191                       'using the ''Change'' option before it can be verified.';
    192192  TC_INACTIVE_CODE   = 'Inactive Code';
    193   TX_INACTIVE_CODE   = 'This problem references an inactive ICD code,' + #13#10 +
     193  TX_INACTIVE_ICODE  = 'This problem references an inactive ICD-9-CM code,' + #13#10 +
    194194                       'and must be updated using the ''Change'' option.';
     195  TC_INACTIVE_ICODE  = 'Inactive ICD-9-CM code';
    195196  TX_ADD_REMOVED     = 'Cannot add to the "Removed Problem List"';
    196197  TC_ADD_REMOVED     = 'Unable to add';
     
    282283      LoadProblems ;
    283284    end;
     285  //CQ #11529: 508 PL tab - defaults the focus to the New Problem button ONLY upon switching to the Probs tab.  {TC}
     286  if TabCtrlClicked and (ChangingTab = CT_PROBLEMS) then ProbTabClicked := True;
     287  if (bbNewProb.CanFocus) and (not pnlButtons.Visible) and ((not PTSwitchRefresh) or ProbTabClicked) then bbNewProb.SetFocus;
     288  if PTSwitchRefresh then PTSwitchRefresh := False;
     289  if TabCtrlClicked then TabCtrlClicked := False;
     290  if ProbTabClicked then ProbTabClicked := False;
    284291end;
    285292
     
    570577              if not IsActiveICDCode(ProbRec.Diagnosis.extern) then
    571578                begin
    572                   InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK);
     579                  InfoBox(TX_INACTIVE_ICODE, TC_INACTIVE_ICODE, MB_ICONWARNING or MB_OK);
    573580                  exit;
    574                 end ;
     581                end;
    575582              if ProbRec.CmtIsXHTML then
    576583                begin
     
    584591                  ut := '';
    585592                  If PLUser.usPrimeUser then ut := '1';
    586                   FastAssign(EditSave(ProblemIFN,pProviderID,PLPt.ptVAMC,ut,ProbRec.FilerObject), AList) ;
     593                  FastAssign(EditSave(ProblemIFN, pProviderID, PLPt.ptVAMC, ut, ProbRec.FilerObject), AList);
    587594                  LoadPatientProblems(AList,PlUser.usViewAct[1],true);
    588595                end ;
     
    717724  pnlRight.font.color := self.font.color;
    718725  S := MString(wgProbData.ItemIndex);
    719   pnlRight.caption := Piece(Piece(S, U , 3), #13, 1);
     726  //pnlRight.caption := Piece(Piece(S, U , 3), #13, 1); //fixes part (b) of CQ #15531: 508 Problems Tab [CPRS v28.1] {TC}
    720727  if (Piece(S, U, 1) = '') or
    721728     (Pos('No data available',  Piece(S, U, 2)) > 0) or
     
    9951002var {init should only be true when initializing a list for a new patient}
    9961003  x, line, ver, prio, comments: string;
    997   i, j, inact: Integer;
     1004  i, j, inactI: Integer;
    9981005  st: char;
    9991006  CmtList: TStringList;
     
    10201027  try
    10211028    ClearGrid;
    1022     inact := 0;
     1029    inactI := 0;
    10231030    if PLPt = nil then
    10241031      begin
     
    10631070        begin
    10641071          ver := '#';      // inactive ICD code flag takes precedence over unverified flag
    1065           if (Piece(x, U, 2) = 'A') then inact := inact + 1;
     1072          if (Piece(x, U, 2) = 'A') then inactI := inactI + 1;
    10661073        end
    10671074      else if (PlUSer.usVerifyTranscribed) and
     
    11261133      NoRowSelected;
    11271134    pnlRightResize(Self);
    1128     if (not FWarningShown) and (inact > 0) and (CharAt(UpperCase(Status), 1) in ['A', 'B']) then
    1129       begin
    1130        InfoBox('There are ' + IntToStr(inact) + ' active problem(s) flagged with a "#" as having' + #13#10 +
    1131                'inactive ICD codes as of today''s date.  Please correct these' + #13#10 +
    1132                'problems using the "Change" option.', 'Inactive ICD Codes Found', MB_ICONWARNING or MB_OK);
     1135    if (not FWarningShown) and (inactI > 0) and (CharAt(UpperCase(Status), 1) in ['A', 'B']) then
     1136      begin
     1137       InfoBox('There are ' + IntToStr(inactI) + ' active problem(s) flagged with a "#" as having' + #13#10 +
     1138               'inactive ICD-9-CM codes as of today''s date.  Please correct these' + #13#10 +
     1139               'problems using the "Change" option.', 'Inactive ICD-9-CM Codes Found', MB_ICONWARNING or MB_OK);
    11331140       FWarningShown := True;
    11341141      end;
     
    12161223var
    12171224  dup: string;
    1218   cmplist: TstringList;
    1219   cmpp, i: integer;
     1225  exprList, icdList, textList: TstringList;
     1226  cmpp, i, exprPos, icdPos, textPos: integer;
    12201227  collapserow: boolean;
    12211228begin
    12221229  Result := False;
     1230  cmpp := -1;
    12231231  if Piece(newprob, U, 1) = '' then
    12241232    dup := CheckForDuplicateProblem('1', Piece(newprob, U, 2))
     
    12361244            lstViewClick(Self);
    12371245          end;
    1238         cmplist:=Tstringlist.create;
     1246        exprList := TStringList.Create;
     1247        icdList := TStringList.Create;
     1248        textList := TStringList.create;
    12391249        try {find and highlight duplicate problem - match problem text minus trailing '*'}
    12401250          for i := 0 to FAllProblems.Count - 1 do
    1241             cmpList.Add(TrimRight(Piece(Piece(Piece(FAllProblems[i], U, 3), #13, 1), '*', 1)));
    1242           cmpp:=cmpList.indexof(TrimRight(Piece(Piece(newprob, U, 2), '*', 1)));
     1251          begin
     1252            exprList.Add(TrimRight(Piece(FAllProblems[i], U, 1)));
     1253            icdList.Add(TrimRight(Piece(FAllProblems[i], U, 14)));
     1254            textList.Add(TrimRight(Piece(Piece(Piece(Piece(FAllProblems[i], U, 3), #13, 1), '*', 1),'(', 1)));
     1255          end;
     1256          exprPos := exprList.IndexOf(TrimRight(Piece(dup, U, 1)));
     1257          icdPos  := icdList.IndexOf(TrimRight(Piece(newprob, U, 3)));
     1258          textPos := textList.indexof(TrimRight(Piece(Piece(Piece(newprob, U, 2), '*', 1),'(', 1)));
     1259          if exprPos > -1 then
     1260            cmpp := exprPos
     1261          else if icdPos > -1 then
     1262            cmpp := icdPos
     1263          else if textPos > -1 then
     1264            cmpp := textPos;
    12431265        finally
    1244           cmplist.free;
     1266          textList.free;
    12451267        end;
    12461268        if cmpp > -1 then
     
    12571279                ItemIndex := i;
    12581280                Selected[i] := True;
    1259                 break;
    1260               end;
     1281                //break;
     1282              end
     1283              else if wgProbData.Selected[i] = True then
     1284                wgProbData.Selected[i] := False;
    12611285            end;
    12621286            case DlgType of
     
    13261350      dlgProbs.show;
    13271351      PostMessage(dlgProbs.Handle, UM_TAKEFOCUS, 0, 0);
     1352      wgProbData.TabStop := False; //fixes part (c) of CQ #15531: 508 Problems tab [CPRS v28.1] {TC}.
     1353      //prevents the selected problem or last entered problem from the PL captionlistbox
     1354      //underneath pnlProbDlg to be focused & read by Jaws
    13281355    end
    13291356  else
     
    13541381      pnlProbDlg.Visible := True;
    13551382      pnlProbDlg.BringToFront ;
     1383      //prevents JAWS from reading the top item in the wgProbData caption listbox when hidden from view.
     1384      pnlProbDlg.SetFocus;
    13561385      dlgProbs           := TFrmDlgProb.create(pnlProbDlg);
    13571386      dlgProbs.HorzScrollBar.Range := dlgProbs.ClientWidth;
     
    13641393      dlgProbs.Show;
    13651394      PostMessage(dlgProbs.Handle, UM_TAKEFOCUS, 0, 0);
     1395      wgProbData.TabStop := False;  //fixes part (c) of CQ #15531: 508 Problems tab [CPRS v28.1] {TC}.
     1396      //prevents the selected problem or last entered problem from the PL captionlistbox
     1397      //underneath pnlProbDlg to be focused & read by Jaws
    13661398    end
    13671399  else
     
    14061438            if not IsActiveICDCode(ProbRec.Diagnosis.extern) then
    14071439              begin
    1408                 InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK);
     1440                InfoBox(TX_INACTIVE_ICODE, TC_INACTIVE_ICODE, MB_ICONWARNING or MB_OK);
    14091441                exit;
    14101442              end;
     
    16081640  //Show pnlView & Add Back to tab Order
    16091641  ShowPnlView;
     1642  //shift focus to another ctrl so the Cancel btn does not get read twice by JAWS,
     1643  //once upon tabbing to the btn & 2nd after it is selected/clicked (focus remained on btn)
     1644  lstView.SetFocus;
    16101645end;
    16111646
     
    16871722      PLUser := nil;
    16881723    end;
     1724  if ScreenReaderActive then
     1725     GetScreenReader.Speak('Returning to default view.');
    16891726  ShowPnlView;
    16901727  LoadProblems ;
Note: See TracChangeset for help on using the changeset viewer.