Changeset 1679 for cprs/trunk/CPRS-Chart/fProbs.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fProbs.pas
r830 r1679 7 7 fHSplit, StdCtrls, ExtCtrls, Menus, ORCtrls, Buttons, uProbs, 8 8 Grids, Vawrgrid, ORfn, uCore, fProbEdt, uConst, ComCtrls, 9 VA508AccessibilityManager, fBase508Form;9 VA508AccessibilityManager, VAUtils, fBase508Form; 10 10 11 11 type … … 188 188 TX_INVALID_PATIENT = 'Problem list is unavailable: Patient DFN is undefined.'; 189 189 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 + 191 191 'using the ''Change'' option before it can be verified.'; 192 192 TC_INACTIVE_CODE = 'Inactive Code'; 193 TX_INACTIVE_ CODE = 'This problem references an inactive ICDcode,' + #13#10 +193 TX_INACTIVE_ICODE = 'This problem references an inactive ICD-9-CM code,' + #13#10 + 194 194 'and must be updated using the ''Change'' option.'; 195 TC_INACTIVE_ICODE = 'Inactive ICD-9-CM code'; 195 196 TX_ADD_REMOVED = 'Cannot add to the "Removed Problem List"'; 196 197 TC_ADD_REMOVED = 'Unable to add'; … … 282 283 LoadProblems ; 283 284 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; 284 291 end; 285 292 … … 570 577 if not IsActiveICDCode(ProbRec.Diagnosis.extern) then 571 578 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); 573 580 exit; 574 end 581 end; 575 582 if ProbRec.CmtIsXHTML then 576 583 begin … … 584 591 ut := ''; 585 592 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); 587 594 LoadPatientProblems(AList,PlUser.usViewAct[1],true); 588 595 end ; … … 717 724 pnlRight.font.color := self.font.color; 718 725 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} 720 727 if (Piece(S, U, 1) = '') or 721 728 (Pos('No data available', Piece(S, U, 2)) > 0) or … … 995 1002 var {init should only be true when initializing a list for a new patient} 996 1003 x, line, ver, prio, comments: string; 997 i, j, inact : Integer;1004 i, j, inactI: Integer; 998 1005 st: char; 999 1006 CmtList: TStringList; … … 1020 1027 try 1021 1028 ClearGrid; 1022 inact := 0;1029 inactI := 0; 1023 1030 if PLPt = nil then 1024 1031 begin … … 1063 1070 begin 1064 1071 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; 1066 1073 end 1067 1074 else if (PlUSer.usVerifyTranscribed) and … … 1126 1133 NoRowSelected; 1127 1134 pnlRightResize(Self); 1128 if (not FWarningShown) and (inact > 0) and (CharAt(UpperCase(Status), 1) in ['A', 'B']) then1129 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); 1133 1140 FWarningShown := True; 1134 1141 end; … … 1216 1223 var 1217 1224 dup: string; 1218 cmplist: TstringList;1219 cmpp, i : integer;1225 exprList, icdList, textList: TstringList; 1226 cmpp, i, exprPos, icdPos, textPos: integer; 1220 1227 collapserow: boolean; 1221 1228 begin 1222 1229 Result := False; 1230 cmpp := -1; 1223 1231 if Piece(newprob, U, 1) = '' then 1224 1232 dup := CheckForDuplicateProblem('1', Piece(newprob, U, 2)) … … 1236 1244 lstViewClick(Self); 1237 1245 end; 1238 cmplist:=Tstringlist.create; 1246 exprList := TStringList.Create; 1247 icdList := TStringList.Create; 1248 textList := TStringList.create; 1239 1249 try {find and highlight duplicate problem - match problem text minus trailing '*'} 1240 1250 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; 1243 1265 finally 1244 cmplist.free;1266 textList.free; 1245 1267 end; 1246 1268 if cmpp > -1 then … … 1257 1279 ItemIndex := i; 1258 1280 Selected[i] := True; 1259 break; 1260 end; 1281 //break; 1282 end 1283 else if wgProbData.Selected[i] = True then 1284 wgProbData.Selected[i] := False; 1261 1285 end; 1262 1286 case DlgType of … … 1326 1350 dlgProbs.show; 1327 1351 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 1328 1355 end 1329 1356 else … … 1354 1381 pnlProbDlg.Visible := True; 1355 1382 pnlProbDlg.BringToFront ; 1383 //prevents JAWS from reading the top item in the wgProbData caption listbox when hidden from view. 1384 pnlProbDlg.SetFocus; 1356 1385 dlgProbs := TFrmDlgProb.create(pnlProbDlg); 1357 1386 dlgProbs.HorzScrollBar.Range := dlgProbs.ClientWidth; … … 1364 1393 dlgProbs.Show; 1365 1394 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 1366 1398 end 1367 1399 else … … 1406 1438 if not IsActiveICDCode(ProbRec.Diagnosis.extern) then 1407 1439 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); 1409 1441 exit; 1410 1442 end; … … 1608 1640 //Show pnlView & Add Back to tab Order 1609 1641 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; 1610 1645 end; 1611 1646 … … 1687 1722 PLUser := nil; 1688 1723 end; 1724 if ScreenReaderActive then 1725 GetScreenReader.Speak('Returning to default view.'); 1689 1726 ShowPnlView; 1690 1727 LoadProblems ;
Note:
See TracChangeset
for help on using the changeset viewer.