Index: cprs/trunk/CPRS-Chart/fProbEdt.pas
===================================================================
--- cprs/trunk/CPRS-Chart/fProbEdt.pas	(revision 830)
+++ cprs/trunk/CPRS-Chart/fProbEdt.pas	(revision 1679)
@@ -100,4 +100,6 @@
     procedure GetNewComments(Reason:char);
     function  OkToQuit:boolean;
+    procedure ShowServiceCombo;
+    procedure ShowClinicLocationCombo;
   protected
     procedure CreateParams(var Params: TCreateParams); override;
@@ -150,4 +152,8 @@
     begin
       frmProblems.lblProbList.caption := frmProblems.pnlRight.Caption ;
+      frmProblems.wgProbData.TabStop := True; //CQ #15531 part (c) [CPRS v28.1] {TC}.
+      //correct JAWS from reading the 'Edit Problem' caption of the wgProbData captionlistbx.
+      if AnsiCompareText(frmProblems.wgProbData.Caption, 'Edit Problem')=0 then
+         frmProblems.wgProbData.Caption := frmProblems.lblProbList.caption;
       close;
     end
@@ -163,4 +169,8 @@
         begin
           frmProblems.lblProbList.caption := frmProblems.pnlRight.Caption ;
+          frmProblems.wgProbData.TabStop := True; //CQ #15531 part (c) [CPRS v28.1] {TC}.
+          //correct JAWS from reading the 'Edit Problem' caption of the wgProbData captionlistbx.
+          if AnsiCompareText(frmProblems.wgProbData.Caption, 'Edit Problem')=0 then
+             frmProblems.wgProbData.Caption := frmProblems.lblProbList.caption;
           FCanQuit := True;
           close;
@@ -325,5 +335,5 @@
     cbProv.InitLongList(ProbRec.RespProvider.extern) ;
     if (ProbRec.RespProvider.intern <> '') and (StrToInt64Def(ProbRec.RespProvider.intern, 0) > 0) then
-      cbProv.SelectByIEN(StrToInt64(ProbRec.RespProvider.intern)) ;
+      cbProv.SelectByIEN(StrToInt64(ProbRec.RespProvider.intern));
 
     if UpperCase(Reason) = 'A' then
@@ -331,15 +341,11 @@
         if Encounter.Inpatient then
           begin
-            cbLoc.visible:=false;
-            cbServ.Visible:=true;
-            lblLoc.caption:='Service:';
+            ShowServiceCombo();
             cbServ.InitLongList('');
           end
         else
           begin
-            cbLoc.visible:=true;
-            cbServ.Visible:=false;
-            lblLoc.caption:='Clinic:';
-            cbLoc.InitLongList(Encounter.LocationName) ;
+            ShowClinicLocationCombo();
+            cbLoc.InitLongList(Encounter.LocationName);
             cbLoc.SelectByIEN(Encounter.Location);
           end;
@@ -349,17 +355,13 @@
         if (ProbRec.Service.DHCPField = '^') and  (ProbRec.Clinic.DHCPField <> '^') then
           begin
-            cbLoc.visible:=true;
-            cbServ.Visible:=false;
-            lblLoc.caption:='Clinic:';
-            cbLoc.InitLongList(ProbRec.Clinic.Extern) ;
-            cbLoc.SelectByID(ProbRec.Clinic.Intern) ;
+            ShowClinicLocationCombo();
+            cbLoc.InitLongList(ProbRec.Clinic.Extern);
+            cbLoc.SelectByID(ProbRec.Clinic.Intern);
           end
         else if (ProbRec.Clinic.DHCPField = '^') and  (ProbRec.Service.DHCPField <> '^') then
           begin
-            cbLoc.visible:=false;
-            cbServ.Visible:=true;
-            lblLoc.caption:='Service:';
-            cbServ.InitLongList(ProbRec.Service.Extern) ;
-            cbServ.SelectByID(ProbRec.Service.Intern) ;
+            ShowServiceCombo();
+            cbServ.InitLongList(ProbRec.Service.Extern);
+            cbServ.SelectByID(ProbRec.Service.Intern);
           end
         else
@@ -367,15 +369,11 @@
             if Encounter.Inpatient then
               begin
-                cbLoc.visible:=false;
-                cbServ.Visible:=true;
-                lblLoc.caption:='Service:';
+                ShowServiceCombo();
                 cbServ.InitLongList('');
               end
             else
               begin
-                cbLoc.visible:=true;
-                cbServ.Visible:=false;
-                lblLoc.caption:='Clinic:';
-                cbLoc.InitLongList('') ;
+                ShowClinicLocationCombo();
+                cbLoc.InitLongList('');
               end;
           end;
@@ -383,5 +381,5 @@
     cbLoc.Caption := lblLoc.Caption;
 
-    if Pos(Reason,'E,C') > 0 then ShowComments  ;
+    ShowComments;
     if ProbRec.CmtIsXHTML then
       begin
@@ -465,8 +463,8 @@
 procedure TfrmdlgProb.bbFileClick(Sender: TObject);
 const
-  TX_INACTIVE_CODE   = 'This problem references an inactive ICD code.' + #13#10 +
+  TX_INACTIVE_ICODE   = 'This problem references an inactive ICD-9-CM code.' + #13#10 +
                        'The code must be updated using the ''Change''' + #13#10 +
                        'button before it can be saved';
-  TC_INACTIVE_CODE   = 'Inactive Code';
+  TC_INACTIVE_ICODE   = 'Inactive ICD-9-CM Code';
 var
   AList: TstringList;
@@ -474,4 +472,5 @@
   i: integer;
 begin
+  frmProblems.wgProbData.TabStop := True;  //CQ #15531 part (c) [CPRS v28.1] {TC}.
   if (Reason <> 'R') and (Reason <> 'r') then
     if (rgStatus.itemindex=-1) or (cbProv.itemindex=-1) then
@@ -483,5 +482,5 @@
     if not IsActiveICDCode(ProbRec.Diagnosis.extern) then
       begin
-        InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK);
+        InfoBox(TX_INACTIVE_ICODE, TC_INACTIVE_ICODE, MB_ICONWARNING or MB_OK);
         exit;
       end;
@@ -719,6 +718,9 @@
   alist.add('NEW' + v + '1.12' + v + '0' + u + 'NO'); {RAD}
   alist.add('NEW' + v + '1.13' + v + '0' + u + 'NO'); {ENV}
-  alist.add('NEW' + v + '1.14' + v + '0' + u + 'NO'); {SHD}
-  alist.add('NEW' + v + '1.15' + v + '');
+  alist.add('NEW' + v + '1.14' + v + ''); {Priority: 'A', 'C', or ''}
+  alist.add('NEW' + v + '1.15' + v + '0' + u + 'NO'); {HNC}
+  alist.add('NEW' + v + '1.16' + v + '0' + u + 'NO'); {MST}
+  alist.add('NEW' + v + '1.17' + v + '0' + u + 'NO'); {CV}
+  alist.add('NEW' + v + '1.18' + v + '0' + u + 'NO'); {SHAD}
 end;
 
@@ -731,5 +733,6 @@
   procedure Msg(msg: string);
   begin
-    InfoBox('Dates must be in format m/d/y or m/d or y, or T+d or T-d' +
+// CQ #16123 - Modified error text to clarify proper date formats - JCS
+    InfoBox('Dates must be in format m/d/yy, m/d/yyyy, m/d, m/yyyy, yyyy, T+d or T-d' +
       #13#10 + msg + ' is formatted improperly.' +
       #13#10 + '     Please check the other dates as well.',
@@ -904,4 +907,18 @@
 end;
 
+procedure TfrmdlgProb.ShowClinicLocationCombo;
+begin
+  cbLoc.visible := true;
+  cbServ.Visible := false;
+  lblLoc.caption := 'Clinic:';
+end;
+
+procedure TfrmdlgProb.ShowServiceCombo;
+begin
+  cbLoc.visible := false;
+  cbServ.Visible := true;
+  lblLoc.caption := 'Service:';
+end;
+
 { base form procedures (shared by all ordering dialogs) }
 
@@ -966,4 +983,5 @@
   if PLProblem='' then exit ;
   newprob := PLProblem ;
+
   if frmProblems.HighlightDuplicate(NewProb, Piece(newprob, U, 2) + #13#10#13#10 +
       'This problem would be a duplicate.'+#13#10 +
@@ -975,7 +993,7 @@
       {ien^.01^icd^icdifn - see SetDefaultProblem}
       {Set new problem properties}
-      ProbRec.Problem.DHCPtoKeyVal(Piece(NewProb,u,1) + u + Piece(NewProb,u,2)) ;   {1.01}
-      ProbRec.Diagnosis.DHCPtoKeyVal(Piece(NewProb,u,4) + u + Piece(NewProb,u,3)) ;  {.01}
-      ProbRec.Narrative.DHCPtoKeyVal(u + Piece(NewProb,u,2));                        {.05}
+      ProbRec.Problem.DHCPtoKeyVal(Piece(NewProb,u,1) + u + Piece(NewProb,u,2)) ;    {1.01}
+      ProbRec.Diagnosis.DHCPtoKeyVal(Piece(NewProb,u,4) + u + Piece(NewProb,u,3)) ;   {.01}
+      ProbRec.Narrative.DHCPtoKeyVal(u + Piece(NewProb,u,2));                         {.05}
 
       {mark it as changed}
